2019-06-14 08:55:36 -05:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/const-eval-intrinsic-promotion.rs:5:10
|
|
|
|
|
|
|
|
|
LL | let x: &'static usize =
|
|
|
|
| -------------- type annotation requires that borrow lasts for `'static`
|
|
|
|
LL | &std::intrinsics::size_of::<i32>();
|
2022-10-20 10:43:27 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
|
2019-06-14 08:55:36 -05:00
|
|
|
LL | }
|
|
|
|
| - temporary value is freed at the end of this statement
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-06-14 08:55:36 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0716`.
|