rust/src/test/ui/associated-const/associated-const-no-item.rs
2018-12-25 21:08:33 -07:00

11 lines
159 B
Rust

trait Foo {
const ID: i32;
}
const X: i32 = <i32>::ID;
//~^ ERROR no associated item named `ID` found for type `i32`
fn main() {
assert_eq!(1, X);
}