2015-08-03 22:16:24 -04:00
|
|
|
trait Foo {
|
|
|
|
|
const ID: usize;
|
2015-05-04 01:39:10 -06:00
|
|
|
}
|
|
|
|
|
|
2017-02-15 15:00:20 +02:00
|
|
|
const X: [i32; <i32 as Foo>::ID] = [0, 1, 2];
|
|
|
|
|
//~^ ERROR the trait bound `i32: Foo` is not satisfied
|
2015-05-04 01:39:10 -06:00
|
|
|
|
2015-08-03 22:16:24 -04:00
|
|
|
fn main() {
|
|
|
|
|
assert_eq!(1, X);
|
|
|
|
|
}
|