2021-01-07 18:44:08 -06:00
|
|
|
// run-rustfix
|
2012-10-15 14:00:32 -05:00
|
|
|
fn main() {
|
2021-01-07 18:44:08 -06:00
|
|
|
#[allow(non_upper_case_globals)]
|
|
|
|
let foo: isize = 100;
|
2012-10-15 14:00:32 -05:00
|
|
|
|
2015-01-28 07:34:18 -06:00
|
|
|
#[derive(Debug)]
|
2012-10-15 14:00:32 -05:00
|
|
|
enum Stuff {
|
2015-02-05 01:19:07 -06:00
|
|
|
Bar = foo
|
|
|
|
//~^ ERROR attempt to use a non-constant value in a constant
|
2012-10-15 14:00:32 -05:00
|
|
|
}
|
|
|
|
|
2017-02-15 07:00:20 -06:00
|
|
|
println!("{:?}", Stuff::Bar);
|
2012-10-15 14:00:32 -05:00
|
|
|
}
|