rust/tests/ui/consts/control-flow/interior-mutability.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0716]: temporary value dropped while borrowed
2020-06-25 19:43:48 -05:00
--> $DIR/interior-mutability.rs:40:26
|
LL | let x: &'static _ = &X;
| ---------- ^ creates a temporary value which is freed while still in use
| |
| type annotation requires that borrow lasts for `'static`
2019-12-10 23:11:53 -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
|
LL | let y: &'static _ = &Y;
| ---------- ^ creates a temporary value which is freed while still in use
| |
| 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;
| ---------- ^ 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`
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
For more information about this error, try `rustc --explain E0716`.