fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
872 B26 linesraw
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   |              ^
23
24error: aborting due to 2 previous errors
25
26For more information about this error, try `rustc --explain E0106`.