about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-02-23 12:54:00 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-02-24 00:59:38 +0100
commitfde5939d1c843c3ede7f6ea0eef704f52854b45d (patch)
tree46e6b7a6a3f1548af4da6432e08fc3f317f020fc
parente66a39bb65eb4a7fb1813993e10fc1af5bdac9bc (diff)
downloadrust-fde5939d1c843c3ede7f6ea0eef704f52854b45d.tar.gz
rust-fde5939d1c843c3ede7f6ea0eef704f52854b45d.zip
parse: tweak diagnostic wordings
-rw-r--r--src/librustc_parse/parser/item.rs10
-rw-r--r--src/test/ui/parser/default-on-wrong-item-kind.rs72
-rw-r--r--src/test/ui/parser/default-on-wrong-item-kind.stderr72
-rw-r--r--src/test/ui/parser/default-unmatched-assoc.rs4
-rw-r--r--src/test/ui/parser/default-unmatched-assoc.stderr4
-rw-r--r--src/test/ui/parser/default-unmatched-extern.rs2
-rw-r--r--src/test/ui/parser/default-unmatched-extern.stderr2
-rw-r--r--src/test/ui/parser/default-unmatched.rs2
-rw-r--r--src/test/ui/parser/default-unmatched.stderr2
-rw-r--r--src/test/ui/parser/default.rs2
-rw-r--r--src/test/ui/parser/default.stderr2
-rw-r--r--src/test/ui/parser/duplicate-visibility.rs2
-rw-r--r--src/test/ui/parser/duplicate-visibility.stderr2
-rw-r--r--src/test/ui/parser/impl-parsing.rs2
-rw-r--r--src/test/ui/parser/impl-parsing.stderr2
-rw-r--r--src/test/ui/parser/issue-41155.rs2
-rw-r--r--src/test/ui/parser/issue-41155.stderr2
-rw-r--r--src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs4
-rw-r--r--src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr4
-rw-r--r--src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.rs4
-rw-r--r--src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr4
-rw-r--r--src/test/ui/pub/pub-restricted-error-fn.rs2
-rw-r--r--src/test/ui/pub/pub-restricted-error-fn.stderr2
23 files changed, 103 insertions, 103 deletions
diff --git a/src/librustc_parse/parser/item.rs b/src/librustc_parse/parser/item.rs
index c85b4c22d01..d6da6270541 100644
--- a/src/librustc_parse/parser/item.rs
+++ b/src/librustc_parse/parser/item.rs
@@ -112,7 +112,7 @@ impl<'a> Parser<'a> {
         }
         let vs = pprust::vis_to_string(&vis);
         let vs = vs.trim_end();
-        self.struct_span_err(vis.span, &format!("visibility `{}` not followed by an item", vs))
+        self.struct_span_err(vis.span, &format!("visibility `{}` is not followed by an item", vs))
             .span_label(vis.span, "the visibility")
             .help(&format!("you likely meant to define an item, e.g., `{} fn foo() {{}}`", vs))
             .emit();
@@ -121,7 +121,7 @@ impl<'a> Parser<'a> {
     /// Error in-case a `default` was parsed but no item followed.
     fn error_on_unmatched_defaultness(&self, def: Defaultness) {
         if let Defaultness::Default(sp) = def {
-            self.struct_span_err(sp, "`default` not followed by an item")
+            self.struct_span_err(sp, "`default` is not followed by an item")
                 .span_label(sp, "the `default` qualifier")
                 .note("only `fn`, `const`, `type`, or `impl` items may be prefixed by `default`")
                 .emit();
@@ -657,7 +657,7 @@ impl<'a> Parser<'a> {
                     self.struct_span_err(span, "associated `static` items are not allowed").emit();
                     AssocItemKind::Const(Defaultness::Final, a, b)
                 }
-                _ => return self.error_bad_item_kind(span, &kind, "`trait` or `impl`"),
+                _ => return self.error_bad_item_kind(span, &kind, "`trait`s or `impl`s"),
             };
             Some(P(Item { attrs, id, span, vis, ident, kind, tokens }))
         }))
@@ -846,7 +846,7 @@ impl<'a> Parser<'a> {
                     self.error_on_foreign_const(span, ident);
                     ForeignItemKind::Static(a, Mutability::Not, b)
                 }
-                _ => return self.error_bad_item_kind(span, &kind, "`extern` block"),
+                _ => return self.error_bad_item_kind(span, &kind, "`extern` blocks"),
             };
             Some(P(Item { attrs, id, span, vis, ident, kind, tokens }))
         }))
@@ -854,7 +854,7 @@ impl<'a> Parser<'a> {
 
     fn error_bad_item_kind<T>(&self, span: Span, kind: &ItemKind, ctx: &str) -> Option<T> {
         let span = self.sess.source_map().def_span(span);
-        let msg = format!("{} not supported in {}", kind.descr(), ctx);
+        let msg = format!("{} is not supported in {}", kind.descr(), ctx);
         self.struct_span_err(span, &msg).emit();
         return None;
     }
diff --git a/src/test/ui/parser/default-on-wrong-item-kind.rs b/src/test/ui/parser/default-on-wrong-item-kind.rs
index 982ee6d83b3..98a95cfa35a 100644
--- a/src/test/ui/parser/default-on-wrong-item-kind.rs
+++ b/src/test/ui/parser/default-on-wrong-item-kind.rs
@@ -31,110 +31,110 @@ mod free_items {
 #[cfg(FALSE)]
 extern "C" {
     default extern crate foo; //~ ERROR an extern crate cannot be `default`
-    //~^ ERROR extern crate not supported in `extern` block
+    //~^ ERROR extern crate is not supported in `extern` blocks
     default use foo; //~ ERROR a `use` import cannot be `default`
-    //~^ ERROR `use` import not supported in `extern` block
+    //~^ ERROR `use` import is not supported in `extern` blocks
     default static foo: u8; //~ ERROR a static item cannot be `default`
     default const foo: u8;
     //~^ ERROR extern items cannot be `const`
     default fn foo();
     default mod foo {} //~ ERROR a module cannot be `default`
-    //~^ ERROR module not supported in `extern` block
+    //~^ ERROR module is not supported in `extern` blocks
     default extern "C" {} //~ ERROR an extern block cannot be `default`
-    //~^ ERROR extern block not supported in `extern` block
+    //~^ ERROR extern block is not supported in `extern` blocks
     default type foo = u8;
     default enum foo {} //~ ERROR an enum cannot be `default`
-    //~^ ERROR enum not supported in `extern` block
+    //~^ ERROR enum is not supported in `extern` blocks
     default struct foo {} //~ ERROR a struct cannot be `default`
-    //~^ ERROR struct not supported in `extern` block
+    //~^ ERROR struct is not supported in `extern` blocks
     default union foo {} //~ ERROR a union cannot be `default`
-    //~^ ERROR union not supported in `extern` block
+    //~^ ERROR union is not supported in `extern` blocks
     default trait foo {} //~ ERROR a trait cannot be `default`
-    //~^ ERROR trait not supported in `extern` block
+    //~^ ERROR trait is not supported in `extern` blocks
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
-    //~^ ERROR trait alias not supported in `extern` block
+    //~^ ERROR trait alias is not supported in `extern` blocks
     default impl foo {}
-    //~^ ERROR implementation not supported in `extern` block
+    //~^ ERROR implementation is not supported in `extern` blocks
     default!();
     default::foo::bar!();
     default default!(); //~ ERROR an item macro invocation cannot be `default`
     default default::foo::bar!(); //~ ERROR an item macro invocation cannot be `default`
     default macro foo {} //~ ERROR a macro definition cannot be `default`
-    //~^ ERROR macro definition not supported in `extern` block
+    //~^ ERROR macro definition is not supported in `extern` blocks
     default macro_rules! foo {} //~ ERROR a macro definition cannot be `default`
-    //~^ ERROR macro definition not supported in `extern` block
+    //~^ ERROR macro definition is not supported in `extern` blocks
 }
 
 #[cfg(FALSE)]
 impl S {
     default extern crate foo; //~ ERROR an extern crate cannot be `default`
-    //~^ ERROR extern crate not supported in `trait` or `impl`
+    //~^ ERROR extern crate is not supported in `trait`s or `impl`s
     default use foo; //~ ERROR a `use` import cannot be `default`
-    //~^ ERROR `use` import not supported in `trait` or `impl`
+    //~^ ERROR `use` import is not supported in `trait`s or `impl`s
     default static foo: u8; //~ ERROR a static item cannot be `default`
     //~^ ERROR associated `static` items are not allowed
     default const foo: u8;
     default fn foo();
     default mod foo {}//~ ERROR a module cannot be `default`
-    //~^ ERROR module not supported in `trait` or `impl`
+    //~^ ERROR module is not supported in `trait`s or `impl`s
     default extern "C" {} //~ ERROR an extern block cannot be `default`
-    //~^ ERROR extern block not supported in `trait` or `impl`
+    //~^ ERROR extern block is not supported in `trait`s or `impl`s
     default type foo = u8;
     default enum foo {} //~ ERROR an enum cannot be `default`
-    //~^ ERROR enum not supported in `trait` or `impl`
+    //~^ ERROR enum is not supported in `trait`s or `impl`s
     default struct foo {} //~ ERROR a struct cannot be `default`
-    //~^ ERROR struct not supported in `trait` or `impl`
+    //~^ ERROR struct is not supported in `trait`s or `impl`s
     default union foo {} //~ ERROR a union cannot be `default`
-    //~^ ERROR union not supported in `trait` or `impl`
+    //~^ ERROR union is not supported in `trait`s or `impl`s
     default trait foo {} //~ ERROR a trait cannot be `default`
-    //~^ ERROR trait not supported in `trait` or `impl`
+    //~^ ERROR trait is not supported in `trait`s or `impl`s
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
-    //~^ ERROR trait alias not supported in `trait` or `impl`
+    //~^ ERROR trait alias is not supported in `trait`s or `impl`s
     default impl foo {}
-    //~^ ERROR implementation not supported in `trait` or `impl`
+    //~^ ERROR implementation is not supported in `trait`s or `impl`s
     default!();
     default::foo::bar!();
     default default!(); //~ ERROR an item macro invocation cannot be `default`
     default default::foo::bar!(); //~ ERROR an item macro invocation cannot be `default`
     default macro foo {} //~ ERROR a macro definition cannot be `default`
-    //~^ ERROR macro definition not supported in `trait` or `impl`
+    //~^ ERROR macro definition is not supported in `trait`s or `impl`s
     default macro_rules! foo {} //~ ERROR a macro definition cannot be `default`
-    //~^ ERROR macro definition not supported in `trait` or `impl`
+    //~^ ERROR macro definition is not supported in `trait`s or `impl`s
 }
 
 #[cfg(FALSE)]
 trait T {
     default extern crate foo; //~ ERROR an extern crate cannot be `default`
-    //~^ ERROR extern crate not supported in `trait` or `impl`
+    //~^ ERROR extern crate is not supported in `trait`s or `impl`s
     default use foo; //~ ERROR a `use` import cannot be `default`
-    //~^ ERROR `use` import not supported in `trait` or `impl`
+    //~^ ERROR `use` import is not supported in `trait`s or `impl`s
     default static foo: u8; //~ ERROR a static item cannot be `default`
     //~^ ERROR associated `static` items are not allowed
     default const foo: u8;
     default fn foo();
     default mod foo {}//~ ERROR a module cannot be `default`
-    //~^ ERROR module not supported in `trait` or `impl`
+    //~^ ERROR module is not supported in `trait`s or `impl`s
     default extern "C" {} //~ ERROR an extern block cannot be `default`
-    //~^ ERROR extern block not supported in `trait` or `impl`
+    //~^ ERROR extern block is not supported in `trait`s or `impl`s
     default type foo = u8;
     default enum foo {} //~ ERROR an enum cannot be `default`
-    //~^ ERROR enum not supported in `trait` or `impl`
+    //~^ ERROR enum is not supported in `trait`s or `impl`s
     default struct foo {} //~ ERROR a struct cannot be `default`
-    //~^ ERROR struct not supported in `trait` or `impl`
+    //~^ ERROR struct is not supported in `trait`s or `impl`s
     default union foo {} //~ ERROR a union cannot be `default`
-    //~^ ERROR union not supported in `trait` or `impl`
+    //~^ ERROR union is not supported in `trait`s or `impl`s
     default trait foo {} //~ ERROR a trait cannot be `default`
-    //~^ ERROR trait not supported in `trait` or `impl`
+    //~^ ERROR trait is not supported in `trait`s or `impl`s
     default trait foo = Ord; //~ ERROR a trait alias cannot be `default`
-    //~^ ERROR trait alias not supported in `trait` or `impl`
+    //~^ ERROR trait alias is not supported in `trait`s or `impl`s
     default impl foo {}
-    //~^ ERROR implementation not supported in `trait` or `impl`
+    //~^ ERROR implementation is not supported in `trait`s or `impl`s
     default!();
     default::foo::bar!();
     default default!(); //~ ERROR an item macro invocation cannot be `default`
     default default::foo::bar!(); //~ ERROR an item macro invocation cannot be `default`
     default macro foo {} //~ ERROR a macro definition cannot be `default`
-    //~^ ERROR macro definition not supported in `trait` or `impl`
+    //~^ ERROR macro definition is not supported in `trait`s or `impl`s
     default macro_rules! foo {} //~ ERROR a macro definition cannot be `default`
-    //~^ ERROR macro definition not supported in `trait` or `impl`
+    //~^ ERROR macro definition is not supported in `trait`s or `impl`s
 }
diff --git a/src/test/ui/parser/default-on-wrong-item-kind.stderr b/src/test/ui/parser/default-on-wrong-item-kind.stderr
index d0f3ad4d72b..9788bd64725 100644
--- a/src/test/ui/parser/default-on-wrong-item-kind.stderr
+++ b/src/test/ui/parser/default-on-wrong-item-kind.stderr
@@ -118,7 +118,7 @@ LL |     default extern crate foo;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: extern crate not supported in `extern` block
+error: extern crate is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:33:5
    |
 LL |     default extern crate foo;
@@ -132,7 +132,7 @@ LL |     default use foo;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: `use` import not supported in `extern` block
+error: `use` import is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:35:5
    |
 LL |     default use foo;
@@ -164,7 +164,7 @@ LL |     default mod foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: module not supported in `extern` block
+error: module is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:41:5
    |
 LL |     default mod foo {}
@@ -178,7 +178,7 @@ LL |     default extern "C" {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: extern block not supported in `extern` block
+error: extern block is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:43:5
    |
 LL |     default extern "C" {}
@@ -192,7 +192,7 @@ LL |     default enum foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: enum not supported in `extern` block
+error: enum is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:46:5
    |
 LL |     default enum foo {}
@@ -206,7 +206,7 @@ LL |     default struct foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: struct not supported in `extern` block
+error: struct is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:48:5
    |
 LL |     default struct foo {}
@@ -220,7 +220,7 @@ LL |     default union foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: union not supported in `extern` block
+error: union is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:50:5
    |
 LL |     default union foo {}
@@ -234,7 +234,7 @@ LL |     default trait foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: trait not supported in `extern` block
+error: trait is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:52:5
    |
 LL |     default trait foo {}
@@ -248,13 +248,13 @@ LL |     default trait foo = Ord;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: trait alias not supported in `extern` block
+error: trait alias is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:54:5
    |
 LL |     default trait foo = Ord;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: implementation not supported in `extern` block
+error: implementation is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:56:5
    |
 LL |     default impl foo {}
@@ -284,7 +284,7 @@ LL |     default macro foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: macro definition not supported in `extern` block
+error: macro definition is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:62:5
    |
 LL |     default macro foo {}
@@ -298,7 +298,7 @@ LL |     default macro_rules! foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: macro definition not supported in `extern` block
+error: macro definition is not supported in `extern` blocks
   --> $DIR/default-on-wrong-item-kind.rs:64:5
    |
 LL |     default macro_rules! foo {}
@@ -312,7 +312,7 @@ LL |     default extern crate foo;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: extern crate not supported in `trait` or `impl`
+error: extern crate is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:70:5
    |
 LL |     default extern crate foo;
@@ -326,7 +326,7 @@ LL |     default use foo;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: `use` import not supported in `trait` or `impl`
+error: `use` import is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:72:5
    |
 LL |     default use foo;
@@ -354,7 +354,7 @@ LL |     default mod foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: module not supported in `trait` or `impl`
+error: module is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:78:5
    |
 LL |     default mod foo {}
@@ -368,7 +368,7 @@ LL |     default extern "C" {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: extern block not supported in `trait` or `impl`
+error: extern block is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:80:5
    |
 LL |     default extern "C" {}
@@ -382,7 +382,7 @@ LL |     default enum foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: enum not supported in `trait` or `impl`
+error: enum is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:83:5
    |
 LL |     default enum foo {}
@@ -396,7 +396,7 @@ LL |     default struct foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: struct not supported in `trait` or `impl`
+error: struct is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:85:5
    |
 LL |     default struct foo {}
@@ -410,7 +410,7 @@ LL |     default union foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: union not supported in `trait` or `impl`
+error: union is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:87:5
    |
 LL |     default union foo {}
@@ -424,7 +424,7 @@ LL |     default trait foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: trait not supported in `trait` or `impl`
+error: trait is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:89:5
    |
 LL |     default trait foo {}
@@ -438,13 +438,13 @@ LL |     default trait foo = Ord;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: trait alias not supported in `trait` or `impl`
+error: trait alias is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:91:5
    |
 LL |     default trait foo = Ord;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: implementation not supported in `trait` or `impl`
+error: implementation is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:93:5
    |
 LL |     default impl foo {}
@@ -474,7 +474,7 @@ LL |     default macro foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: macro definition not supported in `trait` or `impl`
+error: macro definition is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:99:5
    |
 LL |     default macro foo {}
@@ -488,7 +488,7 @@ LL |     default macro_rules! foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: macro definition not supported in `trait` or `impl`
+error: macro definition is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:101:5
    |
 LL |     default macro_rules! foo {}
@@ -502,7 +502,7 @@ LL |     default extern crate foo;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: extern crate not supported in `trait` or `impl`
+error: extern crate is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:107:5
    |
 LL |     default extern crate foo;
@@ -516,7 +516,7 @@ LL |     default use foo;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: `use` import not supported in `trait` or `impl`
+error: `use` import is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:109:5
    |
 LL |     default use foo;
@@ -544,7 +544,7 @@ LL |     default mod foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: module not supported in `trait` or `impl`
+error: module is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:115:5
    |
 LL |     default mod foo {}
@@ -558,7 +558,7 @@ LL |     default extern "C" {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: extern block not supported in `trait` or `impl`
+error: extern block is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:117:5
    |
 LL |     default extern "C" {}
@@ -572,7 +572,7 @@ LL |     default enum foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: enum not supported in `trait` or `impl`
+error: enum is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:120:5
    |
 LL |     default enum foo {}
@@ -586,7 +586,7 @@ LL |     default struct foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: struct not supported in `trait` or `impl`
+error: struct is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:122:5
    |
 LL |     default struct foo {}
@@ -600,7 +600,7 @@ LL |     default union foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: union not supported in `trait` or `impl`
+error: union is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:124:5
    |
 LL |     default union foo {}
@@ -614,7 +614,7 @@ LL |     default trait foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: trait not supported in `trait` or `impl`
+error: trait is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:126:5
    |
 LL |     default trait foo {}
@@ -628,13 +628,13 @@ LL |     default trait foo = Ord;
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: trait alias not supported in `trait` or `impl`
+error: trait alias is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:128:5
    |
 LL |     default trait foo = Ord;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: implementation not supported in `trait` or `impl`
+error: implementation is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:130:5
    |
 LL |     default impl foo {}
@@ -664,7 +664,7 @@ LL |     default macro foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: macro definition not supported in `trait` or `impl`
+error: macro definition is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:136:5
    |
 LL |     default macro foo {}
@@ -678,7 +678,7 @@ LL |     default macro_rules! foo {}
    |
    = note: only associated `fn`, `const`, and `type` items can be `default`
 
-error: macro definition not supported in `trait` or `impl`
+error: macro definition is not supported in `trait`s or `impl`s
   --> $DIR/default-on-wrong-item-kind.rs:138:5
    |
 LL |     default macro_rules! foo {}
diff --git a/src/test/ui/parser/default-unmatched-assoc.rs b/src/test/ui/parser/default-unmatched-assoc.rs
index 0c8ee0f7800..168ea3e76f6 100644
--- a/src/test/ui/parser/default-unmatched-assoc.rs
+++ b/src/test/ui/parser/default-unmatched-assoc.rs
@@ -3,7 +3,7 @@ fn main() {}
 trait Foo {
     default!(); //~ ERROR cannot find macro `default` in this scope
     default do
-    //~^ ERROR `default` not followed by an item
+    //~^ ERROR `default` is not followed by an item
     //~| ERROR non-item in item list
 }
 
@@ -11,6 +11,6 @@ struct S;
 impl S {
     default!(); //~ ERROR cannot find macro `default` in this scope
     default do
-    //~^ ERROR `default` not followed by an item
+    //~^ ERROR `default` is not followed by an item
     //~| ERROR non-item in item list
 }
diff --git a/src/test/ui/parser/default-unmatched-assoc.stderr b/src/test/ui/parser/default-unmatched-assoc.stderr
index 22db46d63df..c8d1769cb5a 100644
--- a/src/test/ui/parser/default-unmatched-assoc.stderr
+++ b/src/test/ui/parser/default-unmatched-assoc.stderr
@@ -1,4 +1,4 @@
-error: `default` not followed by an item
+error: `default` is not followed by an item
   --> $DIR/default-unmatched-assoc.rs:5:5
    |
 LL |     default do
@@ -18,7 +18,7 @@ LL |     default do
 LL | }
    | - item list ends here
 
-error: `default` not followed by an item
+error: `default` is not followed by an item
   --> $DIR/default-unmatched-assoc.rs:13:5
    |
 LL |     default do
diff --git a/src/test/ui/parser/default-unmatched-extern.rs b/src/test/ui/parser/default-unmatched-extern.rs
index 784df9bc77e..8d0ea590f57 100644
--- a/src/test/ui/parser/default-unmatched-extern.rs
+++ b/src/test/ui/parser/default-unmatched-extern.rs
@@ -3,6 +3,6 @@ fn main() {}
 extern "C" {
     default!(); //~ ERROR cannot find macro `default` in this scope
     default do
-    //~^ ERROR `default` not followed by an item
+    //~^ ERROR `default` is not followed by an item
     //~| ERROR non-item in item list
 }
diff --git a/src/test/ui/parser/default-unmatched-extern.stderr b/src/test/ui/parser/default-unmatched-extern.stderr
index ffbfbc73c18..bb4efd51631 100644
--- a/src/test/ui/parser/default-unmatched-extern.stderr
+++ b/src/test/ui/parser/default-unmatched-extern.stderr
@@ -1,4 +1,4 @@
-error: `default` not followed by an item
+error: `default` is not followed by an item
   --> $DIR/default-unmatched-extern.rs:5:5
    |
 LL |     default do
diff --git a/src/test/ui/parser/default-unmatched.rs b/src/test/ui/parser/default-unmatched.rs
index 796e184a0d8..49346e5c631 100644
--- a/src/test/ui/parser/default-unmatched.rs
+++ b/src/test/ui/parser/default-unmatched.rs
@@ -1,6 +1,6 @@
 mod foo {
     default!(); // OK.
     default do
-    //~^ ERROR `default` not followed by an item
+    //~^ ERROR `default` is not followed by an item
     //~| ERROR expected item, found reserved keyword `do`
 }
diff --git a/src/test/ui/parser/default-unmatched.stderr b/src/test/ui/parser/default-unmatched.stderr
index 26012557761..331e003f63c 100644
--- a/src/test/ui/parser/default-unmatched.stderr
+++ b/src/test/ui/parser/default-unmatched.stderr
@@ -1,4 +1,4 @@
-error: `default` not followed by an item
+error: `default` is not followed by an item
   --> $DIR/default-unmatched.rs:3:5
    |
 LL |     default do
diff --git a/src/test/ui/parser/default.rs b/src/test/ui/parser/default.rs
index 6cfa141478e..64ba4b55311 100644
--- a/src/test/ui/parser/default.rs
+++ b/src/test/ui/parser/default.rs
@@ -20,7 +20,7 @@ impl Foo for u16 {
 
 impl Foo for u32 { //~ ERROR not all trait items implemented, missing: `foo`
     default pub fn foo<T: Default>() -> T { T::default() }
-    //~^ ERROR `default` not followed by an item
+    //~^ ERROR `default` is not followed by an item
     //~| ERROR non-item in item list
 }
 
diff --git a/src/test/ui/parser/default.stderr b/src/test/ui/parser/default.stderr
index 96b14b42767..15c49e8b627 100644
--- a/src/test/ui/parser/default.stderr
+++ b/src/test/ui/parser/default.stderr
@@ -1,4 +1,4 @@
-error: `default` not followed by an item
+error: `default` is not followed by an item
   --> $DIR/default.rs:22:5
    |
 LL |     default pub fn foo<T: Default>() -> T { T::default() }
diff --git a/src/test/ui/parser/duplicate-visibility.rs b/src/test/ui/parser/duplicate-visibility.rs
index edea2d1e5e2..31318ae3a09 100644
--- a/src/test/ui/parser/duplicate-visibility.rs
+++ b/src/test/ui/parser/duplicate-visibility.rs
@@ -2,6 +2,6 @@ fn main() {}
 
 extern {
     pub pub fn foo();
-    //~^ ERROR visibility `pub` not followed by an item
+    //~^ ERROR visibility `pub` is not followed by an item
     //~| ERROR non-item in item list
 }
diff --git a/src/test/ui/parser/duplicate-visibility.stderr b/src/test/ui/parser/duplicate-visibility.stderr
index d8e38046a6c..36b9efd9dca 100644
--- a/src/test/ui/parser/duplicate-visibility.stderr
+++ b/src/test/ui/parser/duplicate-visibility.stderr
@@ -1,4 +1,4 @@
-error: visibility `pub` not followed by an item
+error: visibility `pub` is not followed by an item
   --> $DIR/duplicate-visibility.rs:4:5
    |
 LL |     pub pub fn foo();
diff --git a/src/test/ui/parser/impl-parsing.rs b/src/test/ui/parser/impl-parsing.rs
index c2ed7531a94..80ce8885570 100644
--- a/src/test/ui/parser/impl-parsing.rs
+++ b/src/test/ui/parser/impl-parsing.rs
@@ -7,4 +7,4 @@ impl ?Sized for Type {} //~ ERROR expected a trait, found type
 impl ?Sized for .. {} //~ ERROR expected a trait, found type
 
 default unsafe FAIL //~ ERROR expected item, found keyword `unsafe`
-//~^ ERROR `default` not followed by an item
+//~^ ERROR `default` is not followed by an item
diff --git a/src/test/ui/parser/impl-parsing.stderr b/src/test/ui/parser/impl-parsing.stderr
index ce673765aba..755addf1452 100644
--- a/src/test/ui/parser/impl-parsing.stderr
+++ b/src/test/ui/parser/impl-parsing.stderr
@@ -22,7 +22,7 @@ error: expected a trait, found type
 LL | impl ?Sized for .. {}
    |      ^^^^^^
 
-error: `default` not followed by an item
+error: `default` is not followed by an item
   --> $DIR/impl-parsing.rs:9:1
    |
 LL | default unsafe FAIL
diff --git a/src/test/ui/parser/issue-41155.rs b/src/test/ui/parser/issue-41155.rs
index 5bfbe0c5e68..5a7488e6ffc 100644
--- a/src/test/ui/parser/issue-41155.rs
+++ b/src/test/ui/parser/issue-41155.rs
@@ -1,7 +1,7 @@
 struct S;
 
 impl S {
-    pub //~ ERROR visibility `pub` not followed by an item
+    pub //~ ERROR visibility `pub` is not followed by an item
 } //~ ERROR non-item in item list
 
 fn main() {}
diff --git a/src/test/ui/parser/issue-41155.stderr b/src/test/ui/parser/issue-41155.stderr
index 09bbee51800..8491afae230 100644
--- a/src/test/ui/parser/issue-41155.stderr
+++ b/src/test/ui/parser/issue-41155.stderr
@@ -1,4 +1,4 @@
-error: visibility `pub` not followed by an item
+error: visibility `pub` is not followed by an item
   --> $DIR/issue-41155.rs:4:5
    |
 LL |     pub
diff --git a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs
index b26e5134db6..8f46970b1af 100644
--- a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs
+++ b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.rs
@@ -4,10 +4,10 @@ impl T for () { //~ ERROR cannot find trait `T` in this scope
 
 fn foo(&self) {}
 
-trait T { //~ ERROR trait not supported in `trait` or `impl`
+trait T { //~ ERROR trait is not supported in `trait`s or `impl`s
     fn foo(&self);
 }
 
-pub(crate) struct Bar<T>(); //~ ERROR struct not supported in `trait` or `impl`
+pub(crate) struct Bar<T>(); //~ ERROR struct is not supported in `trait`s or `impl`s
 
 //~ ERROR this file contains an unclosed delimiter
diff --git a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
index b1bd1a784be..1655a968395 100644
--- a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
+++ b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-impl-trait.stderr
@@ -7,13 +7,13 @@ LL | impl T for () {
 LL |
    |                                                    ^
 
-error: trait not supported in `trait` or `impl`
+error: trait is not supported in `trait`s or `impl`s
   --> $DIR/missing-close-brace-in-impl-trait.rs:7:1
    |
 LL | trait T {
    | ^^^^^^^
 
-error: struct not supported in `trait` or `impl`
+error: struct is not supported in `trait`s or `impl`s
   --> $DIR/missing-close-brace-in-impl-trait.rs:11:1
    |
 LL | pub(crate) struct Bar<T>();
diff --git a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.rs b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.rs
index d52add27398..b6932deb5c0 100644
--- a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.rs
+++ b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.rs
@@ -2,10 +2,10 @@ trait T {
     fn foo(&self);
 
 pub(crate) struct Bar<T>();
-//~^ ERROR struct not supported in `trait` or `impl`
+//~^ ERROR struct is not supported in `trait`s or `impl`s
 
 impl T for Bar<usize> {
-//~^ ERROR implementation not supported in `trait` or `impl`
+//~^ ERROR implementation is not supported in `trait`s or `impl`s
 fn foo(&self) {}
 }
 
diff --git a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
index 49c685f2549..43a3883357a 100644
--- a/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
+++ b/src/test/ui/parser/mismatched-braces/missing-close-brace-in-trait.stderr
@@ -7,13 +7,13 @@ LL | trait T {
 LL | fn main() {}
    |                                                                 ^
 
-error: struct not supported in `trait` or `impl`
+error: struct is not supported in `trait`s or `impl`s
   --> $DIR/missing-close-brace-in-trait.rs:4:1
    |
 LL | pub(crate) struct Bar<T>();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: implementation not supported in `trait` or `impl`
+error: implementation is not supported in `trait`s or `impl`s
   --> $DIR/missing-close-brace-in-trait.rs:7:1
    |
 LL | impl T for Bar<usize> {
diff --git a/src/test/ui/pub/pub-restricted-error-fn.rs b/src/test/ui/pub/pub-restricted-error-fn.rs
index 73806fdfe72..fc1aeae2b0c 100644
--- a/src/test/ui/pub/pub-restricted-error-fn.rs
+++ b/src/test/ui/pub/pub-restricted-error-fn.rs
@@ -1,2 +1,2 @@
-pub(crate) () fn foo() {} //~ ERROR visibility `pub(crate)` not followed by an item
+pub(crate) () fn foo() {} //~ ERROR visibility `pub(crate)` is not followed by an item
 //~^ ERROR expected item, found `(`
diff --git a/src/test/ui/pub/pub-restricted-error-fn.stderr b/src/test/ui/pub/pub-restricted-error-fn.stderr
index 42d03941e41..0511a821a7a 100644
--- a/src/test/ui/pub/pub-restricted-error-fn.stderr
+++ b/src/test/ui/pub/pub-restricted-error-fn.stderr
@@ -1,4 +1,4 @@
-error: visibility `pub(crate)` not followed by an item
+error: visibility `pub(crate)` is not followed by an item
   --> $DIR/pub-restricted-error-fn.rs:1:1
    |
 LL | pub(crate) () fn foo() {}