Skip to content

Commit

Permalink
review comment: wording
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Feb 10, 2020
1 parent 97d47a5 commit 9d91489
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/librustc_parse/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ impl<'a> Parser<'a> {
if let Some(args) = segment.args {
self.struct_span_err(
args.span(),
"field expressions may not have generic arguments",
"field expressions cannot have generic arguments",
)
.emit();
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/parser/type-parameters-in-field-exprs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ fn main() {
y: 2,
};
f.x::<isize>;
//~^ ERROR field expressions may not have generic arguments
//~^ ERROR field expressions cannot have generic arguments
f.x::<>;
//~^ ERROR field expressions may not have generic arguments
//~^ ERROR field expressions cannot have generic arguments
f.x::();
//~^ ERROR field expressions may not have generic arguments
//~^ ERROR field expressions cannot have generic arguments
}
6 changes: 3 additions & 3 deletions src/test/ui/parser/type-parameters-in-field-exprs.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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
|
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
|
LL | f.x::();
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/suggestions/method-missing-parentheses.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main() {
let _ = vec![].into_iter().collect::<usize>;
//~^ 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
}
2 changes: 1 addition & 1 deletion src/test/ui/suggestions/method-missing-parentheses.stderr
Original file line number Diff line number Diff line change
@@ -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
|
LL | let _ = vec![].into_iter().collect::<usize>;
Expand Down

0 comments on commit 9d91489

Please sign in to comment.