Skip to content

Commit a9b6476

Browse files
committed
Tweak wording
1 parent 6864546 commit a9b6476

10 files changed

+43
-43
lines changed

src/librustc_resolve/late/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
10911091
&& suggests_in_band
10921092
{
10931093
err.help(
1094-
"if you want to use in-band lifetime bindings, \
1094+
"if you want to experiment with in-band lifetime bindings, \
10951095
add `#![feature(in_band_lifetimes)]` to the crate attributes",
10961096
);
10971097
}

src/test/ui/error-codes/E0261.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn foo(x: &'a str) { }
66
| |
77
| help: consider introducing lifetime `'a` here: `<'a>`
88
|
9-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
9+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
1010

1111
error[E0261]: use of undeclared lifetime name `'a`
1212
--> $DIR/E0261.rs:5:9
@@ -16,7 +16,7 @@ LL | struct Foo {
1616
LL | x: &'a str,
1717
| ^^ undeclared lifetime
1818
|
19-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
19+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2020

2121
error: aborting due to 2 previous errors
2222

src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr

+16-16
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn foo(x: &'x u8) -> &'x u8 { x }
66
| |
77
| help: consider introducing lifetime `'x` here: `<'x>`
88
|
9-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
9+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
1010

1111
error[E0261]: use of undeclared lifetime name `'x`
1212
--> $DIR/feature-gate-in_band_lifetimes.rs:3:23
@@ -16,7 +16,7 @@ LL | fn foo(x: &'x u8) -> &'x u8 { x }
1616
| |
1717
| help: consider introducing lifetime `'x` here: `<'x>`
1818
|
19-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
19+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2020

2121
error[E0261]: use of undeclared lifetime name `'b`
2222
--> $DIR/feature-gate-in_band_lifetimes.rs:15:12
@@ -32,7 +32,7 @@ error[E0261]: use of undeclared lifetime name `'b`
3232
LL | fn inner_2(&self) -> &'b u8 {
3333
| ^^ undeclared lifetime
3434
|
35-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
35+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
3636
help: consider introducing lifetime `'b` here
3737
|
3838
LL | impl<'b, 'a> X<'b> {
@@ -50,15 +50,15 @@ LL | impl X<'b> {
5050
| |
5151
| help: consider introducing lifetime `'b` here: `<'b>`
5252
|
53-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
53+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
5454

5555
error[E0261]: use of undeclared lifetime name `'b`
5656
--> $DIR/feature-gate-in_band_lifetimes.rs:25:27
5757
|
5858
LL | fn inner_3(&self) -> &'b u8 {
5959
| ^^ undeclared lifetime
6060
|
61-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
61+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
6262
help: consider introducing lifetime `'b` here
6363
|
6464
LL | impl<'b> X<'b> {
@@ -76,15 +76,15 @@ LL | impl Y<&'a u8> {
7676
| |
7777
| help: consider introducing lifetime `'a` here: `<'a>`
7878
|
79-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
79+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
8080

8181
error[E0261]: use of undeclared lifetime name `'a`
8282
--> $DIR/feature-gate-in_band_lifetimes.rs:35:25
8383
|
8484
LL | fn inner(&self) -> &'a u8 {
8585
| ^^ undeclared lifetime
8686
|
87-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
87+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
8888
help: consider introducing lifetime `'a` here
8989
|
9090
LL | impl<'a> Y<&'a u8> {
@@ -100,7 +100,7 @@ error[E0261]: use of undeclared lifetime name `'b`
100100
LL | fn any_lifetime() -> &'b u8;
101101
| ^^ undeclared lifetime
102102
|
103-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
103+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
104104
help: consider introducing lifetime `'b` here
105105
|
106106
LL | trait MyTrait<'b, 'a> {
@@ -116,7 +116,7 @@ error[E0261]: use of undeclared lifetime name `'b`
116116
LL | fn borrowed_lifetime(&'b self) -> &'b u8;
117117
| ^^ undeclared lifetime
118118
|
119-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
119+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
120120
help: consider introducing lifetime `'b` here
121121
|
122122
LL | trait MyTrait<'b, 'a> {
@@ -132,7 +132,7 @@ error[E0261]: use of undeclared lifetime name `'b`
132132
LL | fn borrowed_lifetime(&'b self) -> &'b u8;
133133
| ^^ undeclared lifetime
134134
|
135-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
135+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
136136
help: consider introducing lifetime `'b` here
137137
|
138138
LL | trait MyTrait<'b, 'a> {
@@ -150,7 +150,7 @@ LL | impl MyTrait<'a> for Y<&'a u8> {
150150
| |
151151
| help: consider introducing lifetime `'a` here: `<'a>`
152152
|
153-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
153+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
154154

155155
error[E0261]: use of undeclared lifetime name `'a`
156156
--> $DIR/feature-gate-in_band_lifetimes.rs:50:25
@@ -160,15 +160,15 @@ LL | impl MyTrait<'a> for Y<&'a u8> {
160160
| |
161161
| help: consider introducing lifetime `'a` here: `<'a>`
162162
|
163-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
163+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
164164

165165
error[E0261]: use of undeclared lifetime name `'a`
166166
--> $DIR/feature-gate-in_band_lifetimes.rs:53:31
167167
|
168168
LL | fn my_lifetime(&self) -> &'a u8 { self.0 }
169169
| ^^ undeclared lifetime
170170
|
171-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
171+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
172172
help: consider introducing lifetime `'a` here
173173
|
174174
LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
@@ -184,7 +184,7 @@ error[E0261]: use of undeclared lifetime name `'b`
184184
LL | fn any_lifetime() -> &'b u8 { &0 }
185185
| ^^ undeclared lifetime
186186
|
187-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
187+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
188188
help: consider introducing lifetime `'b` here
189189
|
190190
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
@@ -200,7 +200,7 @@ error[E0261]: use of undeclared lifetime name `'b`
200200
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
201201
| ^^ undeclared lifetime
202202
|
203-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
203+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
204204
help: consider introducing lifetime `'b` here
205205
|
206206
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
@@ -216,7 +216,7 @@ error[E0261]: use of undeclared lifetime name `'b`
216216
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
217217
| ^^ undeclared lifetime
218218
|
219-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
219+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
220220
help: consider introducing lifetime `'b` here
221221
|
222222
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {

src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0261]: use of undeclared lifetime name `'b`
44
LL | + Deref<Target = Self::Item<'b>>;
55
| ^^ undeclared lifetime
66
|
7-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
7+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
88
help: consider introducing lifetime `'b` here
99
|
1010
LL | trait Iterable<'b> {
@@ -20,7 +20,7 @@ error[E0261]: use of undeclared lifetime name `'undeclared`
2020
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
2121
| ^^^^^^^^^^^ undeclared lifetime
2222
|
23-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
23+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2424
help: consider introducing lifetime `'undeclared` here
2525
|
2626
LL | trait Iterable<'undeclared> {

src/test/ui/methods/method-call-lifetime-args-unresolved.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | fn main() {
66
LL | 0.clone::<'a>();
77
| ^^ undeclared lifetime
88
|
9-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
9+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
1010

1111
error: aborting due to previous error
1212

src/test/ui/regions/regions-in-enums.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | enum No0 {
66
LL | X5(&'foo usize)
77
| ^^^^ undeclared lifetime
88
|
9-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
9+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
1010

1111
error[E0261]: use of undeclared lifetime name `'a`
1212
--> $DIR/regions-in-enums.rs:17:9
@@ -16,7 +16,7 @@ LL | enum No1 {
1616
LL | X6(&'a usize)
1717
| ^^ undeclared lifetime
1818
|
19-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
19+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2020

2121
error: aborting due to 2 previous errors
2222

src/test/ui/regions/regions-in-structs.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | struct StructDecl {
66
LL | a: &'a isize,
77
| ^^ undeclared lifetime
88
|
9-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
9+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
1010

1111
error[E0261]: use of undeclared lifetime name `'a`
1212
--> $DIR/regions-in-structs.rs:11:9
@@ -17,7 +17,7 @@ LL | a: &'a isize,
1717
LL | b: &'a isize,
1818
| ^^ undeclared lifetime
1919
|
20-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
20+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2121

2222
error: aborting due to 2 previous errors
2323

src/test/ui/regions/regions-name-undeclared.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0261]: use of undeclared lifetime name `'b`
44
LL | fn m4(&self, arg: &'b isize) { }
55
| ^^ undeclared lifetime
66
|
7-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
7+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
88
help: consider introducing lifetime `'b` here
99
|
1010
LL | impl<'b, 'a> Foo<'a> {
@@ -20,7 +20,7 @@ error[E0261]: use of undeclared lifetime name `'b`
2020
LL | fn m5(&'b self) { }
2121
| ^^ undeclared lifetime
2222
|
23-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
23+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2424
help: consider introducing lifetime `'b` here
2525
|
2626
LL | impl<'b, 'a> Foo<'a> {
@@ -36,7 +36,7 @@ error[E0261]: use of undeclared lifetime name `'b`
3636
LL | fn m6(&self, arg: Foo<'b>) { }
3737
| ^^ undeclared lifetime
3838
|
39-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
39+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
4040
help: consider introducing lifetime `'b` here
4141
|
4242
LL | impl<'b, 'a> Foo<'a> {
@@ -54,7 +54,7 @@ LL | type X = Option<&'a isize>;
5454
| |
5555
| help: consider introducing lifetime `'a` here: `<'a>`
5656
|
57-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
57+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
5858

5959
error[E0261]: use of undeclared lifetime name `'a`
6060
--> $DIR/regions-name-undeclared.rs:27:13
@@ -64,7 +64,7 @@ LL | enum E {
6464
LL | E1(&'a isize)
6565
| ^^ undeclared lifetime
6666
|
67-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
67+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
6868

6969
error[E0261]: use of undeclared lifetime name `'a`
7070
--> $DIR/regions-name-undeclared.rs:30:13
@@ -74,7 +74,7 @@ LL | struct S {
7474
LL | f: &'a isize
7575
| ^^ undeclared lifetime
7676
|
77-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
77+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
7878

7979
error[E0261]: use of undeclared lifetime name `'a`
8080
--> $DIR/regions-name-undeclared.rs:32:14
@@ -84,7 +84,7 @@ LL | fn f(a: &'a isize) { }
8484
| |
8585
| help: consider introducing lifetime `'a` here: `<'a>`
8686
|
87-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
87+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
8888

8989
error[E0261]: use of undeclared lifetime name `'a`
9090
--> $DIR/regions-name-undeclared.rs:40:17
@@ -94,7 +94,7 @@ LL | fn fn_types(a: &'a isize,
9494
| |
9595
| help: consider introducing lifetime `'a` here: `<'a>`
9696
|
97-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
97+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
9898

9999
error[E0261]: use of undeclared lifetime name `'b`
100100
--> $DIR/regions-name-undeclared.rs:42:36
@@ -103,7 +103,7 @@ LL | ... &'b isize,
103103
| ^^ undeclared lifetime
104104
|
105105
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
106-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
106+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
107107
help: consider introducing lifetime `'b` here
108108
|
109109
LL | fn fn_types<'b>(a: &'a isize,
@@ -120,7 +120,7 @@ LL | ... &'b isize)>,
120120
| ^^ undeclared lifetime
121121
|
122122
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
123-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
123+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
124124
help: consider introducing lifetime `'b` here
125125
|
126126
LL | fn fn_types<'b>(a: &'a isize,
@@ -139,7 +139,7 @@ LL | fn fn_types(a: &'a isize,
139139
LL | c: &'a isize)
140140
| ^^ undeclared lifetime
141141
|
142-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
142+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
143143

144144
error: aborting due to 11 previous errors
145145

src/test/ui/regions/regions-undeclared.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | enum EnumDecl {
1212
LL | Foo(&'a isize),
1313
| ^^ undeclared lifetime
1414
|
15-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
15+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
1616

1717
error[E0261]: use of undeclared lifetime name `'a`
1818
--> $DIR/regions-undeclared.rs:5:10
@@ -23,7 +23,7 @@ LL | Foo(&'a isize),
2323
LL | Bar(&'a isize),
2424
| ^^ undeclared lifetime
2525
|
26-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
26+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
2727

2828
error[E0261]: use of undeclared lifetime name `'a`
2929
--> $DIR/regions-undeclared.rs:8:15
@@ -33,7 +33,7 @@ LL | fn fnDecl(x: &'a isize,
3333
| |
3434
| help: consider introducing lifetime `'a` here: `<'a>`
3535
|
36-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
36+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
3737

3838
error[E0261]: use of undeclared lifetime name `'a`
3939
--> $DIR/regions-undeclared.rs:9:15
@@ -43,7 +43,7 @@ LL | fn fnDecl(x: &'a isize,
4343
LL | y: &'a isize)
4444
| ^^ undeclared lifetime
4545
|
46-
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
46+
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
4747

4848
error: aborting due to 5 previous errors
4949

0 commit comments

Comments
 (0)