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