rust/src/test/ui/issues/issue-27433.rs

6 lines
142 B
Rust

fn main() {
let foo = 42u32;
const FOO : u32 = foo;
//~^ ERROR attempt to use a non-constant value in a constant
}