fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0106]: missing lifetime specifier 2 --> $DIR/issue-63388-2.rs:12:10 3 | 4LL | ) -> &dyn Foo 5 | ^ help: consider using the named lifetime: `&'a` 6 | 7 = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `foo` or `bar` 8 9error: cannot infer an appropriate lifetime 10 --> $DIR/issue-63388-2.rs:11:9 11 | 12LL | foo: &dyn Foo, bar: &'a dyn Foo 13 | ^^^ ...but this borrow... 14... 15LL | foo 16 | --- this return type evaluates to the `'static` lifetime... 17 | 18note: ...can't outlive the lifetime `'_` as defined on the method body at 11:14 19 --> $DIR/issue-63388-2.rs:11:14 20 | 21LL | foo: &dyn Foo, bar: &'a dyn Foo 22 | ^ 23help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime `'_` as defined on the method body at 11:14 24 | 25LL | foo + '_ 26 | 27 28error: aborting due to 2 previous errors 29 30For more information about this error, try `rustc --explain E0106`.