fork/rust

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

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

master
1.6 KiB36 linesraw
1error[E0106]: missing lifetime specifiers
2  --> $DIR/missing-lt-for-hrtb.rs:2:32
3   |
4LL | struct S<'a>(&'a dyn Fn(&X) -> &X);
5   |                         --     ^^ expected named lifetime parameter
6   |                                |
7   |                                expected named lifetime parameter
8   |
9   = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
10help: consider using the `'a` lifetime
11   |
12LL | struct S<'a>(&'a dyn Fn(&X) -> &'a X<'a>);
13   |                                 ++  ++++
14
15error[E0106]: missing lifetime specifiers
16  --> $DIR/missing-lt-for-hrtb.rs:4:40
17   |
18LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
19   |                                 --     ^^ expected named lifetime parameter
20   |                                        |
21   |                                        expected named lifetime parameter
22   |
23   = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
24note: these named lifetimes are available to use
25  --> $DIR/missing-lt-for-hrtb.rs:4:10
26   |
27LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
28   |          ^^              ^^
29help: consider using one of the available lifetimes here
30   |
31LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &'lifetime X<'lifetime>);
32   |                                         +++++++++  +++++++++++
33
34error: aborting due to 2 previous errors
35
36For more information about this error, try `rustc --explain E0106`.