mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
16 lines
312 B
Rust
16 lines
312 B
Rust
#![deny(non_upper_case_globals)]
|
|
|
|
trait Trait {
|
|
const item: usize;
|
|
//~^ ERROR associated constant `item` should have an upper case name [non_upper_case_globals]
|
|
}
|
|
|
|
struct Foo;
|
|
|
|
impl Trait for Foo {
|
|
const item: usize = 5;
|
|
// ^^^ there should be no error here (in the trait `impl`)
|
|
}
|
|
|
|
fn main() {}
|