fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements 2 --> $DIR/mismatched_trait_impl-2.rs:8:5 3 | 4LL | fn deref(&self) -> &dyn Trait { 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | 7note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5... 8 --> $DIR/mismatched_trait_impl-2.rs:8:5 9 | 10LL | / fn deref(&self) -> &dyn Trait { 11LL | | unimplemented!(); 12LL | | } 13 | |_____^ 14 = note: ...but the lifetime must also be valid for the static lifetime... 15 = note: ...so that the method type is compatible with trait: 16 expected fn(&Struct) -> &(dyn Trait + 'static) 17 found fn(&Struct) -> &dyn Trait 18 19error: aborting due to previous error 20