2019-03-12 16:57:13 -05:00
|
|
|
error[E0106]: missing lifetime specifier
|
2019-03-12 20:18:24 -05:00
|
|
|
--> $DIR/return-without-lifetime.rs:2:16
|
|
|
|
|
|
|
|
|
LL | struct Foo<'a>(&usize);
|
2020-04-16 23:33:42 -05:00
|
|
|
| ^ expected named lifetime parameter
|
|
|
|
|
|
2020-04-17 12:46:22 -05:00
|
|
|
help: consider using the `'a` lifetime
|
2020-04-16 23:33:42 -05:00
|
|
|
|
|
|
|
|
LL | struct Foo<'a>(&'a usize);
|
2022-06-05 11:33:09 -05:00
|
|
|
| ++
|
2019-03-12 20:18:24 -05:00
|
|
|
|
|
|
|
error[E0106]: missing lifetime specifier
|
|
|
|
--> $DIR/return-without-lifetime.rs:5:34
|
2019-03-12 16:57:13 -05:00
|
|
|
|
|
|
|
|
LL | fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() }
|
2020-04-16 23:33:42 -05:00
|
|
|
| --------- ^ expected named lifetime parameter
|
2019-03-12 16:57:13 -05:00
|
|
|
|
|
2020-01-27 18:13:45 -06:00
|
|
|
= 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
|
2020-04-17 12:46:22 -05:00
|
|
|
help: consider using the `'a` lifetime
|
2020-04-16 23:33:42 -05:00
|
|
|
|
|
|
|
|
LL | fn func1<'a>(_arg: &'a Thing) -> &'a () { unimplemented!() }
|
2022-06-05 11:33:09 -05:00
|
|
|
| ++
|
2019-03-12 16:57:13 -05:00
|
|
|
|
|
|
|
error[E0106]: missing lifetime specifier
|
2019-03-12 20:18:24 -05:00
|
|
|
--> $DIR/return-without-lifetime.rs:7:35
|
2019-03-12 16:57:13 -05:00
|
|
|
|
|
|
|
|
LL | fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() }
|
2020-04-16 23:33:42 -05:00
|
|
|
| ---------- ^ expected named lifetime parameter
|
2019-03-12 16:57:13 -05:00
|
|
|
|
|
2020-01-27 18:13:45 -06:00
|
|
|
= 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
|
2020-04-17 12:46:22 -05:00
|
|
|
help: consider using the `'a` lifetime
|
2020-04-16 23:33:42 -05:00
|
|
|
|
|
|
|
|
LL | fn func2<'a>(_arg: &Thing<'a>) -> &'a () { unimplemented!() }
|
2022-06-05 11:33:09 -05:00
|
|
|
| ++
|
2019-03-12 16:57:13 -05:00
|
|
|
|
2019-03-12 20:18:24 -05:00
|
|
|
error: aborting due to 3 previous errors
|
2019-03-12 16:57:13 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0106`.
|