about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-11-11 19:46:04 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-11-18 13:57:03 +0300
commitcfd762954bd2410d57950045bf5009769ac4947f (patch)
tree20c581eeff67d11b45234c6fd44b22a5aa66e99b
parentcfe81559ee970b99e45a73af02ba4837cb30b6db (diff)
downloadrust-cfd762954bd2410d57950045bf5009769ac4947f.tar.gz
rust-cfd762954bd2410d57950045bf5009769ac4947f.zip
resolve: Tweak some articles in ambiguity diagnostics
-rw-r--r--src/librustc_resolve/lib.rs10
-rw-r--r--src/test/ui-fulldeps/custom-derive/helper-attr-blocked-by-import-ambig.stderr2
-rw-r--r--src/test/ui-fulldeps/proc-macro/ambiguous-builtin-attrs.stderr10
-rw-r--r--src/test/ui-fulldeps/proc-macro/derive-helper-shadowing.stderr2
-rw-r--r--src/test/ui/empty/empty-struct-tuple-pat.stderr4
-rw-r--r--src/test/ui/enum/enum-in-scope.stderr2
-rw-r--r--src/test/ui/error-codes/E0530.stderr2
-rw-r--r--src/test/ui/imports/glob-shadowing.stderr4
-rw-r--r--src/test/ui/imports/issue-53269.stderr2
-rw-r--r--src/test/ui/imports/local-modularized-tricky-fail-1.stderr6
-rw-r--r--src/test/ui/imports/macro-paths.stderr2
-rw-r--r--src/test/ui/imports/macros.stderr2
-rw-r--r--src/test/ui/imports/shadow_builtin_macros.stderr6
-rw-r--r--src/test/ui/issues/issue-16149.stderr2
-rw-r--r--src/test/ui/issues/issue-17718-patterns.stderr4
-rw-r--r--src/test/ui/issues/issue-23716.stderr4
-rw-r--r--src/test/ui/issues/issue-27033.stderr2
-rw-r--r--src/test/ui/issues/issue-34047.stderr2
-rw-r--r--src/test/ui/macros/macro-path-prelude-shadowing.stderr2
-rw-r--r--src/test/ui/pattern/pat-shadow-in-nested-binding.stderr2
-rw-r--r--src/test/ui/pattern/pattern-binding-disambiguation.stderr16
-rw-r--r--src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros-nested.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-nested.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths-forward-compat/block-scoped-shadow.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/ambiguity.stderr4
-rw-r--r--src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr2
-rw-r--r--src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr6
-rw-r--r--src/test/ui/static/static-mut-not-pat.stderr4
33 files changed, 68 insertions, 68 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index ff222397e59..257964cba1c 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -406,13 +406,13 @@ fn resolve_struct_error<'sess, 'a>(resolver: &'sess Resolver,
             err
         }
         ResolutionError::BindingShadowsSomethingUnacceptable(what_binding, name, binding) => {
-            let (shadows_what, article) = (binding.descr(), binding.article());
+            let shadows_what = binding.descr();
             let mut err = struct_span_err!(resolver.session, span, E0530, "{}s cannot shadow {}s",
                                            what_binding, shadows_what);
             err.span_label(span, format!("cannot be named the same as {} {}",
-                                         article, shadows_what));
+                                         binding.article(), shadows_what));
             let participle = if binding.is_import() { "imported" } else { "defined" };
-            let msg = format!("{} {} `{}` is {} here", article, shadows_what, name, participle);
+            let msg = format!("the {} `{}` is {} here", shadows_what, name, participle);
             err.span_label(binding.span, msg);
             err
         }
@@ -4788,11 +4788,11 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
                                         `{ident}` to disambiguate", ident = ident))
             }
             if b.is_extern_crate() && self.session.rust_2018() {
-                help_msgs.push(format!("use `::{ident}` to refer to the {thing} unambiguously",
+                help_msgs.push(format!("use `::{ident}` to refer to this {thing} unambiguously",
                                        ident = ident, thing = b.descr()))
             }
             if misc == AmbiguityErrorMisc::SuggestSelf {
-                help_msgs.push(format!("use `self::{ident}` to refer to the {thing} unambiguously",
+                help_msgs.push(format!("use `self::{ident}` to refer to this {thing} unambiguously",
                                        ident = ident, thing = b.descr()))
             }
 
diff --git a/src/test/ui-fulldeps/custom-derive/helper-attr-blocked-by-import-ambig.stderr b/src/test/ui-fulldeps/custom-derive/helper-attr-blocked-by-import-ambig.stderr
index fc55dc1eef6..ee98873064f 100644
--- a/src/test/ui-fulldeps/custom-derive/helper-attr-blocked-by-import-ambig.stderr
+++ b/src/test/ui-fulldeps/custom-derive/helper-attr-blocked-by-import-ambig.stderr
@@ -14,7 +14,7 @@ note: `helper` could also refer to the attribute macro imported here
    |
 LL | use plugin::helper;
    |     ^^^^^^^^^^^^^^
-   = help: use `self::helper` to refer to the attribute macro unambiguously
+   = help: use `self::helper` to refer to this attribute macro unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui-fulldeps/proc-macro/ambiguous-builtin-attrs.stderr b/src/test/ui-fulldeps/proc-macro/ambiguous-builtin-attrs.stderr
index 00f5cfc2613..34b21ea2683 100644
--- a/src/test/ui-fulldeps/proc-macro/ambiguous-builtin-attrs.stderr
+++ b/src/test/ui-fulldeps/proc-macro/ambiguous-builtin-attrs.stderr
@@ -16,7 +16,7 @@ note: `repr` could also refer to the attribute macro imported here
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
-   = help: use `self::repr` to refer to the attribute macro unambiguously
+   = help: use `self::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous (built-in attribute vs any other name)
   --> $DIR/ambiguous-builtin-attrs.rs:11:19
@@ -30,7 +30,7 @@ note: `repr` could also refer to the attribute macro imported here
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
-   = help: use `self::repr` to refer to the attribute macro unambiguously
+   = help: use `self::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous (built-in attribute vs any other name)
   --> $DIR/ambiguous-builtin-attrs.rs:20:34
@@ -44,7 +44,7 @@ note: `repr` could also refer to the attribute macro imported here
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
-   = help: use `self::repr` to refer to the attribute macro unambiguously
+   = help: use `self::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `repr` is ambiguous (built-in attribute vs any other name)
   --> $DIR/ambiguous-builtin-attrs.rs:22:11
@@ -58,7 +58,7 @@ note: `repr` could also refer to the attribute macro imported here
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
-   = help: use `self::repr` to refer to the attribute macro unambiguously
+   = help: use `self::repr` to refer to this attribute macro unambiguously
 
 error[E0659]: `feature` is ambiguous (built-in attribute vs any other name)
   --> $DIR/ambiguous-builtin-attrs.rs:3:4
@@ -72,7 +72,7 @@ note: `feature` could also refer to the attribute macro imported here
    |
 LL | use builtin_attrs::*;
    |     ^^^^^^^^^^^^^^^^
-   = help: use `self::feature` to refer to the attribute macro unambiguously
+   = help: use `self::feature` to refer to this attribute macro unambiguously
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui-fulldeps/proc-macro/derive-helper-shadowing.stderr b/src/test/ui-fulldeps/proc-macro/derive-helper-shadowing.stderr
index 4950b016d37..f04782fac4d 100644
--- a/src/test/ui-fulldeps/proc-macro/derive-helper-shadowing.stderr
+++ b/src/test/ui-fulldeps/proc-macro/derive-helper-shadowing.stderr
@@ -14,7 +14,7 @@ note: `my_attr` could also refer to the attribute macro imported here
    |
 LL | use derive_helper_shadowing::*;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = help: use `self::my_attr` to refer to the attribute macro unambiguously
+   = help: use `self::my_attr` to refer to this attribute macro unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/src/test/ui/empty/empty-struct-tuple-pat.stderr
index 3d219b1752f..3708aa36089 100644
--- a/src/test/ui/empty/empty-struct-tuple-pat.stderr
+++ b/src/test/ui/empty/empty-struct-tuple-pat.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow tuple structs
   --> $DIR/empty-struct-tuple-pat.rs:32:9
    |
 LL | struct Empty2();
-   | ---------------- a tuple struct `Empty2` is defined here
+   | ---------------- the tuple struct `Empty2` is defined here
 ...
 LL |         Empty2 => () //~ ERROR match bindings cannot shadow tuple structs
    |         ^^^^^^ cannot be named the same as a tuple struct
@@ -11,7 +11,7 @@ error[E0530]: match bindings cannot shadow tuple structs
   --> $DIR/empty-struct-tuple-pat.rs:35:9
    |
 LL | use empty_struct::*;
-   |     --------------- a tuple struct `XEmpty6` is imported here
+   |     --------------- the tuple struct `XEmpty6` is imported here
 ...
 LL |         XEmpty6 => () //~ ERROR match bindings cannot shadow tuple structs
    |         ^^^^^^^ cannot be named the same as a tuple struct
diff --git a/src/test/ui/enum/enum-in-scope.stderr b/src/test/ui/enum/enum-in-scope.stderr
index 1e8d5940495..b294aabb4ed 100644
--- a/src/test/ui/enum/enum-in-scope.stderr
+++ b/src/test/ui/enum/enum-in-scope.stderr
@@ -2,7 +2,7 @@ error[E0530]: let bindings cannot shadow tuple structs
   --> $DIR/enum-in-scope.rs:14:9
    |
 LL | struct hello(isize);
-   | -------------------- a tuple struct `hello` is defined here
+   | -------------------- the tuple struct `hello` is defined here
 ...
 LL |     let hello = 0; //~ERROR let bindings cannot shadow tuple structs
    |         ^^^^^ cannot be named the same as a tuple struct
diff --git a/src/test/ui/error-codes/E0530.stderr b/src/test/ui/error-codes/E0530.stderr
index e157ca9042c..96bc47a1afe 100644
--- a/src/test/ui/error-codes/E0530.stderr
+++ b/src/test/ui/error-codes/E0530.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/E0530.rs:16:9
    |
 LL |     static TEST: i32 = 0;
-   |     --------------------- a static `TEST` is defined here
+   |     --------------------- the static `TEST` is defined here
 ...
 LL |         TEST => {} //~ ERROR E0530
    |         ^^^^ cannot be named the same as a static
diff --git a/src/test/ui/imports/glob-shadowing.stderr b/src/test/ui/imports/glob-shadowing.stderr
index 93d3fa969ef..6a4774facd7 100644
--- a/src/test/ui/imports/glob-shadowing.stderr
+++ b/src/test/ui/imports/glob-shadowing.stderr
@@ -11,7 +11,7 @@ note: `env` could also refer to the macro imported here
 LL |     use m::*;
    |         ^^^^
    = help: consider adding an explicit import of `env` to disambiguate
-   = help: or use `self::env` to refer to the macro unambiguously
+   = help: or use `self::env` to refer to this macro unambiguously
 
 error[E0659]: `env` is ambiguous (glob import vs any other name from outer scope during import/macro resolution)
   --> $DIR/glob-shadowing.rs:29:21
@@ -44,7 +44,7 @@ note: `fenv` could also refer to the macro defined here
    |
 LL |     pub macro fenv($e: expr) { $e }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = help: use `self::fenv` to refer to the macro unambiguously
+   = help: use `self::fenv` to refer to this macro unambiguously
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/imports/issue-53269.stderr b/src/test/ui/imports/issue-53269.stderr
index 9fa438e91cd..781595212f8 100644
--- a/src/test/ui/imports/issue-53269.stderr
+++ b/src/test/ui/imports/issue-53269.stderr
@@ -20,7 +20,7 @@ note: `mac` could also refer to the unresolved item imported here
    |
 LL |     use nonexistent_module::mac; //~ ERROR unresolved import `nonexistent_module`
    |         ^^^^^^^^^^^^^^^^^^^^^^^
-   = help: use `self::mac` to refer to the unresolved item unambiguously
+   = help: use `self::mac` to refer to this unresolved item unambiguously
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr
index 91e569d1764..962294e48ca 100644
--- a/src/test/ui/imports/local-modularized-tricky-fail-1.stderr
+++ b/src/test/ui/imports/local-modularized-tricky-fail-1.stderr
@@ -38,7 +38,7 @@ LL | |     }
 ...
 LL |       define_include!();
    |       ------------------ in this macro invocation
-   = help: use `self::include` to refer to the macro unambiguously
+   = help: use `self::include` to refer to this macro unambiguously
 
 error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
   --> $DIR/local-modularized-tricky-fail-1.rs:45:5
@@ -57,7 +57,7 @@ LL | |     }
 ...
 LL |       define_panic!();
    |       ---------------- in this macro invocation
-   = help: use `self::panic` to refer to the macro unambiguously
+   = help: use `self::panic` to refer to this macro unambiguously
 
 error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
   --> <::std::macros::panic macros>:1:13
@@ -76,7 +76,7 @@ LL | |     }
 ...
 LL |       define_panic!();
    |       ---------------- in this macro invocation
-   = help: use `self::panic` to refer to the macro unambiguously
+   = help: use `self::panic` to refer to this macro unambiguously
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/imports/macro-paths.stderr b/src/test/ui/imports/macro-paths.stderr
index 96880492e28..8e8742f849b 100644
--- a/src/test/ui/imports/macro-paths.stderr
+++ b/src/test/ui/imports/macro-paths.stderr
@@ -34,7 +34,7 @@ LL | / pub mod baz {
 LL | |     pub use two_macros::m;
 LL | | }
    | |_^
-   = help: use `self::baz` to refer to the module unambiguously
+   = help: use `self::baz` to refer to this module unambiguously
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/imports/macros.stderr b/src/test/ui/imports/macros.stderr
index ade49e6be24..77a0311fa60 100644
--- a/src/test/ui/imports/macros.stderr
+++ b/src/test/ui/imports/macros.stderr
@@ -32,7 +32,7 @@ note: `m` could also refer to the macro imported here
    |
 LL |     use two_macros::m;
    |         ^^^^^^^^^^^^^
-   = help: use `self::m` to refer to the macro unambiguously
+   = help: use `self::m` to refer to this macro unambiguously
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/imports/shadow_builtin_macros.stderr b/src/test/ui/imports/shadow_builtin_macros.stderr
index 4d6c1aa3ea5..b53b7e2700d 100644
--- a/src/test/ui/imports/shadow_builtin_macros.stderr
+++ b/src/test/ui/imports/shadow_builtin_macros.stderr
@@ -11,7 +11,7 @@ note: `panic` could also refer to the macro imported here
 LL |     use foo::*;
    |         ^^^^^^
    = help: consider adding an explicit import of `panic` to disambiguate
-   = help: or use `self::panic` to refer to the macro unambiguously
+   = help: or use `self::panic` to refer to this macro unambiguously
 
 error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
   --> $DIR/shadow_builtin_macros.rs:30:14
@@ -25,7 +25,7 @@ note: `panic` could also refer to the macro imported here
    |
 LL |     ::two_macros::m!(use foo::panic;);
    |                          ^^^^^^^^^^
-   = help: use `self::panic` to refer to the macro unambiguously
+   = help: use `self::panic` to refer to this macro unambiguously
 
 error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
   --> $DIR/shadow_builtin_macros.rs:43:5
@@ -55,7 +55,7 @@ note: `n` could refer to the macro imported here
 LL |     use bar::*;
    |         ^^^^^^
    = help: consider adding an explicit import of `n` to disambiguate
-   = help: or use `self::n` to refer to the macro unambiguously
+   = help: or use `self::n` to refer to this macro unambiguously
 note: `n` could also refer to the macro imported here
   --> $DIR/shadow_builtin_macros.rs:46:13
    |
diff --git a/src/test/ui/issues/issue-16149.stderr b/src/test/ui/issues/issue-16149.stderr
index b0b6e9dfcd0..284ed035526 100644
--- a/src/test/ui/issues/issue-16149.stderr
+++ b/src/test/ui/issues/issue-16149.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/issue-16149.rs:17:9
    |
 LL |     static externalValue: isize;
-   |     ---------------------------- a static `externalValue` is defined here
+   |     ---------------------------- the static `externalValue` is defined here
 ...
 LL |         externalValue => true,
    |         ^^^^^^^^^^^^^ cannot be named the same as a static
diff --git a/src/test/ui/issues/issue-17718-patterns.stderr b/src/test/ui/issues/issue-17718-patterns.stderr
index 13cab9a08b1..c49613eb33c 100644
--- a/src/test/ui/issues/issue-17718-patterns.stderr
+++ b/src/test/ui/issues/issue-17718-patterns.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/issue-17718-patterns.rs:17:9
    |
 LL | static A1: usize = 1;
-   | --------------------- a static `A1` is defined here
+   | --------------------- the static `A1` is defined here
 ...
 LL |         A1 => {} //~ ERROR: match bindings cannot shadow statics
    |         ^^ cannot be named the same as a static
@@ -11,7 +11,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/issue-17718-patterns.rs:18:9
    |
 LL | static mut A2: usize = 1;
-   | ------------------------- a static `A2` is defined here
+   | ------------------------- the static `A2` is defined here
 ...
 LL |         A2 => {} //~ ERROR: match bindings cannot shadow statics
    |         ^^ cannot be named the same as a static
diff --git a/src/test/ui/issues/issue-23716.stderr b/src/test/ui/issues/issue-23716.stderr
index fd268c1b5a1..c175f197034 100644
--- a/src/test/ui/issues/issue-23716.stderr
+++ b/src/test/ui/issues/issue-23716.stderr
@@ -2,7 +2,7 @@ error[E0530]: function parameters cannot shadow statics
   --> $DIR/issue-23716.rs:13:8
    |
 LL | static foo: i32 = 0;
-   | -------------------- a static `foo` is defined here
+   | -------------------- the static `foo` is defined here
 LL | 
 LL | fn bar(foo: i32) {}
    |        ^^^ cannot be named the same as a static
@@ -11,7 +11,7 @@ error[E0530]: function parameters cannot shadow statics
   --> $DIR/issue-23716.rs:23:13
    |
 LL | use self::submod::answer;
-   |     -------------------- a static `answer` is imported here
+   |     -------------------- the static `answer` is imported here
 LL | 
 LL | fn question(answer: i32) {}
    |             ^^^^^^ cannot be named the same as a static
diff --git a/src/test/ui/issues/issue-27033.stderr b/src/test/ui/issues/issue-27033.stderr
index ba573c3eb6d..dfd635d36e8 100644
--- a/src/test/ui/issues/issue-27033.stderr
+++ b/src/test/ui/issues/issue-27033.stderr
@@ -8,7 +8,7 @@ error[E0530]: match bindings cannot shadow constants
   --> $DIR/issue-27033.rs:17:9
    |
 LL |     const C: u8 = 1;
-   |     ---------------- a constant `C` is defined here
+   |     ---------------- the constant `C` is defined here
 LL |     match 1 {
 LL |         C @ 2 => { //~ ERROR match bindings cannot shadow constant
    |         ^ cannot be named the same as a constant
diff --git a/src/test/ui/issues/issue-34047.stderr b/src/test/ui/issues/issue-34047.stderr
index 10804cc6fff..10e4e9c1c12 100644
--- a/src/test/ui/issues/issue-34047.stderr
+++ b/src/test/ui/issues/issue-34047.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow constants
   --> $DIR/issue-34047.rs:15:13
    |
 LL | const C: u8 = 0;
-   | ---------------- a constant `C` is defined here
+   | ---------------- the constant `C` is defined here
 ...
 LL |         mut C => {} //~ ERROR match bindings cannot shadow constants
    |             ^ cannot be named the same as a constant
diff --git a/src/test/ui/macros/macro-path-prelude-shadowing.stderr b/src/test/ui/macros/macro-path-prelude-shadowing.stderr
index 3e0ea823642..904eed9f249 100644
--- a/src/test/ui/macros/macro-path-prelude-shadowing.stderr
+++ b/src/test/ui/macros/macro-path-prelude-shadowing.stderr
@@ -11,7 +11,7 @@ note: `std` could also refer to the module imported here
 LL |     use m2::*; // glob-import user-defined `std`
    |         ^^^^^
    = help: consider adding an explicit import of `std` to disambiguate
-   = help: or use `self::std` to refer to the module unambiguously
+   = help: or use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr b/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr
index 9dd6a318e98..994c78d575e 100644
--- a/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr
+++ b/src/test/ui/pattern/pat-shadow-in-nested-binding.stderr
@@ -2,7 +2,7 @@ error[E0530]: let bindings cannot shadow tuple structs
   --> $DIR/pat-shadow-in-nested-binding.rs:14:10
    |
 LL | struct foo(usize);
-   | ------------------ a tuple struct `foo` is defined here
+   | ------------------ the tuple struct `foo` is defined here
 ...
 LL |     let (foo, _) = (2, 3); //~ ERROR let bindings cannot shadow tuple structs
    |          ^^^ cannot be named the same as a tuple struct
diff --git a/src/test/ui/pattern/pattern-binding-disambiguation.stderr b/src/test/ui/pattern/pattern-binding-disambiguation.stderr
index 7acdb07e10d..5d14610b8a1 100644
--- a/src/test/ui/pattern/pattern-binding-disambiguation.stderr
+++ b/src/test/ui/pattern/pattern-binding-disambiguation.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow tuple structs
   --> $DIR/pattern-binding-disambiguation.rs:34:9
    |
 LL | struct TupleStruct();
-   | --------------------- a tuple struct `TupleStruct` is defined here
+   | --------------------- the tuple struct `TupleStruct` is defined here
 ...
 LL |         TupleStruct => {} //~ ERROR match bindings cannot shadow tuple structs
    |         ^^^^^^^^^^^ cannot be named the same as a tuple struct
@@ -11,7 +11,7 @@ error[E0530]: match bindings cannot shadow tuple variants
   --> $DIR/pattern-binding-disambiguation.rs:43:9
    |
 LL | use E::*;
-   |     ---- a tuple variant `TupleVariant` is imported here
+   |     ---- the tuple variant `TupleVariant` is imported here
 ...
 LL |         TupleVariant => {} //~ ERROR match bindings cannot shadow tuple variants
    |         ^^^^^^^^^^^^ cannot be named the same as a tuple variant
@@ -20,7 +20,7 @@ error[E0530]: match bindings cannot shadow struct variants
   --> $DIR/pattern-binding-disambiguation.rs:46:9
    |
 LL | use E::*;
-   |     ---- a struct variant `BracedVariant` is imported here
+   |     ---- the struct variant `BracedVariant` is imported here
 ...
 LL |         BracedVariant => {} //~ ERROR match bindings cannot shadow struct variants
    |         ^^^^^^^^^^^^^ cannot be named the same as a struct variant
@@ -29,7 +29,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/pattern-binding-disambiguation.rs:52:9
    |
 LL | static STATIC: () = ();
-   | ----------------------- a static `STATIC` is defined here
+   | ----------------------- the static `STATIC` is defined here
 ...
 LL |         STATIC => {} //~ ERROR match bindings cannot shadow statics
    |         ^^^^^^ cannot be named the same as a static
@@ -38,7 +38,7 @@ error[E0530]: let bindings cannot shadow tuple structs
   --> $DIR/pattern-binding-disambiguation.rs:59:9
    |
 LL | struct TupleStruct();
-   | --------------------- a tuple struct `TupleStruct` is defined here
+   | --------------------- the tuple struct `TupleStruct` is defined here
 ...
 LL |     let TupleStruct = doesnt_matter; //~ ERROR let bindings cannot shadow tuple structs
    |         ^^^^^^^^^^^ cannot be named the same as a tuple struct
@@ -47,7 +47,7 @@ error[E0530]: let bindings cannot shadow tuple variants
   --> $DIR/pattern-binding-disambiguation.rs:62:9
    |
 LL | use E::*;
-   |     ---- a tuple variant `TupleVariant` is imported here
+   |     ---- the tuple variant `TupleVariant` is imported here
 ...
 LL |     let TupleVariant = doesnt_matter; //~ ERROR let bindings cannot shadow tuple variants
    |         ^^^^^^^^^^^^ cannot be named the same as a tuple variant
@@ -56,7 +56,7 @@ error[E0530]: let bindings cannot shadow struct variants
   --> $DIR/pattern-binding-disambiguation.rs:63:9
    |
 LL | use E::*;
-   |     ---- a struct variant `BracedVariant` is imported here
+   |     ---- the struct variant `BracedVariant` is imported here
 ...
 LL |     let BracedVariant = doesnt_matter; //~ ERROR let bindings cannot shadow struct variants
    |         ^^^^^^^^^^^^^ cannot be named the same as a struct variant
@@ -65,7 +65,7 @@ error[E0530]: let bindings cannot shadow statics
   --> $DIR/pattern-binding-disambiguation.rs:65:9
    |
 LL | static STATIC: () = ();
-   | ----------------------- a static `STATIC` is defined here
+   | ----------------------- the static `STATIC` is defined here
 ...
 LL |     let STATIC = doesnt_matter; //~ ERROR let bindings cannot shadow statics
    |         ^^^^^^ cannot be named the same as a static
diff --git a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros-nested.stderr b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros-nested.stderr
index b8cbabeea2c..204e0a7e141 100644
--- a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros-nested.stderr
+++ b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros-nested.stderr
@@ -5,7 +5,7 @@ LL |     pub use std::io;
    |             ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity-macros-nested.rs:21:13
    |
@@ -16,7 +16,7 @@ LL | |             }
 ...
 LL |       m!();
    |       ----- in this macro invocation
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros.stderr b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros.stderr
index 5c9ab110854..ac8d3b9d0cb 100644
--- a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros.stderr
+++ b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-macros.stderr
@@ -5,7 +5,7 @@ LL | use std::io;
    |     ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity-macros.rs:20:9
    |
@@ -16,7 +16,7 @@ LL | |         }
 ...
 LL |   m!();
    |   ----- in this macro invocation
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-nested.stderr b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-nested.stderr
index e98b9ad9a2a..7bcfc563d39 100644
--- a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-nested.stderr
+++ b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity-nested.stderr
@@ -5,7 +5,7 @@ LL |     pub use std::io;
    |             ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity-nested.rs:19:5
    |
@@ -13,7 +13,7 @@ LL | /     mod std {
 LL | |         pub struct io;
 LL | |     }
    | |_____^
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity.stderr b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity.stderr
index 75387454015..beeb74654e5 100644
--- a/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity.stderr
+++ b/src/test/ui/rust-2018/uniform-paths-forward-compat/ambiguity.stderr
@@ -5,7 +5,7 @@ LL | use std::io;
    |     ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity.rs:16:1
    |
@@ -13,7 +13,7 @@ LL | / mod std {
 LL | |     pub struct io;
 LL | | }
    | |_^
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths-forward-compat/block-scoped-shadow.stderr b/src/test/ui/rust-2018/uniform-paths-forward-compat/block-scoped-shadow.stderr
index d0e3d002b08..5d539e2d59f 100644
--- a/src/test/ui/rust-2018/uniform-paths-forward-compat/block-scoped-shadow.stderr
+++ b/src/test/ui/rust-2018/uniform-paths-forward-compat/block-scoped-shadow.stderr
@@ -14,7 +14,7 @@ note: `std` could also refer to the struct defined here
    |
 LL | struct std;
    | ^^^^^^^^^^^
-   = help: use `self::std` to refer to the struct unambiguously
+   = help: use `self::std` to refer to this struct unambiguously
 
 error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
   --> $DIR/block-scoped-shadow.rs:18:9
@@ -32,7 +32,7 @@ note: `std` could also refer to the unit struct defined here
    |
 LL | struct std;
    | ^^^^^^^^^^^
-   = help: use `self::std` to refer to the unit struct unambiguously
+   = help: use `self::std` to refer to this unit struct unambiguously
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr
index f18de7edcdc..8b893cf26fb 100644
--- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr
@@ -5,7 +5,7 @@ LL |     pub use std::io;
    |             ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity-macros-nested.rs:23:13
    |
@@ -16,7 +16,7 @@ LL | |             }
 ...
 LL |       m!();
    |       ----- in this macro invocation
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr
index 16e083b0980..4b81a9860db 100644
--- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr
@@ -5,7 +5,7 @@ LL | use std::io;
    |     ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity-macros.rs:22:9
    |
@@ -16,7 +16,7 @@ LL | |         }
 ...
 LL |   m!();
    |   ----- in this macro invocation
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr
index cb38102c599..6415f46b38a 100644
--- a/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr
@@ -5,7 +5,7 @@ LL |     pub use std::io;
    |             ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity-nested.rs:21:5
    |
@@ -13,7 +13,7 @@ LL | /     mod std {
 LL | |         pub struct io;
 LL | |     }
    | |_____^
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr
index ce0c64b226b..93044ff2222 100644
--- a/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr
@@ -5,7 +5,7 @@ LL | use std::io;
    |     ^^^ ambiguous name
    |
    = note: `std` could refer to a built-in extern crate
-   = help: use `::std` to refer to the extern crate unambiguously
+   = help: use `::std` to refer to this extern crate unambiguously
 note: `std` could also refer to the module defined here
   --> $DIR/ambiguity.rs:18:1
    |
@@ -13,7 +13,7 @@ LL | / mod std {
 LL | |     pub struct io;
 LL | | }
    | |_^
-   = help: use `self::std` to refer to the module unambiguously
+   = help: use `self::std` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr
index 32f5cb30177..e0064fe8fe2 100644
--- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr
@@ -16,7 +16,7 @@ LL | / mod sub {
 LL | |     pub fn bar() {}
 LL | | }
    | |_^
-   = help: use `self::sub` to refer to the module unambiguously
+   = help: use `self::sub` to refer to this module unambiguously
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr
index a1db1c3e0be..3b40c3d36fa 100644
--- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr
+++ b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr
@@ -14,7 +14,7 @@ note: `Foo` could also refer to the enum defined here
    |
 LL | enum Foo {}
    | ^^^^^^^^^^^
-   = help: use `self::Foo` to refer to the enum unambiguously
+   = help: use `self::Foo` to refer to this enum unambiguously
 
 error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
   --> $DIR/block-scoped-shadow.rs:28:9
@@ -32,7 +32,7 @@ note: `std` could also refer to the struct defined here
    |
 LL | struct std;
    | ^^^^^^^^^^^
-   = help: use `self::std` to refer to the struct unambiguously
+   = help: use `self::std` to refer to this struct unambiguously
 
 error[E0659]: `std` is ambiguous (name vs any other name during import resolution)
   --> $DIR/block-scoped-shadow.rs:28:9
@@ -50,7 +50,7 @@ note: `std` could also refer to the unit struct defined here
    |
 LL | struct std;
    | ^^^^^^^^^^^
-   = help: use `self::std` to refer to the unit struct unambiguously
+   = help: use `self::std` to refer to this unit struct unambiguously
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/static/static-mut-not-pat.stderr b/src/test/ui/static/static-mut-not-pat.stderr
index 123cf7b3ac6..96dc06ee524 100644
--- a/src/test/ui/static/static-mut-not-pat.stderr
+++ b/src/test/ui/static/static-mut-not-pat.stderr
@@ -2,7 +2,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/static-mut-not-pat.rs:23:9
    |
 LL | static mut a: isize = 3;
-   | ------------------------ a static `a` is defined here
+   | ------------------------ the static `a` is defined here
 ...
 LL |         a => {} //~ ERROR match bindings cannot shadow statics
    |         ^ cannot be named the same as a static
@@ -11,7 +11,7 @@ error[E0530]: match bindings cannot shadow statics
   --> $DIR/static-mut-not-pat.rs:46:9
    |
 LL | static mut STATIC_MUT_FOO: Foo = Foo { bar: Some(Direction::West), baz: NEW_FALSE };
-   | ------------------------------------------------------------------------------------ a static `STATIC_MUT_FOO` is defined here
+   | ------------------------------------------------------------------------------------ the static `STATIC_MUT_FOO` is defined here
 ...
 LL |         STATIC_MUT_FOO => (),
    |         ^^^^^^^^^^^^^^ cannot be named the same as a static