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