]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / generic_associated_type_undeclared_lifetimes.stderr
1 error[E0261]: use of undeclared lifetime name `'b`
2   --> $DIR/generic_associated_type_undeclared_lifetimes.rs:8:37
3    |
4 LL |         + Deref<Target = Self::Item<'b>>;
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 `'b` lifetime
9    |
10 LL |         + for<'b> Deref<Target = Self::Item<'b>>;
11    |           +++++++
12 help: consider introducing lifetime `'b` here
13    |
14 LL |     type Iter<'b, 'a>: Iterator<Item = Self::Item<'a>>
15    |               +++
16 help: consider introducing lifetime `'b` here
17    |
18 LL | trait Iterable<'b> {
19    |               ++++
20
21 error[E0261]: use of undeclared lifetime name `'undeclared`
22   --> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:41
23    |
24 LL |     fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
25    |                                         ^^^^^^^^^^^ undeclared lifetime
26    |
27 help: consider introducing lifetime `'undeclared` here
28    |
29 LL |     fn iter<'undeclared, 'a>(&'a self) -> Self::Iter<'undeclared>;
30    |             ++++++++++++
31 help: consider introducing lifetime `'undeclared` here
32    |
33 LL | trait Iterable<'undeclared> {
34    |               +++++++++++++
35
36 error: aborting due to 2 previous errors
37
38 For more information about this error, try `rustc --explain E0261`.