]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0716]: temporary value dropped while borrowed |
5e7ed085 | 2 | --> $DIR/transmute-const-promotion.rs:4:37 |
8faf50e0 | 3 | | |
b7449926 | 4 | LL | let x: &'static u32 = unsafe { &mem::transmute(3.0f32) }; |
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` | |
532ac7d7 | 8 | LL | |
8faf50e0 | 9 | LL | } |
48663c56 | 10 | | - temporary value is freed at the end of this statement |
8faf50e0 XL |
11 | |
12 | error: aborting due to previous error | |
13 | ||
48663c56 | 14 | For more information about this error, try `rustc --explain E0716`. |