]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-int-wrapping.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-int-wrapping.stderr
CommitLineData
48663c56 1error[E0716]: temporary value dropped while borrowed
0731742a 2 --> $DIR/const-int-wrapping.rs:2:28
b7449926 3 |
532ac7d7 4LL | let x: &'static i32 = &(5_i32.wrapping_add(3));
48663c56
XL
5 | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
6 | |
7 | type annotation requires that borrow lasts for `'static`
b7449926
XL
8...
9LL | }
48663c56 10 | - temporary value is freed at the end of this statement
b7449926 11
48663c56
XL
12error[E0716]: temporary value dropped while borrowed
13 --> $DIR/const-int-wrapping.rs:4:28
b7449926 14 |
532ac7d7 15LL | let y: &'static i32 = &(5_i32.wrapping_sub(3));
48663c56
XL
16 | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
17 | |
18 | type annotation requires that borrow lasts for `'static`
b7449926
XL
19...
20LL | }
48663c56 21 | - temporary value is freed at the end of this statement
b7449926 22
48663c56
XL
23error[E0716]: temporary value dropped while borrowed
24 --> $DIR/const-int-wrapping.rs:6:28
b7449926 25 |
532ac7d7 26LL | let z: &'static i32 = &(5_i32.wrapping_mul(3));
48663c56
XL
27 | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
28 | |
29 | type annotation requires that borrow lasts for `'static`
b7449926
XL
30...
31LL | }
48663c56 32 | - temporary value is freed at the end of this statement
b7449926 33
48663c56
XL
34error[E0716]: temporary value dropped while borrowed
35 --> $DIR/const-int-wrapping.rs:8:28
b7449926 36 |
532ac7d7 37LL | let a: &'static i32 = &(5_i32.wrapping_shl(3));
48663c56
XL
38 | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
39 | |
40 | type annotation requires that borrow lasts for `'static`
41...
b7449926 42LL | }
48663c56 43 | - temporary value is freed at the end of this statement
b7449926 44
48663c56
XL
45error[E0716]: temporary value dropped while borrowed
46 --> $DIR/const-int-wrapping.rs:10:28
b7449926 47 |
532ac7d7 48LL | let b: &'static i32 = &(5_i32.wrapping_shr(3));
48663c56
XL
49 | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
50 | |
51 | type annotation requires that borrow lasts for `'static`
52LL |
b7449926 53LL | }
48663c56 54 | - temporary value is freed at the end of this statement
b7449926
XL
55
56error: aborting due to 5 previous errors
57
48663c56 58For more information about this error, try `rustc --explain E0716`.