]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/associated-const-marks-live-code.rs
Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiasko
[rust.git] / src / test / ui / associated-consts / associated-const-marks-live-code.rs
1 // run-pass
2
3 #![deny(dead_code)]
4
5 const GLOBAL_BAR: u32 = 1;
6
7 struct Foo;
8
9 impl Foo {
10     const BAR: u32 = GLOBAL_BAR;
11 }
12
13 pub fn main() {
14     let _: u32 = Foo::BAR;
15 }