1
Fork 0
rust/src/test/ui/consts/const-eval/pub_const_err.rs
2021-02-03 15:45:43 +01:00

10 lines
246 B
Rust

// check-pass
#![warn(const_err)]
#![crate_type = "lib"]
pub const Z: u32 = 0 - 1;
//~^ WARN any use of this value will cause an error
//~| WARN this was previously accepted by the compiler but is being phased out
pub type Foo = [i32; 0 - 1];