Skip to content

Commit 8a9a5a3

Browse files
committed
review comments: wording
1 parent 4bbd5d0 commit 8a9a5a3

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

src/librustc_resolve/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ crate fn add_missing_lifetime_specifiers_label(
15091509
);
15101510
should_break = false;
15111511
err.note(
1512-
"for more information on higher-ranked lifetimes, visit \
1512+
"for more information on higher-ranked polymorphism, visit \
15131513
https://doc.rust-lang.org/nomicon/hrtb.html",
15141514
);
15151515
let suggestion = match span_type {

src/librustc_resolve/lifetimes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
19131913
Applicability::MaybeIncorrect,
19141914
);
19151915
err.note(
1916-
"for more information on higher-ranked lifetimes, visit \
1916+
"for more information on higher-ranked polymorphism, visit \
19171917
https://doc.rust-lang.org/nomicon/hrtb.html",
19181918
);
19191919
}

src/test/ui/generic/generic-extern-lifetime.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0261]: use of undeclared lifetime name `'a`
1010
LL | pub fn life4<'b>(x: for<'c> fn(&'a i32));
1111
| ^^ undeclared lifetime
1212
|
13-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
13+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
1414
help: consider making the type lifetime-generic with a new `'a` lifetime
1515
|
1616
LL | pub fn life4<'b>(x: for<'c, 'a> fn(&'a i32));
@@ -22,7 +22,7 @@ error[E0261]: use of undeclared lifetime name `'a`
2222
LL | pub fn life7<'b>() -> for<'c> fn(&'a i32);
2323
| ^^ undeclared lifetime
2424
|
25-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
25+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
2626
help: consider making the type lifetime-generic with a new `'a` lifetime
2727
|
2828
LL | pub fn life7<'b>() -> for<'c, 'a> fn(&'a i32);

src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr

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

src/test/ui/issues/issue-19707.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | type Foo = fn(&u8, &u8) -> &u8;
55
| --- --- ^ expected named lifetime parameter
66
|
77
= 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
8-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
8+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
99
help: consider making the type lifetime-generic with a new `'a` lifetime
1010
|
1111
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) {}
2222
| --- --- ^ expected named lifetime parameter
2323
|
2424
= 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
25-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
25+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
2626
help: consider making the bound lifetime-generic with a new `'a` lifetime
2727
|
2828
LL | fn bar<F: for<'a> Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ error[E0261]: use of undeclared lifetime name `'b`
8989
LL | ... &'b isize,
9090
| ^^ undeclared lifetime
9191
|
92-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
92+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
9393
help: consider introducing lifetime `'b` here
9494
|
9595
LL | fn fn_types<'b>(a: &'a isize,
@@ -105,7 +105,7 @@ error[E0261]: use of undeclared lifetime name `'b`
105105
LL | ... &'b isize)>,
106106
| ^^ undeclared lifetime
107107
|
108-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
108+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
109109
help: consider introducing lifetime `'b` here
110110
|
111111
LL | fn fn_types<'b>(a: &'a isize,

src/test/ui/rfc1623-2.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 =
55
| --- --- ^ expected named lifetime parameter
66
|
77
= 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
8-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
8+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
99
help: consider making the type lifetime-generic with a new `'a` lifetime
1010
|
1111
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);
1818
| --- --- ^ expected named lifetime parameter
1919
|
2020
= 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
21-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
21+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
2222
help: consider making the type lifetime-generic with a new `'a` lifetime
2323
|
2424
LL | &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8);

src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0261]: use of undeclared lifetime name `'a`
44
LL | struct S1<F: Fn(&i32, &i32) -> &'a i32>(F);
55
| ^^ undeclared lifetime
66
|
7-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
7+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
88
help: consider introducing lifetime `'a` here
99
|
1010
LL | struct S1<'a, F: Fn(&i32, &i32) -> &'a i32>(F);
@@ -21,7 +21,7 @@ LL | struct S2<F: Fn(&i32, &i32) -> &i32>(F);
2121
| ---- ---- ^ expected named lifetime parameter
2222
|
2323
= 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
24-
= note: for more information on higher-ranked lifetimes, visit https://doc.rust-lang.org/nomicon/hrtb.html
24+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
2525
help: consider making the bound lifetime-generic with a new `'a` lifetime
2626
|
2727
LL | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F);

0 commit comments

Comments
 (0)