From 9d91489526121ef3408e1efa2a98bcaefdedd9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Mon, 10 Feb 2020 13:58:36 -0800 Subject: [PATCH] review comment: wording --- src/librustc_parse/parser/expr.rs | 2 +- src/test/ui/parser/type-parameters-in-field-exprs.rs | 6 +++--- src/test/ui/parser/type-parameters-in-field-exprs.stderr | 6 +++--- src/test/ui/suggestions/method-missing-parentheses.rs | 2 +- src/test/ui/suggestions/method-missing-parentheses.stderr | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index d9832141695..56871c0c663 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -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(); } diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.rs b/src/test/ui/parser/type-parameters-in-field-exprs.rs index 6a3b2c1c606..4cd77ebbd86 100644 --- a/src/test/ui/parser/type-parameters-in-field-exprs.rs +++ b/src/test/ui/parser/type-parameters-in-field-exprs.rs @@ -9,9 +9,9 @@ fn main() { y: 2, }; 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 f.x::(); - //~^ ERROR field expressions may not have generic arguments + //~^ ERROR field expressions cannot have generic arguments } diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.stderr b/src/test/ui/parser/type-parameters-in-field-exprs.stderr index 306b4754d0d..ce7364d3534 100644 --- a/src/test/ui/parser/type-parameters-in-field-exprs.stderr +++ b/src/test/ui/parser/type-parameters-in-field-exprs.stderr @@ -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::; | ^^^^^^^ -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::(); diff --git a/src/test/ui/suggestions/method-missing-parentheses.rs b/src/test/ui/suggestions/method-missing-parentheses.rs index e1a85271ad0..f10bfb56d2e 100644 --- a/src/test/ui/suggestions/method-missing-parentheses.rs +++ b/src/test/ui/suggestions/method-missing-parentheses.rs @@ -1,5 +1,5 @@ fn main() { let _ = vec![].into_iter().collect::; //~^ 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 } diff --git a/src/test/ui/suggestions/method-missing-parentheses.stderr b/src/test/ui/suggestions/method-missing-parentheses.stderr index 8569eb6f4ad..6e4f7a84724 100644 --- a/src/test/ui/suggestions/method-missing-parentheses.stderr +++ b/src/test/ui/suggestions/method-missing-parentheses.stderr @@ -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::;