summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-name-undeclared.stderr
blob: 532603de5f783f2b8d4939b2977d9f09be01fff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
error[E0261]: use of undeclared lifetime name `'b`
  --> $DIR/regions-name-undeclared.rs:16:24
   |
LL |     fn m4(&self, arg: &'b isize) { }
   |                        ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL |     fn m4<'b>(&self, arg: &'b isize) { }
   |          ++++
help: consider introducing lifetime `'b` here
   |
LL | impl<'b, 'a> Foo<'a> {
   |      +++

error[E0261]: use of undeclared lifetime name `'b`
  --> $DIR/regions-name-undeclared.rs:17:12
   |
LL |     fn m5(&'b self) { }
   |            ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL |     fn m5<'b>(&'b self) { }
   |          ++++
help: consider introducing lifetime `'b` here
   |
LL | impl<'b, 'a> Foo<'a> {
   |      +++

error[E0261]: use of undeclared lifetime name `'b`
  --> $DIR/regions-name-undeclared.rs:18:27
   |
LL |     fn m6(&self, arg: Foo<'b>) { }
   |                           ^^ undeclared lifetime
   |
help: consider introducing lifetime `'b` here
   |
LL |     fn m6<'b>(&self, arg: Foo<'b>) { }
   |          ++++
help: consider introducing lifetime `'b` here
   |
LL | impl<'b, 'a> Foo<'a> {
   |      +++

error[E0401]: can't use generic parameters from outer item
  --> $DIR/regions-name-undeclared.rs:26:22
   |
LL | fn bar<'a>(x: &'a isize) {
   |        -- lifetime parameter from outer item
...
LL |     type X = Option<&'a isize>;
   |           -          ^^ use of generic parameter from outer item
   |           |
   |           help: consider introducing lifetime `'a` here: `<'a>`

error[E0401]: can't use generic parameters from outer item
  --> $DIR/regions-name-undeclared.rs:28:13
   |
LL | fn bar<'a>(x: &'a isize) {
   |        -- lifetime parameter from outer item
...
LL |     enum E {
   |           - help: consider introducing lifetime `'a` here: `<'a>`
LL |         E1(&'a isize)
   |             ^^ use of generic parameter from outer item

error[E0401]: can't use generic parameters from outer item
  --> $DIR/regions-name-undeclared.rs:31:13
   |
LL | fn bar<'a>(x: &'a isize) {
   |        -- lifetime parameter from outer item
...
LL |     struct S {
   |             - help: consider introducing lifetime `'a` here: `<'a>`
LL |         f: &'a isize
   |             ^^ use of generic parameter from outer item

error[E0401]: can't use generic parameters from outer item
  --> $DIR/regions-name-undeclared.rs:33:14
   |
LL | fn bar<'a>(x: &'a isize) {
   |        -- lifetime parameter from outer item
...
LL |     fn f(a: &'a isize) { }
   |         -    ^^ use of generic parameter from outer item
   |         |
   |         help: consider introducing lifetime `'a` here: `<'a>`

error[E0261]: use of undeclared lifetime name `'a`
  --> $DIR/regions-name-undeclared.rs:41:17
   |
LL | fn fn_types(a: &'a isize,
   |            -    ^^ undeclared lifetime
   |            |
   |            help: consider introducing lifetime `'a` here: `<'a>`

error[E0261]: use of undeclared lifetime name `'b`
  --> $DIR/regions-name-undeclared.rs:43:36
   |
LL | ...                   &'b isize,
   |                        ^^ undeclared lifetime
   |
   = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'b` lifetime
   |
LL |             b: Box<dyn for<'b, 'a> FnOnce(&'a isize,
   |                            +++
help: consider introducing lifetime `'b` here
   |
LL | fn fn_types<'b>(a: &'a isize,
   |            ++++

error[E0261]: use of undeclared lifetime name `'b`
  --> $DIR/regions-name-undeclared.rs:46:36
   |
LL | ...                   &'b isize)>,
   |                        ^^ undeclared lifetime
   |
help: consider making the bound lifetime-generic with a new `'b` lifetime
   |
LL |             b: Box<dyn for<'b, 'a> FnOnce(&'a isize,
   |                            +++
help: consider introducing lifetime `'b` here
   |
LL | fn fn_types<'b>(a: &'a isize,
   |            ++++

error[E0261]: use of undeclared lifetime name `'a`
  --> $DIR/regions-name-undeclared.rs:47:17
   |
LL | fn fn_types(a: &'a isize,
   |            - help: consider introducing lifetime `'a` here: `<'a>`
...
LL |             c: &'a isize)
   |                 ^^ undeclared lifetime

error[E0261]: use of undeclared lifetime name `'a`
  --> $DIR/regions-name-undeclared.rs:53:31
   |
LL |     async fn buggy(&self) -> &'a str {
   |                               ^^ undeclared lifetime
   |
help: consider introducing lifetime `'a` here
   |
LL |     async fn buggy<'a>(&self) -> &'a str {
   |                   ++++
help: consider introducing lifetime `'a` here
   |
LL | impl<'a> Bug {
   |     ++++

error: aborting due to 12 previous errors

Some errors have detailed explanations: E0261, E0401.
For more information about an error, try `rustc --explain E0261`.