]> git.proxmox.com Git - rustc.git/blame - src/test/ui/static/static-lifetime-bound.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / static / static-lifetime-bound.stderr
CommitLineData
b7449926 1warning: unnecessary lifetime parameter `'a`
0731742a 2 --> $DIR/static-lifetime-bound.rs:1:6
b7449926 3 |
532ac7d7 4LL | fn f<'a: 'static>(_: &'a i32) {}
b7449926
XL
5 | ^^^^^^^^^^^
6 |
7 = help: you can use the `'static` lifetime directly, in place of `'a`
8
9error[E0597]: `x` does not live long enough
48663c56 10 --> $DIR/static-lifetime-bound.rs:5:7
b7449926 11 |
532ac7d7 12LL | f(&x);
48663c56
XL
13 | --^^-
14 | | |
15 | | borrowed value does not live long enough
16 | argument requires that `x` is borrowed for `'static`
b7449926 17LL | }
48663c56 18 | - `x` dropped here while still borrowed
b7449926 19
ba9703b0 20error: aborting due to previous error; 1 warning emitted
b7449926
XL
21
22For more information about this error, try `rustc --explain E0597`.