]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-static-bound.ll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / regions / regions-static-bound.ll.stderr
1 error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2 --> $DIR/regions-static-bound.rs:19:5
3 |
4 LL | t //[ll]~ ERROR E0312
5 | ^
6 |
7 = note: ...the reference is valid for the static lifetime...
8 note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 18:24
9 --> $DIR/regions-static-bound.rs:18:24
10 |
11 LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
12 | ^^
13
14 error[E0621]: explicit lifetime required in the type of `u`
15 --> $DIR/regions-static-bound.rs:24:5
16 |
17 LL | fn error(u: &(), v: &()) {
18 | --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()`
19 LL | static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621]
20 | ^^^^^^^^^ lifetime `'static` required
21
22 error[E0621]: explicit lifetime required in the type of `v`
23 --> $DIR/regions-static-bound.rs:26:5
24 |
25 LL | fn error(u: &(), v: &()) {
26 | --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()`
27 ...
28 LL | static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621]
29 | ^^^^^^^^^^^^^^^^^^ lifetime `'static` required
30
31 error: aborting due to 3 previous errors
32
33 Some errors occurred: E0312, E0621.
34 For more information about an error, try `rustc --explain E0312`.