]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
Rollup merge of #99692 - RalfJung:too-far, r=oli-obk
[rust.git] / src / test / ui / unboxed-closures / unboxed-closure-sugar-lifetime-elision.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/unboxed-closure-sugar-lifetime-elision.rs:26:39
3    |
4 LL |     let _: dyn Foo(&isize, &usize) -> &usize;
5    |                    ------  ------     ^ expected named lifetime parameter
6    |
7    = 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
8    = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
9 help: consider making the bound lifetime-generic with a new `'a` lifetime
10    |
11 LL |     let _: dyn for<'a> Foo(&'a isize, &'a usize) -> &'a usize;
12    |                +++++++      ++         ++            ++
13 help: consider introducing a named lifetime parameter
14    |
15 LL ~ fn main<'a>() {
16 LL |     eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
17  ...
18 LL | 
19 LL ~     let _: dyn Foo(&'a isize, &'a usize) -> &'a usize;
20    |
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0106`.