]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/return-without-lifetime.stderr
Rollup merge of #65276 - varkor:toolstate-no-ping, r=Mark-Simulacrum
[rust.git] / src / test / ui / suggestions / return-without-lifetime.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/return-without-lifetime.rs:2:16
3    |
4 LL | struct Foo<'a>(&usize);
5    |                ^ help: consider using the named lifetime: `&'a`
6
7 error[E0106]: missing lifetime specifier
8   --> $DIR/return-without-lifetime.rs:5:34
9    |
10 LL | fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() }
11    |                                  ^ help: consider using the named lifetime: `&'a`
12    |
13    = help: this function's return type contains a borrowed value, but the signature does not say which one of `_arg`'s 2 lifetimes it is borrowed from
14
15 error[E0106]: missing lifetime specifier
16   --> $DIR/return-without-lifetime.rs:7:35
17    |
18 LL | fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() }
19    |                                   ^ help: consider using the named lifetime: `&'a`
20    |
21    = help: this function's return type contains a borrowed value, but the signature does not say which one of `_arg`'s 2 lifetimes it is borrowed from
22
23 error: aborting due to 3 previous errors
24
25 For more information about this error, try `rustc --explain E0106`.