review comments: wording

This commit is contained in:
Esteban Küber 2020-01-27 16:25:43 -08:00
parent 92505df338
commit 30d927874a
8 changed files with 13 additions and 13 deletions

View file

@ -1514,7 +1514,7 @@ crate fn add_missing_lifetime_specifiers_label(
);
should_break = false;
err.note(
"for more information on higher-ranked lifetimes, visit \
"for more information on higher-ranked polymorphism, visit \
https://doc.rust-lang.org/nomicon/hrtb.html",
);
let suggestion = match span_type {

View file

@ -1913,7 +1913,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
Applicability::MaybeIncorrect,
);
err.note(
"for more information on higher-ranked lifetimes, visit \
"for more information on higher-ranked polymorphism, visit \
https://doc.rust-lang.org/nomicon/hrtb.html",
);
}

View file

@ -10,7 +10,7 @@ error[E0261]: use of undeclared lifetime name `'a`
LL | pub fn life4<'b>(x: for<'c> fn(&'a i32));
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the type lifetime-generic with a new `'a` lifetime
|
LL | pub fn life4<'b>(x: for<'c, 'a> fn(&'a i32));
@ -22,7 +22,7 @@ error[E0261]: use of undeclared lifetime name `'a`
LL | pub fn life7<'b>() -> for<'c> fn(&'a i32);
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the type lifetime-generic with a new `'a` lifetime
|
LL | pub fn life7<'b>() -> for<'c, 'a> fn(&'a i32);

View file

@ -12,7 +12,7 @@ error[E0261]: use of undeclared lifetime name `'test`
LL | let y: fn(&'test u32) = foo2;
| ^^^^^ undeclared lifetime
|
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider introducing lifetime `'test` here
|
LL | fn bar<'test>() {

View file

@ -5,7 +5,7 @@ LL | type Foo = fn(&u8, &u8) -> &u8;
| --- --- ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the type lifetime-generic with a new `'a` lifetime
|
LL | type Foo = for<'a> fn(&'a u8, &'a u8) -> &'a u8;
@ -22,7 +22,7 @@ LL | fn bar<F: Fn(&u8, &u8) -> &u8>(f: &F) {}
| --- --- ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= 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 `'a` lifetime
|
LL | fn bar<F: for<'a> Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}

View file

@ -89,7 +89,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | ... &'b isize,
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider introducing lifetime `'b` here
|
LL | fn fn_types<'b>(a: &'a isize,
@ -105,7 +105,7 @@ error[E0261]: use of undeclared lifetime name `'b`
LL | ... &'b isize)>,
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider introducing lifetime `'b` here
|
LL | fn fn_types<'b>(a: &'a isize,

View file

@ -5,7 +5,7 @@ LL | static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 =
| --- --- ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the type lifetime-generic with a new `'a` lifetime
|
LL | static NON_ELIDABLE_FN: &for<'a> fn(&'a u8, &'a u8) -> &'a u8 =
@ -18,7 +18,7 @@ LL | &(non_elidable as fn(&u8, &u8) -> &u8);
| --- --- ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the type lifetime-generic with a new `'a` lifetime
|
LL | &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8);

View file

@ -4,7 +4,7 @@ error[E0261]: use of undeclared lifetime name `'a`
LL | struct S1<F: Fn(&i32, &i32) -> &'a i32>(F);
| ^^ undeclared lifetime
|
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider introducing lifetime `'a` here
|
LL | struct S1<'a, F: Fn(&i32, &i32) -> &'a i32>(F);
@ -21,7 +21,7 @@ LL | struct S2<F: Fn(&i32, &i32) -> &i32>(F);
| ---- ---- ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
= 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 `'a` lifetime
|
LL | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F);