rust/tests/ui/inference/issue-107090.stderr

72 lines
2.7 KiB
Plaintext
Raw Normal View History

2023-01-18 03:28:19 -06:00
error[E0261]: use of undeclared lifetime name `'short`
--> $DIR/issue-107090.rs:4:9
|
LL | Foo<'short, 'out, T>: Convert<'a, 'b>;
| ^^^^^^ undeclared lifetime
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'short` lifetime
|
LL | for<'short> Foo<'short, 'out, T>: Convert<'a, 'b>;
| +++++++++++
help: consider introducing lifetime `'short` here
|
LL | struct Foo<'short, 'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>)
| +++++++
error[E0261]: use of undeclared lifetime name `'out`
--> $DIR/issue-107090.rs:4:17
|
LL | Foo<'short, 'out, T>: Convert<'a, 'b>;
| ^^^^ undeclared lifetime
|
help: consider making the bound lifetime-generic with a new `'out` lifetime
|
LL | for<'out> Foo<'short, 'out, T>: Convert<'a, 'b>;
| +++++++++
help: consider introducing lifetime `'out` here
|
LL | struct Foo<'out, 'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>)
| +++++
error[E0261]: use of undeclared lifetime name `'b`
2023-02-03 17:21:56 -06:00
--> $DIR/issue-107090.rs:11:47
2023-01-18 03:28:19 -06:00
|
LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
| - ^^ undeclared lifetime
| |
| help: consider introducing lifetime `'b` here: `'b,`
error[E0261]: use of undeclared lifetime name `'out`
2023-02-03 17:21:56 -06:00
--> $DIR/issue-107090.rs:11:67
2023-01-18 03:28:19 -06:00
|
LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
| - help: consider introducing lifetime `'out` here: `'out,` ^^^^ undeclared lifetime
error[E0261]: use of undeclared lifetime name `'out`
2023-02-03 17:21:56 -06:00
--> $DIR/issue-107090.rs:14:49
2023-01-18 03:28:19 -06:00
|
LL | fn cast(&'long self) -> &'short Foo<'short, 'out, T> {
| ^^^^ undeclared lifetime
|
help: consider introducing lifetime `'out` here
|
LL | fn cast<'out>(&'long self) -> &'short Foo<'short, 'out, T> {
| ++++++
help: consider introducing lifetime `'out` here
|
LL | impl<'out, 'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
| +++++
error[E0261]: use of undeclared lifetime name `'short`
2023-02-03 17:21:56 -06:00
--> $DIR/issue-107090.rs:20:68
2023-01-18 03:28:19 -06:00
|
LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
| - ^^^^^^ undeclared lifetime
| |
| help: consider introducing lifetime `'short` here: `'short,`
error: aborting due to 6 previous errors
2023-01-18 03:28:19 -06:00
For more information about this error, try `rustc --explain E0261`.