fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0261]: use of undeclared lifetime name `'short` 2 --> $DIR/issue-107090.rs:4:9 3 | 4LL | Foo<'short, 'out, T>: Convert<'a, 'b>; 5 | ^^^^^^ undeclared lifetime 6 | 7 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html 8help: consider making the bound lifetime-generic with a new `'short` lifetime 9 | 10LL | for<'short> Foo<'short, 'out, T>: Convert<'a, 'b>; 11 | +++++++++++ 12help: consider introducing lifetime `'short` here 13 | 14LL | struct Foo<'short, 'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>) 15 | +++++++ 16 17error[E0261]: use of undeclared lifetime name `'out` 18 --> $DIR/issue-107090.rs:4:17 19 | 20LL | Foo<'short, 'out, T>: Convert<'a, 'b>; 21 | ^^^^ undeclared lifetime 22 | 23help: consider making the bound lifetime-generic with a new `'out` lifetime 24 | 25LL | for<'out> Foo<'short, 'out, T>: Convert<'a, 'b>; 26 | +++++++++ 27help: consider introducing lifetime `'out` here 28 | 29LL | struct Foo<'out, 'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>) 30 | +++++ 31 32error[E0261]: use of undeclared lifetime name `'b` 33 --> $DIR/issue-107090.rs:11:47 34 | 35LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> { 36 | - ^^ undeclared lifetime 37 | | 38 | help: consider introducing lifetime `'b` here: `'b,` 39 40error[E0261]: use of undeclared lifetime name `'out` 41 --> $DIR/issue-107090.rs:11:67 42 | 43LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> { 44 | - help: consider introducing lifetime `'out` here: `'out,` ^^^^ undeclared lifetime 45 46error[E0261]: use of undeclared lifetime name `'out` 47 --> $DIR/issue-107090.rs:14:49 48 | 49LL | fn cast(&'long self) -> &'short Foo<'short, 'out, T> { 50 | ^^^^ undeclared lifetime 51 | 52help: consider introducing lifetime `'out` here 53 | 54LL | fn cast<'out>(&'long self) -> &'short Foo<'short, 'out, T> { 55 | ++++++ 56help: consider introducing lifetime `'out` here 57 | 58LL | impl<'out, 'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> { 59 | +++++ 60 61error[E0261]: use of undeclared lifetime name `'short` 62 --> $DIR/issue-107090.rs:20:68 63 | 64LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T { 65 | - ^^^^^^ undeclared lifetime 66 | | 67 | help: consider introducing lifetime `'short` here: `'short,` 68 69error[E0308]: mismatched types 70 --> $DIR/issue-107090.rs:22:5 71 | 72LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T { 73 | - this type parameter ------- expected `&'out T` because of return type 74LL | 75LL | sadness.cast() 76 | ^^^^^^^^^^^^^^ expected `&T`, found `&Foo<'_, '_, T>` 77 | 78 = note: expected reference `&'out T` 79 found reference `&Foo<'_, '_, T>` 80 81error: aborting due to 7 previous errors 82 83Some errors have detailed explanations: E0261, E0308. 84For more information about an error, try `rustc --explain E0261`.