fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0308]: mismatched types 2 --> $DIR/regions-infer-not-param.rs:15:54 3 | 4LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } 5 | ^ lifetime mismatch 6 | 7 = note: expected struct `Direct<'b>` 8 found struct `Direct<'a>` 9note: the lifetime `'a` as defined on the function body at 15:16... 10 --> $DIR/regions-infer-not-param.rs:15:16 11 | 12LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } 13 | ^^ 14note: ...does not necessarily outlive the lifetime `'b` as defined on the function body at 15:19 15 --> $DIR/regions-infer-not-param.rs:15:19 16 | 17LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } 18 | ^^ 19 20error[E0308]: mismatched types 21 --> $DIR/regions-infer-not-param.rs:19:63 22 | 23LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } 24 | ^ lifetime mismatch 25 | 26 = note: expected struct `Indirect2<'b>` 27 found struct `Indirect2<'a>` 28note: the lifetime `'a` as defined on the function body at 19:19... 29 --> $DIR/regions-infer-not-param.rs:19:19 30 | 31LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } 32 | ^^ 33note: ...does not necessarily outlive the lifetime `'b` as defined on the function body at 19:22 34 --> $DIR/regions-infer-not-param.rs:19:22 35 | 36LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } 37 | ^^ 38 39error[E0308]: mismatched types 40 --> $DIR/regions-infer-not-param.rs:19:63 41 | 42LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } 43 | ^ lifetime mismatch 44 | 45 = note: expected struct `Indirect2<'b>` 46 found struct `Indirect2<'a>` 47note: the lifetime `'b` as defined on the function body at 19:22... 48 --> $DIR/regions-infer-not-param.rs:19:22 49 | 50LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } 51 | ^^ 52note: ...does not necessarily outlive the lifetime `'a` as defined on the function body at 19:19 53 --> $DIR/regions-infer-not-param.rs:19:19 54 | 55LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } 56 | ^^ 57 58error: aborting due to 3 previous errors 59 60For more information about this error, try `rustc --explain E0308`.