]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0716]: temporary value dropped while borrowed |
3c0e092e | 2 | --> $DIR/promoted_raw_ptr_ops.rs:2:29 |
b7449926 XL |
3 | | |
4 | LL | let x: &'static bool = &(42 as *const i32 == 43 as *const i32); | |
487cf647 | 5 | | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use |
48663c56 XL |
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 | 12 | error[E0716]: temporary value dropped while borrowed |
3c0e092e | 13 | --> $DIR/promoted_raw_ptr_ops.rs:4:30 |
b7449926 | 14 | | |
532ac7d7 | 15 | LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); |
487cf647 | 16 | | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use |
48663c56 XL |
17 | | | |
18 | | type annotation requires that borrow lasts for `'static` | |
0bf4aa26 | 19 | ... |
b7449926 | 20 | LL | } |
48663c56 | 21 | | - temporary value is freed at the end of this statement |
b7449926 | 22 | |
48663c56 | 23 | error[E0716]: temporary value dropped while borrowed |
3c0e092e | 24 | --> $DIR/promoted_raw_ptr_ops.rs:6:28 |
b7449926 | 25 | | |
532ac7d7 | 26 | LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); |
487cf647 | 27 | | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use |
48663c56 XL |
28 | | | |
29 | | type annotation requires that borrow lasts for `'static` | |
30 | ... | |
0bf4aa26 | 31 | LL | } |
48663c56 | 32 | | - temporary value is freed at the end of this statement |
0bf4aa26 | 33 | |
48663c56 | 34 | error[E0716]: temporary value dropped while borrowed |
3c0e092e | 35 | --> $DIR/promoted_raw_ptr_ops.rs:8:29 |
0bf4aa26 | 36 | | |
532ac7d7 | 37 | LL | let a: &'static bool = &(main as fn() == main as fn()); |
487cf647 | 38 | | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use |
48663c56 XL |
39 | | | |
40 | | type annotation requires that borrow lasts for `'static` | |
41 | LL | | |
b7449926 | 42 | LL | } |
48663c56 | 43 | | - temporary value is freed at the end of this statement |
b7449926 | 44 | |
0bf4aa26 | 45 | error: aborting due to 4 previous errors |
b7449926 | 46 | |
48663c56 | 47 | For more information about this error, try `rustc --explain E0716`. |