2019-11-17 23:11:42 -06:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/interior-mutability.rs:40:26
|
2019-11-17 23:11:42 -06:00
|
|
|
|
|
|
|
|
LL | let x: &'static _ = &X;
|
2022-10-20 10:43:27 -05:00
|
|
|
| ---------- ^ creates a temporary value which is freed while still in use
|
2019-11-17 23:11:42 -06:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
2019-12-10 23:11:53 -06:00
|
|
|
...
|
2019-11-17 23:11:42 -06:00
|
|
|
LL | }
|
|
|
|
| - temporary value is freed at the end of this statement
|
|
|
|
|
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/interior-mutability.rs:41:26
|
2019-11-17 23:11:42 -06:00
|
|
|
|
|
|
|
|
LL | let y: &'static _ = &Y;
|
2022-10-20 10:43:27 -05:00
|
|
|
| ---------- ^ creates a temporary value which is freed while still in use
|
2019-11-17 23:11:42 -06:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
2019-12-10 23:11:53 -06:00
|
|
|
LL | let z: &'static _ = &Z;
|
|
|
|
LL | }
|
|
|
|
| - temporary value is freed at the end of this statement
|
|
|
|
|
|
|
|
error[E0716]: temporary value dropped while borrowed
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/interior-mutability.rs:42:26
|
2019-12-10 23:11:53 -06:00
|
|
|
|
|
|
|
|
LL | let z: &'static _ = &Z;
|
2022-10-20 10:43:27 -05:00
|
|
|
| ---------- ^ creates a temporary value which is freed while still in use
|
2019-12-10 23:11:53 -06:00
|
|
|
| |
|
|
|
|
| type annotation requires that borrow lasts for `'static`
|
2019-11-17 23:11:42 -06:00
|
|
|
LL | }
|
|
|
|
| - temporary value is freed at the end of this statement
|
|
|
|
|
2019-12-10 23:11:53 -06:00
|
|
|
error: aborting due to 3 previous errors
|
2019-11-17 23:11:42 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0716`.
|