]> git.lizzy.rs Git - rust.git/blob - tests/ui/where-clauses/where-lifetime-resolution.stderr
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / where-clauses / where-lifetime-resolution.stderr
1 error[E0261]: use of undeclared lifetime name `'a`
2   --> $DIR/where-lifetime-resolution.rs:6:38
3    |
4 LL |     (dyn for<'a> Trait1<'a>): Trait1<'a>,
5    |                                      ^^ undeclared lifetime
6    |
7    = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
8 help: consider making the bound lifetime-generic with a new `'a` lifetime
9    |
10 LL |     (dyn for<'a> Trait1<'a>): for<'a> Trait1<'a>,
11    |                               +++++++
12 help: consider making the bound lifetime-generic with a new `'a` lifetime
13    |
14 LL |     for<'a> (dyn for<'a> Trait1<'a>): Trait1<'a>,
15    |     +++++++
16 help: consider introducing lifetime `'a` here
17    |
18 LL | fn f<'a>() where
19    |     ++++
20
21 error[E0261]: use of undeclared lifetime name `'b`
22   --> $DIR/where-lifetime-resolution.rs:8:52
23    |
24 LL |     for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
25    |                                                    ^^ undeclared lifetime
26    |
27 help: consider making the bound lifetime-generic with a new `'b` lifetime
28    |
29 LL |     for<'a> dyn for<'b> Trait2<'a, 'b>: for<'b> Trait2<'a, 'b>,
30    |                                         +++++++
31 help: consider making the bound lifetime-generic with a new `'b` lifetime
32    |
33 LL |     for<'b, 'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
34    |         +++
35 help: consider introducing lifetime `'b` here
36    |
37 LL | fn f<'b>() where
38    |     ++++
39
40 error: aborting due to 2 previous errors
41
42 For more information about this error, try `rustc --explain E0261`.