]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generics/generic-extern-lifetime.stderr
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / generics / generic-extern-lifetime.stderr
1 error[E0261]: use of undeclared lifetime name `'a`
2   --> $DIR/generic-extern-lifetime.rs:6:26
3    |
4 LL |     pub fn life2<'b>(x: &'a i32, y: &'b i32);
5    |                  -       ^^ undeclared lifetime
6    |                  |
7    |                  help: consider introducing lifetime `'a` here: `'a,`
8
9 error[E0261]: use of undeclared lifetime name `'a`
10   --> $DIR/generic-extern-lifetime.rs:8:37
11    |
12 LL |     pub fn life4<'b>(x: for<'c> fn(&'a i32));
13    |                                     ^^ undeclared lifetime
14    |
15    = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
16 help: consider making the type lifetime-generic with a new `'a` lifetime
17    |
18 LL |     pub fn life4<'b>(x: for<'a, 'c> fn(&'a i32));
19    |                             +++
20 help: consider introducing lifetime `'a` here
21    |
22 LL |     pub fn life4<'a, 'b>(x: for<'c> fn(&'a i32));
23    |                  +++
24
25 error[E0261]: use of undeclared lifetime name `'a`
26   --> $DIR/generic-extern-lifetime.rs:11:39
27    |
28 LL |     pub fn life7<'b>() -> for<'c> fn(&'a i32);
29    |                                       ^^ undeclared lifetime
30    |
31 help: consider making the type lifetime-generic with a new `'a` lifetime
32    |
33 LL |     pub fn life7<'b>() -> for<'a, 'c> fn(&'a i32);
34    |                               +++
35 help: consider introducing lifetime `'a` here
36    |
37 LL |     pub fn life7<'a, 'b>() -> for<'c> fn(&'a i32);
38    |                  +++
39
40 error: aborting due to 3 previous errors
41
42 For more information about this error, try `rustc --explain E0261`.