Skip to content

Commit

Permalink
Tweak wording
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jul 9, 2020
1 parent 6864546 commit a9b6476
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/librustc_resolve/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
&& suggests_in_band
{
err.help(
"if you want to use in-band lifetime bindings, \
"if you want to experiment with in-band lifetime bindings, \
add `#![feature(in_band_lifetimes)]` to the crate attributes",
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/error-codes/E0261.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | fn foo(x: &'a str) { }
| |
| help: consider introducing lifetime `'a` here: `<'a>`
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

error: aborting due to 2 previous errors

Expand Down
32 changes: 16 additions & 16 deletions src/test/ui/feature-gates/feature-gate-in_band_lifetimes.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | fn foo(x: &'x u8) -> &'x u8 { x }
| |
| help: consider introducing lifetime `'x` here: `<'x>`
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

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

error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/feature-gate-in_band_lifetimes.rs:25:27
|
LL | fn inner_3(&self) -> &'b u8 {
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b> X<'b> {
Expand All @@ -76,15 +76,15 @@ LL | impl Y<&'a u8> {
| |
| help: consider introducing lifetime `'a` here: `<'a>`
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/feature-gate-in_band_lifetimes.rs:35:25
|
LL | fn inner(&self) -> &'a u8 {
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'a` here
|
LL | impl<'a> Y<&'a u8> {
Expand All @@ -100,7 +100,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn any_lifetime() -> &'b u8;
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | trait MyTrait<'b, 'a> {
Expand All @@ -116,7 +116,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn borrowed_lifetime(&'b self) -> &'b u8;
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | trait MyTrait<'b, 'a> {
Expand All @@ -132,7 +132,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn borrowed_lifetime(&'b self) -> &'b u8;
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | trait MyTrait<'b, 'a> {
Expand All @@ -150,7 +150,7 @@ LL | impl MyTrait<'a> for Y<&'a u8> {
| |
| help: consider introducing lifetime `'a` here: `<'a>`
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/feature-gate-in_band_lifetimes.rs:53:31
|
LL | fn my_lifetime(&self) -> &'a u8 { self.0 }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'a` here
|
LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
Expand All @@ -184,7 +184,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn any_lifetime() -> &'b u8 { &0 }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
Expand All @@ -200,7 +200,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
Expand All @@ -216,7 +216,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | + Deref<Target = Self::Item<'b>>;
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | trait Iterable<'b> {
Expand All @@ -20,7 +20,7 @@ error[E0261]: use of undeclared lifetime name `'undeclared`
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
| ^^^^^^^^^^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'undeclared` here
|
LL | trait Iterable<'undeclared> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | fn main() {
LL | 0.clone::<'a>();
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

error: aborting due to previous error

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/regions/regions-in-enums.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | enum No0 {
LL | X5(&'foo usize)
| ^^^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

error: aborting due to 2 previous errors

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/regions/regions-in-structs.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | struct StructDecl {
LL | a: &'a isize,
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

error: aborting due to 2 previous errors

Expand Down
22 changes: 11 additions & 11 deletions src/test/ui/regions/regions-name-undeclared.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn m4(&self, arg: &'b isize) { }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b, 'a> Foo<'a> {
Expand All @@ -20,7 +20,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn m5(&'b self) { }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b, 'a> Foo<'a> {
Expand All @@ -36,7 +36,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | fn m6(&self, arg: Foo<'b>) { }
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | impl<'b, 'a> Foo<'a> {
Expand All @@ -54,7 +54,7 @@ LL | type X = Option<&'a isize>;
| |
| help: consider introducing lifetime `'a` here: `<'a>`
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

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

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

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

error[E0261]: use of undeclared lifetime name `'b`
--> $DIR/regions-name-undeclared.rs:42:36
Expand All @@ -103,7 +103,7 @@ LL | ... &'b isize,
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | fn fn_types<'b>(a: &'a isize,
Expand All @@ -120,7 +120,7 @@ LL | ... &'b isize)>,
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
help: consider introducing lifetime `'b` here
|
LL | fn fn_types<'b>(a: &'a isize,
Expand All @@ -139,7 +139,7 @@ LL | fn fn_types(a: &'a isize,
LL | c: &'a isize)
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

error: aborting due to 11 previous errors

Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/regions/regions-undeclared.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LL | enum EnumDecl {
LL | Foo(&'a isize),
| ^^ undeclared lifetime
|
= help: if you want to use in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes

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

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

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

error: aborting due to 5 previous errors

Expand Down
Loading

0 comments on commit a9b6476

Please sign in to comment.