mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
11 lines
174 B
Rust
11 lines
174 B
Rust
trait Foo {
|
|
const ID: usize;
|
|
}
|
|
|
|
const X: [i32; <i32 as Foo>::ID] = [0, 1, 2];
|
|
//~^ ERROR the trait bound `i32: Foo` is not satisfied
|
|
|
|
fn main() {
|
|
assert_eq!(1, X);
|
|
}
|