]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0716]: temporary value dropped while borrowed |
0731742a | 2 | --> $DIR/const-int-wrapping.rs:2:28 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | 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 | ... |
9 | LL | } | |
48663c56 | 10 | | - temporary value is freed at the end of this statement |
b7449926 | 11 | |
48663c56 XL |
12 | error[E0716]: temporary value dropped while borrowed |
13 | --> $DIR/const-int-wrapping.rs:4:28 | |
b7449926 | 14 | | |
532ac7d7 | 15 | LL | 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 | ... |
20 | LL | } | |
48663c56 | 21 | | - temporary value is freed at the end of this statement |
b7449926 | 22 | |
48663c56 XL |
23 | error[E0716]: temporary value dropped while borrowed |
24 | --> $DIR/const-int-wrapping.rs:6:28 | |
b7449926 | 25 | | |
532ac7d7 | 26 | LL | 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 | ... |
31 | LL | } | |
48663c56 | 32 | | - temporary value is freed at the end of this statement |
b7449926 | 33 | |
48663c56 XL |
34 | error[E0716]: temporary value dropped while borrowed |
35 | --> $DIR/const-int-wrapping.rs:8:28 | |
b7449926 | 36 | | |
532ac7d7 | 37 | LL | 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 | 42 | LL | } |
48663c56 | 43 | | - temporary value is freed at the end of this statement |
b7449926 | 44 | |
48663c56 XL |
45 | error[E0716]: temporary value dropped while borrowed |
46 | --> $DIR/const-int-wrapping.rs:10:28 | |
b7449926 | 47 | | |
532ac7d7 | 48 | LL | 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` | |
52 | LL | | |
b7449926 | 53 | LL | } |
48663c56 | 54 | | - temporary value is freed at the end of this statement |
b7449926 XL |
55 | |
56 | error: aborting due to 5 previous errors | |
57 | ||
48663c56 | 58 | For more information about this error, try `rustc --explain E0716`. |