Files
rust/tests/ui/const-generics/generic-parameter-in-const-expression-39211.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
318 B
Rust
Raw Permalink Normal View History

trait VecN {
const DIM: usize;
}
trait Mat {
type Row: VecN;
}
fn m<M: Mat>() {
let a = [3; M::Row::DIM];
//~^ ERROR constant expression depends on a generic parameter
//~| ERROR constant expression depends on a generic parameter
}
fn main() {
}
2025-07-13 15:56:27 -04:00
// https://github.com/rust-lang/rust/issues/39211