summary refs log tree commit diff
path: root/src/test/ui/consts/const-int-wrapping.rs
blob: 720e40b6ebdeb01fc2b3d533c5625d3fb44f5f9c (plain)
1
2
3
4
5
6
7
fn main() {
    let x: &'static i32 = &(5_i32.wrapping_add(3)); //~ ERROR does not live long enough
    let y: &'static i32 = &(5_i32.wrapping_sub(3)); //~ ERROR does not live long enough
    let z: &'static i32 = &(5_i32.wrapping_mul(3)); //~ ERROR does not live long enough
    let a: &'static i32 = &(5_i32.wrapping_shl(3)); //~ ERROR does not live long enough
    let b: &'static i32 = &(5_i32.wrapping_shr(3)); //~ ERROR does not live long enough
}