]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-int-wrapping.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-int-wrapping.rs
1 fn main() {
2     let x: &'static i32 = &(5_i32.wrapping_add(3)); //~ ERROR does not live long enough
3     let y: &'static i32 = &(5_i32.wrapping_sub(3)); //~ ERROR does not live long enough
4     let z: &'static i32 = &(5_i32.wrapping_mul(3)); //~ ERROR does not live long enough
5     let a: &'static i32 = &(5_i32.wrapping_shl(3)); //~ ERROR does not live long enough
6     let b: &'static i32 = &(5_i32.wrapping_shr(3)); //~ ERROR does not live long enough
7 }