fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements 2 --> $DIR/issue-55394.rs:9:9 3 | 4LL | Foo { bar } 5 | ^^^ 6 | 7note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5... 8 --> $DIR/issue-55394.rs:8:5 9 | 10LL | / fn new(bar: &mut Bar) -> Self { 11LL | | Foo { bar } 12LL | | } 13 | |_____^ 14note: ...so that reference does not outlive borrowed content 15 --> $DIR/issue-55394.rs:9:15 16 | 17LL | Foo { bar } 18 | ^^^ 19note: but, the lifetime must be valid for the lifetime `'_` as defined on the impl at 7:10... 20 --> $DIR/issue-55394.rs:7:10 21 | 22LL | impl Foo<'_> { 23 | ^^ 24note: ...so that the expression is assignable 25 --> $DIR/issue-55394.rs:9:9 26 | 27LL | Foo { bar } 28 | ^^^^^^^^^^^ 29 = note: expected `Foo<'_>` 30 found `Foo<'_>` 31 32error: aborting due to previous error 33 34For more information about this error, try `rustc --explain E0495`.