]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/control-flow/interior-mutability.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / consts / control-flow / interior-mutability.stderr
1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/interior-mutability.rs:44:26
3 |
4 LL | let x: &'static _ = &X;
5 | ---------- ^ creates a temporary which is freed while still in use
6 | |
7 | type annotation requires that borrow lasts for `'static`
8 ...
9 LL | }
10 | - temporary value is freed at the end of this statement
11
12 error[E0716]: temporary value dropped while borrowed
13 --> $DIR/interior-mutability.rs:45:26
14 |
15 LL | let y: &'static _ = &Y;
16 | ---------- ^ creates a temporary which is freed while still in use
17 | |
18 | type annotation requires that borrow lasts for `'static`
19 LL | let z: &'static _ = &Z;
20 LL | }
21 | - temporary value is freed at the end of this statement
22
23 error[E0716]: temporary value dropped while borrowed
24 --> $DIR/interior-mutability.rs:46:26
25 |
26 LL | let z: &'static _ = &Z;
27 | ---------- ^ creates a temporary which is freed while still in use
28 | |
29 | type annotation requires that borrow lasts for `'static`
30 LL | }
31 | - temporary value is freed at the end of this statement
32
33 error: aborting due to 3 previous errors
34
35 For more information about this error, try `rustc --explain E0716`.