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