]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-static-bound.ll.nll.stderr
Change NLL compare mode to borrowck=migrate.
[rust.git] / src / test / ui / regions / regions-static-bound.ll.nll.stderr
1 error: unsatisfied lifetime constraints
2   --> $DIR/regions-static-bound.rs:19:5
3    |
4 LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
5    |                        -- lifetime `'a` defined here
6 LL |     t //[ll]~ ERROR E0312
7    |     ^ returning this value requires that `'a` must outlive `'static`
8
9 error[E0621]: explicit lifetime required in the type of `u`
10   --> $DIR/regions-static-bound.rs:24:5
11    |
12 LL | fn error(u: &(), v: &()) {
13    |             --- help: add explicit lifetime `'static` to the type of `u`: `&'static ()`
14 LL |     static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621]
15    |     ^^^^^^^^^^^^^ lifetime `'static` required
16
17 error[E0621]: explicit lifetime required in the type of `v`
18   --> $DIR/regions-static-bound.rs:27:5
19    |
20 LL | fn error(u: &(), v: &()) {
21    |                     --- help: add explicit lifetime `'static` to the type of `v`: `&'static ()`
22 ...
23 LL |     static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621]
24    |     ^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
25
26 error: unsatisfied lifetime constraints
27   --> $DIR/regions-static-bound.rs:24:5
28    |
29 LL | fn error(u: &(), v: &()) {
30    |             -       - let's call the lifetime of this reference `'2`
31    |             |
32    |             let's call the lifetime of this reference `'1`
33 LL |     static_id(&u); //[ll]~ ERROR explicit lifetime required in the type of `u` [E0621]
34    |     ^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
35
36 error: unsatisfied lifetime constraints
37   --> $DIR/regions-static-bound.rs:27:5
38    |
39 LL | fn error(u: &(), v: &()) {
40    |             -       - let's call the lifetime of this reference `'1`
41    |             |
42    |             let's call the lifetime of this reference `'2`
43 ...
44 LL |     static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required in the type of `v` [E0621]
45    |     ^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
46
47 error: aborting due to 5 previous errors
48
49 For more information about this error, try `rustc --explain E0621`.