]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-name-undeclared.stderr
Do not suggest using a const parameter when there are bounds on an unused type parameter
[rust.git] / src / test / ui / regions / regions-name-undeclared.stderr
1 error[E0261]: use of undeclared lifetime name `'a`
2   --> $DIR/regions-name-undeclared.rs:28:13
3    |
4 LL |     enum E {
5    |           - help: consider introducing lifetime `'a` here: `<'a>`
6 LL |         E1(&'a isize)
7    |             ^^ undeclared lifetime
8    |
9    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
10
11 error[E0261]: use of undeclared lifetime name `'a`
12   --> $DIR/regions-name-undeclared.rs:31:13
13    |
14 LL |     struct S {
15    |             - help: consider introducing lifetime `'a` here: `<'a>`
16 LL |         f: &'a isize
17    |             ^^ undeclared lifetime
18    |
19    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
20
21 error[E0261]: use of undeclared lifetime name `'b`
22   --> $DIR/regions-name-undeclared.rs:16:24
23    |
24 LL |     fn m4(&self, arg: &'b isize) { }
25    |                        ^^ undeclared lifetime
26    |
27    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
28 help: consider introducing lifetime `'b` here
29    |
30 LL | impl<'b, 'a> Foo<'a> {
31    |      +++
32 help: consider introducing lifetime `'b` here
33    |
34 LL |     fn m4<'b>(&self, arg: &'b isize) { }
35    |          ++++
36
37 error[E0261]: use of undeclared lifetime name `'b`
38   --> $DIR/regions-name-undeclared.rs:17:12
39    |
40 LL |     fn m5(&'b self) { }
41    |            ^^ undeclared lifetime
42    |
43    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
44 help: consider introducing lifetime `'b` here
45    |
46 LL | impl<'b, 'a> Foo<'a> {
47    |      +++
48 help: consider introducing lifetime `'b` here
49    |
50 LL |     fn m5<'b>(&'b self) { }
51    |          ++++
52
53 error[E0261]: use of undeclared lifetime name `'b`
54   --> $DIR/regions-name-undeclared.rs:18:27
55    |
56 LL |     fn m6(&self, arg: Foo<'b>) { }
57    |                           ^^ undeclared lifetime
58    |
59    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
60 help: consider introducing lifetime `'b` here
61    |
62 LL | impl<'b, 'a> Foo<'a> {
63    |      +++
64 help: consider introducing lifetime `'b` here
65    |
66 LL |     fn m6<'b>(&self, arg: Foo<'b>) { }
67    |          ++++
68
69 error[E0261]: use of undeclared lifetime name `'a`
70   --> $DIR/regions-name-undeclared.rs:26:22
71    |
72 LL |     type X = Option<&'a isize>;
73    |           -          ^^ undeclared lifetime
74    |           |
75    |           help: consider introducing lifetime `'a` here: `<'a>`
76    |
77    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
78
79 error[E0261]: use of undeclared lifetime name `'a`
80   --> $DIR/regions-name-undeclared.rs:33:14
81    |
82 LL |     fn f(a: &'a isize) { }
83    |         -    ^^ undeclared lifetime
84    |         |
85    |         help: consider introducing lifetime `'a` here: `<'a>`
86    |
87    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
88
89 error[E0261]: use of undeclared lifetime name `'a`
90   --> $DIR/regions-name-undeclared.rs:41:17
91    |
92 LL | fn fn_types(a: &'a isize,
93    |            -    ^^ undeclared lifetime
94    |            |
95    |            help: consider introducing lifetime `'a` here: `<'a>`
96    |
97    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
98
99 error[E0261]: use of undeclared lifetime name `'b`
100   --> $DIR/regions-name-undeclared.rs:43:36
101    |
102 LL | ...                   &'b isize,
103    |                        ^^ undeclared lifetime
104    |
105    = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
106    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
107 help: consider introducing lifetime `'b` here
108    |
109 LL | fn fn_types<'b>(a: &'a isize,
110    |            ++++
111 help: consider making the bound lifetime-generic with a new `'b` lifetime
112    |
113 LL |             b: Box<dyn for<'a, 'b> FnOnce(&'a isize,
114    |                              ++++
115
116 error[E0261]: use of undeclared lifetime name `'b`
117   --> $DIR/regions-name-undeclared.rs:46:36
118    |
119 LL | ...                   &'b isize)>,
120    |                        ^^ undeclared lifetime
121    |
122    = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
123    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
124 help: consider introducing lifetime `'b` here
125    |
126 LL | fn fn_types<'b>(a: &'a isize,
127    |            ++++
128 help: consider making the bound lifetime-generic with a new `'b` lifetime
129    |
130 LL |             b: Box<dyn for<'a, 'b> FnOnce(&'a isize,
131    |                              ++++
132
133 error[E0261]: use of undeclared lifetime name `'a`
134   --> $DIR/regions-name-undeclared.rs:47:17
135    |
136 LL | fn fn_types(a: &'a isize,
137    |            - help: consider introducing lifetime `'a` here: `<'a>`
138 ...
139 LL |             c: &'a isize)
140    |                 ^^ undeclared lifetime
141    |
142    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
143
144 error[E0261]: use of undeclared lifetime name `'a`
145   --> $DIR/regions-name-undeclared.rs:53:31
146    |
147 LL |     async fn buggy(&self) -> &'a str {
148    |                               ^^ undeclared lifetime
149    |
150    = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
151 help: consider introducing lifetime `'a` here
152    |
153 LL | impl<'a> Bug {
154    |     ++++
155 help: consider introducing lifetime `'a` here
156    |
157 LL |     async fn buggy<'a>(&self) -> &'a str {
158    |                   ++++
159
160 error: aborting due to 12 previous errors
161
162 For more information about this error, try `rustc --explain E0261`.