mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
16 lines
167 B
Rust
16 lines
167 B
Rust
// run-pass
|
|
|
|
#![deny(dead_code)]
|
|
|
|
const GLOBAL_BAR: u32 = 1;
|
|
|
|
struct Foo;
|
|
|
|
impl Foo {
|
|
const BAR: u32 = GLOBAL_BAR;
|
|
}
|
|
|
|
pub fn main() {
|
|
let _: u32 = Foo::BAR;
|
|
}
|