From e84cb65fe1f883a017b91fcb1eda64215fd08626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sun, 29 Mar 2020 11:46:00 -0700 Subject: [PATCH] review comment: wording --- src/librustc_ast_passes/ast_validation.rs | 9 +---- src/test/ui/parser/issue-32214.stderr | 2 +- .../ui/suggestions/suggest-move-types.stderr | 40 +++++++++---------- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/src/librustc_ast_passes/ast_validation.rs b/src/librustc_ast_passes/ast_validation.rs index 4f076c963c1b..aaf0212ca028 100644 --- a/src/librustc_ast_passes/ast_validation.rs +++ b/src/librustc_ast_passes/ast_validation.rs @@ -697,14 +697,7 @@ impl<'a> AstValidator<'a> { arg_spans.clone(), "generic arguments must come before the first constraint", ) - .span_labels( - constraint_spans, - &format!( - "the constraint{} {} provided here", - pluralize!(constraint_len), - if constraint_len == 1 { "is" } else { "are" } - ), - ) + .span_labels(constraint_spans, "constraint") .span_labels(arg_spans, "generic argument") .span_suggestion_verbose( data.span, diff --git a/src/test/ui/parser/issue-32214.stderr b/src/test/ui/parser/issue-32214.stderr index 8daf76993bc0..bc61b3b74e21 100644 --- a/src/test/ui/parser/issue-32214.stderr +++ b/src/test/ui/parser/issue-32214.stderr @@ -4,7 +4,7 @@ error: generic arguments must come before the first constraint LL | pub fn test >() {} | ------- ^ generic argument | | - | the constraint is provided here + | constraint | help: move the constraint after the generic argument | diff --git a/src/test/ui/suggestions/suggest-move-types.stderr b/src/test/ui/suggestions/suggest-move-types.stderr index e8cf54e27677..4d31a472fe4e 100644 --- a/src/test/ui/suggestions/suggest-move-types.stderr +++ b/src/test/ui/suggestions/suggest-move-types.stderr @@ -4,7 +4,7 @@ error: generic arguments must come before the first constraint LL | struct A> { | ---- ^ generic argument | | - | the constraint is provided here + | constraint | help: move the constraint after the generic argument | @@ -18,7 +18,7 @@ LL | struct Al<'a, T, M: OneWithLifetime> { | ---- ^ ^^ generic argument | | | | | generic argument - | the constraint is provided here + | constraint | help: move the constraint after the generic arguments | @@ -33,9 +33,9 @@ LL | struct B> { | | | | | | | | | | | generic argument | | | | generic argument - | | | the constraints are provided here - | | the constraints are provided here - | the constraints are provided here + | | | constraint + | | constraint + | constraint | help: move the constraints after the generic arguments | @@ -53,9 +53,9 @@ LL | struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { | ^ ---- ---- ---- ^ ^ generic argument | | | | | | | | | | | generic argument - | | | | the constraints are provided here - | | | the constraints are provided here - | | the constraints are provided here + | | | | constraint + | | | constraint + | | constraint | generic argument | help: move the constraints after the generic arguments @@ -88,9 +88,9 @@ LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { | ^ ---- ---- ^ ---- ^ generic argument | | | | | | - | | | | | the constraints are provided here + | | | | | constraint | | | | generic argument - | | | the constraints are provided here - | | the constraints are provided here + | | | constraint + | | constraint | generic argument | help: move the constraints after the generic arguments @@ -123,11 +123,11 @@ LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime