fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.0 KiB24 linesraw
1error[E0106]: missing lifetime specifier
2  --> $DIR/unboxed-closure-sugar-lifetime-elision.rs:26:39
3   |
4LL |     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
9help: consider making the bound lifetime-generic with a new `'a` lifetime
10   |
11LL |     let _: dyn for<'a> Foo(&'a isize, &'a usize) -> &'a usize;
12   |                +++++++      ++         ++            ++
13help: consider introducing a named lifetime parameter
14   |
15LL ~ fn main<'a>() {
16LL |     eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
17 ...
18LL | 
19LL ~     let _: dyn Foo(&'a isize, &'a usize) -> &'a usize;
20   |
21
22error: aborting due to previous error
23
24For more information about this error, try `rustc --explain E0106`.