]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr
diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut
[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 help: consider introducing a named lifetime parameter
9    |
10 LL ~ fn main<'a>() {
11 LL |     eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
12 LL |           dyn Foo(&isize) -> &isize                                   >();
13 LL |     eq::< dyn for<'a> Foo<(&'a isize,), Output=(&'a isize, &'a isize)>,
14 LL |           dyn Foo(&isize) -> (&isize, &isize)                           >();
15 LL | 
16  ...
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0106`.