review comment: wording

This commit is contained in:
Esteban Küber 2020-02-10 13:58:36 -08:00
parent 97d47a5e7c
commit 9d91489526
5 changed files with 9 additions and 9 deletions

View File

@ -828,7 +828,7 @@ impl<'a> Parser<'a> {
if let Some(args) = segment.args { if let Some(args) = segment.args {
self.struct_span_err( self.struct_span_err(
args.span(), args.span(),
"field expressions may not have generic arguments", "field expressions cannot have generic arguments",
) )
.emit(); .emit();
} }

View File

@ -9,9 +9,9 @@ fn main() {
y: 2, y: 2,
}; };
f.x::<isize>; f.x::<isize>;
//~^ ERROR field expressions may not have generic arguments //~^ ERROR field expressions cannot have generic arguments
f.x::<>; f.x::<>;
//~^ ERROR field expressions may not have generic arguments //~^ ERROR field expressions cannot have generic arguments
f.x::(); f.x::();
//~^ ERROR field expressions may not have generic arguments //~^ ERROR field expressions cannot have generic arguments
} }

View File

@ -1,16 +1,16 @@
error: field expressions may not have generic arguments error: field expressions cannot have generic arguments
--> $DIR/type-parameters-in-field-exprs.rs:11:10 --> $DIR/type-parameters-in-field-exprs.rs:11:10
| |
LL | f.x::<isize>; LL | f.x::<isize>;
| ^^^^^^^ | ^^^^^^^
error: field expressions may not have generic arguments error: field expressions cannot have generic arguments
--> $DIR/type-parameters-in-field-exprs.rs:13:10 --> $DIR/type-parameters-in-field-exprs.rs:13:10
| |
LL | f.x::<>; LL | f.x::<>;
| ^^ | ^^
error: field expressions may not have generic arguments error: field expressions cannot have generic arguments
--> $DIR/type-parameters-in-field-exprs.rs:15:7 --> $DIR/type-parameters-in-field-exprs.rs:15:7
| |
LL | f.x::(); LL | f.x::();

View File

@ -1,5 +1,5 @@
fn main() { fn main() {
let _ = vec![].into_iter().collect::<usize>; let _ = vec![].into_iter().collect::<usize>;
//~^ ERROR attempted to take value of method `collect` on type `std::vec::IntoIter<_>` //~^ ERROR attempted to take value of method `collect` on type `std::vec::IntoIter<_>`
//~| ERROR field expressions may not have generic arguments //~| ERROR field expressions cannot have generic arguments
} }

View File

@ -1,4 +1,4 @@
error: field expressions may not have generic arguments error: field expressions cannot have generic arguments
--> $DIR/method-missing-parentheses.rs:2:41 --> $DIR/method-missing-parentheses.rs:2:41
| |
LL | let _ = vec![].into_iter().collect::<usize>; LL | let _ = vec![].into_iter().collect::<usize>;