]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-int-overflowing.rs
Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnr
[rust.git] / tests / ui / consts / const-int-overflowing.rs
1 fn main() {
2     let x: &'static (i32, bool) = &(5_i32.overflowing_add(3));
3     //~^ ERROR temporary value dropped while borrowed
4     let y: &'static (i32, bool) = &(5_i32.overflowing_sub(3));
5     //~^ ERROR temporary value dropped while borrowed
6     let z: &'static (i32, bool) = &(5_i32.overflowing_mul(3));
7     //~^ ERROR temporary value dropped while borrowed
8 }