]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-addr-of-arg.stderr
New upstream version 1.35.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-addr-of-arg.stderr
CommitLineData
b7449926 1error[E0597]: `a` does not live long enough
0731742a 2 --> $DIR/regions-addr-of-arg.rs:5:31
b7449926 3 |
532ac7d7 4LL | let _p: &'static isize = &a;
b7449926
XL
5 | ^ borrowed value does not live long enough
6LL | }
7 | - borrowed value only lives until here
8 |
9 = note: borrowed value must be valid for the static lifetime...
10
11error[E0597]: `a` does not live long enough
0731742a 12 --> $DIR/regions-addr-of-arg.rs:13:6
b7449926 13 |
532ac7d7 14LL | &a
b7449926
XL
15 | ^ borrowed value does not live long enough
16LL | }
17 | - borrowed value only lives until here
18 |
0731742a
XL
19note: borrowed value must be valid for the lifetime 'a as defined on the function body at 12:8...
20 --> $DIR/regions-addr-of-arg.rs:12:8
b7449926
XL
21 |
22LL | fn zed<'a>(a: isize) -> &'a isize {
23 | ^^
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0597`.