2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2015-03-26 13:06:26 -06:00
|
|
|
|
2015-03-22 04:38:42 -06:00
|
|
|
#![deny(dead_code)]
|
|
|
|
|
|
|
|
const GLOBAL_BAR: u32 = 1;
|
2015-03-15 19:35:25 -06:00
|
|
|
|
2015-03-22 04:38:42 -06:00
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
const BAR: u32 = GLOBAL_BAR;
|
2015-03-15 19:35:25 -06:00
|
|
|
}
|
|
|
|
|
2015-03-22 19:24:56 -06:00
|
|
|
pub fn main() {
|
2015-03-22 04:38:42 -06:00
|
|
|
let _: u32 = Foo::BAR;
|
|
|
|
}
|