rust/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0106]: missing lifetime specifier
2019-05-28 18:46:13 +00:00
--> $DIR/unboxed-closure-sugar-lifetime-elision.rs:26:39
2018-08-08 12:28:26 +00:00
|
2019-05-28 18:46:13 +00:00
LL | let _: dyn Foo(&isize, &usize) -> &usize;
| ------ ------ ^ expected named lifetime parameter
2018-08-08 12:28:26 +00:00
|
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
2022-06-05 16:33:09 +00:00
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'a` lifetime
|
LL | let _: dyn for<'a> Foo(&'a isize, &'a usize) -> &'a usize;
| +++++++ ++ ++ ++
2020-01-17 06:05:31 +00:00
help: consider introducing a named lifetime parameter
|
LL ~ fn main<'a>() {
LL | eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
...
2022-06-06 15:26:50 +00:00
LL |
LL ~ let _: dyn Foo(&'a isize, &'a usize) -> &'a usize;
|
2018-08-08 12:28:26 +00:00
error: aborting due to 1 previous error
2018-08-08 12:28:26 +00:00
For more information about this error, try `rustc --explain E0106`.