fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.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... 14LL | ) -> &dyn Foo 15 | -------- this return type evaluates to the `'static` lifetime... 16 | 17note: ...can't outlive the lifetime '_ as defined on the method body at 11:14 18 --> $DIR/issue-63388-2.rs:11:14 19 | 20LL | foo: &dyn Foo, bar: &'a dyn Foo 21 | ^ 22help: 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 23 | 24LL | ) -> &dyn Foo + '_ 25 | ^^^^^^^^^^^^^ 26 27error: aborting due to 2 previous errors 28 29For more information about this error, try `rustc --explain E0106`.