]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-3521.fixed
Rollup merge of #106718 - lcnr:solver-cycles, r=compiler-errors
[rust.git] / tests / ui / consts / issue-3521.fixed
1 // run-rustfix
2 fn main() {
3     #[allow(non_upper_case_globals)]
4     const foo: isize = 100;
5
6     #[derive(Debug)]
7     enum Stuff {
8         Bar = foo
9         //~^ ERROR attempt to use a non-constant value in a constant
10     }
11
12     println!("{:?}", Stuff::Bar);
13 }