about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2019-05-04 16:09:28 +0100
committerAlexander Regueiro <alexreg@me.com>2019-06-05 21:09:27 +0100
commita71d55701e303514f936b862ae5cf0c410d2a785 (patch)
tree75ce2639b20fd5e0254d03523e0bf859257fd177 /src/test
parent4310ba2c985c161260bbdfef5d92ceea552e9055 (diff)
downloadrust-a71d55701e303514f936b862ae5cf0c410d2a785.tar.gz
rust-a71d55701e303514f936b862ae5cf0c410d2a785.zip
Addressed points raised in review.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/associated-type-bounds/nested-lifetime-bounds.stderr1
-rw-r--r--src/test/ui/associated-types/associated-types-path-2.stderr2
-rw-r--r--src/test/ui/borrowck/borrowck-closures-two-mut.stderr104
-rw-r--r--src/test/ui/borrowck/borrowck-reinit.stderr16
-rw-r--r--src/test/ui/borrowck/borrowck-storage-dead.stderr12
-rw-r--r--src/test/ui/borrowck/immutable-arg.stderr14
-rw-r--r--src/test/ui/borrowck/issue-41962.stderr24
-rw-r--r--src/test/ui/const-generics/const-param-before-other-params.stderr12
-rw-r--r--src/test/ui/deprecation/deprecation-in-staged-api.rs4
-rw-r--r--src/test/ui/feature-gates/feature-gate-associated_type_bounds.rs27
-rw-r--r--src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr55
-rw-r--r--src/test/ui/generator/yield-while-local-borrowed.stderr32
-rw-r--r--src/test/ui/indexing-requires-a-uint.stderr2
-rw-r--r--src/test/ui/integer-literal-suffix-inference.stderr36
-rw-r--r--src/test/ui/issues/issue-13359.stderr4
-rw-r--r--src/test/ui/issues/issue-31910.stderr2
-rw-r--r--src/test/ui/issues/issue-45697-1.stderr14
-rw-r--r--src/test/ui/issues/issue-45697.stderr14
-rw-r--r--src/test/ui/issues/issue-46471-1.stderr17
-rw-r--r--src/test/ui/issues/issue-46471.stderr20
-rw-r--r--src/test/ui/issues/issue-46472.stderr24
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr51
-rw-r--r--src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr2
-rw-r--r--src/test/ui/mismatched_types/issue-26480.stderr2
-rw-r--r--src/test/ui/moves/moves-based-on-type-tuple.stderr16
-rw-r--r--src/test/ui/nll/get_default.stderr58
-rw-r--r--src/test/ui/nll/loan_ends_mid_block_pair.stderr60
-rw-r--r--src/test/ui/nll/loan_ends_mid_block_vec.stderr88
-rw-r--r--src/test/ui/nll/region-ends-after-if-condition.stderr32
-rw-r--r--src/test/ui/nll/return_from_loop.stderr32
-rw-r--r--src/test/ui/numeric/const-scope.stderr2
-rw-r--r--src/test/ui/numeric/len.stderr2
-rw-r--r--src/test/ui/numeric/numeric-cast-2.stderr6
-rw-r--r--src/test/ui/numeric/numeric-cast.stderr156
-rw-r--r--src/test/ui/pub/pub-restricted.stderr19
-rw-r--r--src/test/ui/repeat_count.stderr4
-rw-r--r--src/test/ui/shift-various-bad-types.stderr2
-rw-r--r--src/test/ui/symbol-names/basic.stderr14
-rw-r--r--src/test/ui/symbol-names/impl1.stderr26
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr2
-rw-r--r--src/test/ui/tutorial-suffix-inference-test.stderr4
41 files changed, 750 insertions, 264 deletions
diff --git a/src/test/ui/associated-type-bounds/nested-lifetime-bounds.stderr b/src/test/ui/associated-type-bounds/nested-lifetime-bounds.stderr
index 44fa9e89d35..db421e6973d 100644
--- a/src/test/ui/associated-type-bounds/nested-lifetime-bounds.stderr
+++ b/src/test/ui/associated-type-bounds/nested-lifetime-bounds.stderr
@@ -6,4 +6,3 @@ LL |     for<'a> <_2 as Iterator>::Item: for<'b> Lam<&'a &'b u8, App = _0>,
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0316`.
diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr
index 1405cb1b473..c25f12d0087 100644
--- a/src/test/ui/associated-types/associated-types-path-2.stderr
+++ b/src/test/ui/associated-types/associated-types-path-2.stderr
@@ -49,7 +49,7 @@ error[E0308]: mismatched types
    |
 LL |     let _: i32 = f2(2i32);
    |                  ^^^^^^^^ expected i32, found u32
-help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     let _: i32 = f2(2i32).try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr
index bffb1164074..e881201ddfc 100644
--- a/src/test/ui/borrowck/borrowck-closures-two-mut.stderr
+++ b/src/test/ui/borrowck/borrowck-closures-two-mut.stderr
@@ -1,5 +1,80 @@
-error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/borrowck-closures-two-mut.rs:12:24
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
+  --> $DIR/borrowck-closures-two-mut.rs:14:24
+   |
+LL |     let c1 = to_fn_mut(|| x = 4);
+   |                        -- - previous borrow occurs due to use of `x` in closure
+   |                        |
+   |                        first mutable borrow occurs here
+LL |     let c2 = to_fn_mut(|| x = 5);
+   |                        ^^ - borrow occurs due to use of `x` in closure
+   |                        |
+   |                        second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
+  --> $DIR/borrowck-closures-two-mut.rs:26:24
+   |
+LL |     let c1 = to_fn_mut(|| set(&mut x));
+   |                        --          - previous borrow occurs due to use of `x` in closure
+   |                        |
+   |                        first mutable borrow occurs here
+LL |     let c2 = to_fn_mut(|| set(&mut x));
+   |                        ^^          - borrow occurs due to use of `x` in closure
+   |                        |
+   |                        second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
+  --> $DIR/borrowck-closures-two-mut.rs:34:24
+   |
+LL |     let c1 = to_fn_mut(|| x = 5);
+   |                        -- - previous borrow occurs due to use of `x` in closure
+   |                        |
+   |                        first mutable borrow occurs here
+LL |     let c2 = to_fn_mut(|| set(&mut x));
+   |                        ^^          - borrow occurs due to use of `x` in closure
+   |                        |
+   |                        second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
+  --> $DIR/borrowck-closures-two-mut.rs:42:24
+   |
+LL |     let c1 = to_fn_mut(|| x = 5);
+   |                        -- - previous borrow occurs due to use of `x` in closure
+   |                        |
+   |                        first mutable borrow occurs here
+LL |     let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nested closure)
+   |                        ^^                                  - borrow occurs due to use of `x` in closure
+   |                        |
+   |                        second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Ast)
+  --> $DIR/borrowck-closures-two-mut.rs:55:24
+   |
+LL |     let c1 = to_fn_mut(|| set(&mut *x.f));
+   |                        --           - previous borrow occurs due to use of `x` in closure
+   |                        |
+   |                        first mutable borrow occurs here
+LL |     let c2 = to_fn_mut(|| set(&mut *x.f));
+   |                        ^^           - borrow occurs due to use of `x` in closure
+   |                        |
+   |                        second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
+  --> $DIR/borrowck-closures-two-mut.rs:14:24
    |
 LL |     let c1 = to_fn_mut(|| x = 4);
    |                        -- - first borrow occurs due to use of `x` in closure
@@ -9,11 +84,12 @@ LL |     let c2 = to_fn_mut(|| x = 5);
    |                        ^^ - second borrow occurs due to use of `x` in closure
    |                        |
    |                        second mutable borrow occurs here
+LL |
 LL |     drop((c1, c2));
    |           -- first borrow later used here
 
-error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/borrowck-closures-two-mut.rs:23:24
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
+  --> $DIR/borrowck-closures-two-mut.rs:26:24
    |
 LL |     let c1 = to_fn_mut(|| set(&mut x));
    |                        --          - first borrow occurs due to use of `x` in closure
@@ -23,11 +99,12 @@ LL |     let c2 = to_fn_mut(|| set(&mut x));
    |                        ^^          - second borrow occurs due to use of `x` in closure
    |                        |
    |                        second mutable borrow occurs here
+LL |
 LL |     drop((c1, c2));
    |           -- first borrow later used here
 
-error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/borrowck-closures-two-mut.rs:30:24
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
+  --> $DIR/borrowck-closures-two-mut.rs:34:24
    |
 LL |     let c1 = to_fn_mut(|| x = 5);
    |                        -- - first borrow occurs due to use of `x` in closure
@@ -37,11 +114,12 @@ LL |     let c2 = to_fn_mut(|| set(&mut x));
    |                        ^^          - second borrow occurs due to use of `x` in closure
    |                        |
    |                        second mutable borrow occurs here
+LL |
 LL |     drop((c1, c2));
    |           -- first borrow later used here
 
-error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/borrowck-closures-two-mut.rs:37:24
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
+  --> $DIR/borrowck-closures-two-mut.rs:42:24
    |
 LL |     let c1 = to_fn_mut(|| x = 5);
    |                        -- - first borrow occurs due to use of `x` in closure
@@ -51,12 +129,12 @@ LL |     let c2 = to_fn_mut(|| { let _y = to_fn_mut(|| set(&mut x)); }); // (nes
    |                        ^^                                  - second borrow occurs due to use of `x` in closure
    |                        |
    |                        second mutable borrow occurs here
-LL |
+...
 LL |     drop((c1, c2));
    |           -- first borrow later used here
 
-error[E0499]: cannot borrow `x` as mutable more than once at a time
-  --> $DIR/borrowck-closures-two-mut.rs:49:24
+error[E0499]: cannot borrow `x` as mutable more than once at a time (Mir)
+  --> $DIR/borrowck-closures-two-mut.rs:55:24
    |
 LL |     let c1 = to_fn_mut(|| set(&mut *x.f));
    |                        --           - first borrow occurs due to use of `x` in closure
@@ -66,10 +144,10 @@ LL |     let c2 = to_fn_mut(|| set(&mut *x.f));
    |                        ^^           - second borrow occurs due to use of `x` in closure
    |                        |
    |                        second mutable borrow occurs here
-LL |
+...
 LL |     drop((c1, c2));
    |           -- first borrow later used here
 
-error: aborting due to 5 previous errors
+error: aborting due to 10 previous errors
 
 For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr
index f8f14b6435f..3618a7cb2cd 100644
--- a/src/test/ui/borrowck/borrowck-reinit.stderr
+++ b/src/test/ui/borrowck/borrowck-reinit.stderr
@@ -1,5 +1,15 @@
-error[E0382]: use of moved value: `x`
-  --> $DIR/borrowck-reinit.rs:6:16
+error[E0382]: use of moved value: `x` (Ast)
+  --> $DIR/borrowck-reinit.rs:8:16
+   |
+LL |     drop(x);
+   |          - value moved here
+LL |     let _ = (1,x);
+   |                ^ value used here after move
+   |
+   = note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `x` (Mir)
+  --> $DIR/borrowck-reinit.rs:8:16
    |
 LL |     let mut x = Box::new(0);
    |         ----- move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
@@ -9,6 +19,6 @@ LL |     drop(x);
 LL |     let _ = (1,x);
    |                ^ value used here after move
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/borrowck/borrowck-storage-dead.stderr b/src/test/ui/borrowck/borrowck-storage-dead.stderr
index 5b9f49c2e7c..c291ed224eb 100644
--- a/src/test/ui/borrowck/borrowck-storage-dead.stderr
+++ b/src/test/ui/borrowck/borrowck-storage-dead.stderr
@@ -1,9 +1,15 @@
-error[E0381]: use of possibly uninitialized variable: `x`
-  --> $DIR/borrowck-storage-dead.rs:16:17
+error[E0381]: use of possibly uninitialized variable: `x` (Ast)
+  --> $DIR/borrowck-storage-dead.rs:18:17
    |
 LL |         let _ = x + 1;
    |                 ^ use of possibly uninitialized `x`
 
-error: aborting due to previous error
+error[E0381]: use of possibly uninitialized variable: `x` (Mir)
+  --> $DIR/borrowck-storage-dead.rs:18:17
+   |
+LL |         let _ = x + 1;
+   |                 ^ use of possibly uninitialized `x`
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0381`.
diff --git a/src/test/ui/borrowck/immutable-arg.stderr b/src/test/ui/borrowck/immutable-arg.stderr
index 7255ca327e7..8b21e926666 100644
--- a/src/test/ui/borrowck/immutable-arg.stderr
+++ b/src/test/ui/borrowck/immutable-arg.stderr
@@ -1,11 +1,19 @@
-error[E0384]: cannot assign to immutable argument `_x`
-  --> $DIR/immutable-arg.rs:2:5
+error[E0384]: cannot assign twice to immutable variable `_x` (Ast)
+  --> $DIR/immutable-arg.rs:4:5
+   |
+LL | fn foo(_x: u32) {
+   |        -- first assignment to `_x`
+LL |     _x = 4;
+   |     ^^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign to immutable argument `_x` (Mir)
+  --> $DIR/immutable-arg.rs:4:5
    |
 LL | fn foo(_x: u32) {
    |        -- help: make this binding mutable: `mut _x`
 LL |     _x = 4;
    |     ^^^^^^ cannot assign to immutable argument
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0384`.
diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr
index 422d1605aa4..fd4d318b5dd 100644
--- a/src/test/ui/borrowck/issue-41962.stderr
+++ b/src/test/ui/borrowck/issue-41962.stderr
@@ -1,11 +1,29 @@
-error[E0382]: use of moved value
-  --> $DIR/issue-41962.rs:5:21
+error[E0382]: use of partially moved value: `maybe` (Ast)
+  --> $DIR/issue-41962.rs:7:30
+   |
+LL |         if let Some(thing) = maybe {
+   |                     -----    ^^^^^ value used here after move
+   |                     |
+   |                     value moved here
+   |
+   = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0` (Ast)
+  --> $DIR/issue-41962.rs:7:21
+   |
+LL |         if let Some(thing) = maybe {
+   |                     ^^^^^ value moved here in previous iteration of loop
+   |
+   = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value (Mir)
+  --> $DIR/issue-41962.rs:7:21
    |
 LL |         if let Some(thing) = maybe {
    |                     ^^^^^ value moved here, in previous iteration of loop
    |
    = note: move occurs because value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait
 
-error: aborting due to previous error
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/const-generics/const-param-before-other-params.stderr b/src/test/ui/const-generics/const-param-before-other-params.stderr
index 33f981d1eba..78f129e79ea 100644
--- a/src/test/ui/const-generics/const-param-before-other-params.stderr
+++ b/src/test/ui/const-generics/const-param-before-other-params.stderr
@@ -4,17 +4,17 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
 
-error: lifetime parameters must be declared prior to const parameters
+error: type parameters must be declared prior to const parameters
   --> $DIR/const-param-before-other-params.rs:4:21
    |
-LL | fn bar<const X: (), 'a>(_: &'a ()) {
-   |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
+LL | fn foo<const X: (), T>(_: &T) {
+   |       --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
 
-error: type parameters must be declared prior to const parameters
+error: lifetime parameters must be declared prior to const parameters
   --> $DIR/const-param-before-other-params.rs:8:21
    |
-LL | fn foo<const X: (), T>(_: &T) {
-   |       --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
+LL | fn bar<const X: (), 'a>(_: &'a ()) {
+   |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/deprecation/deprecation-in-staged-api.rs b/src/test/ui/deprecation/deprecation-in-staged-api.rs
index bcc17c789f5..f667de83b56 100644
--- a/src/test/ui/deprecation/deprecation-in-staged-api.rs
+++ b/src/test/ui/deprecation/deprecation-in-staged-api.rs
@@ -1,8 +1,8 @@
-// #[deprecated] can't be used in staged api
+// #[deprecated] cannot be used in staged API
 
 #![feature(staged_api)]
 
 #![stable(feature = "stable_test_feature", since = "1.0.0")]
 
 #[deprecated]
-fn main() { } //~ERROR `#[deprecated]` cannot be used in staged api
+fn main() { } //~ ERROR `#[deprecated]` cannot be used in staged API
diff --git a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.rs b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.rs
index 6b4f5005d48..3d75251e156 100644
--- a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.rs
+++ b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.rs
@@ -10,61 +10,62 @@ impl Tr1 for S1 { type As1 = S2; }
 
 trait _Tr3 {
     type A: Iterator<Item: Copy>;
-    //~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+    //~^ ERROR associated type bounds are unstable
 
     type B: Iterator<Item: 'static>;
-    //~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+    //~^ ERROR associated type bounds are unstable
 }
 
 struct _St1<T: Tr1<As1: Tr2>> {
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
     outest: T,
     outer: T::As1,
     inner: <T::As1 as Tr2>::As2,
 }
 
 enum _En1<T: Tr1<As1: Tr2>> {
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
     Outest(T),
     Outer(T::As1),
     Inner(<T::As1 as Tr2>::As2),
 }
 
 union _Un1<T: Tr1<As1: Tr2>> {
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
     outest: T,
     outer: T::As1,
     inner: <T::As1 as Tr2>::As2,
 }
 
 type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
 
 fn _apit(_: impl Tr1<As1: Copy>) {}
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
 fn _apit_dyn(_: &dyn Tr1<As1: Copy>) {}
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
 
 fn _rpit() -> impl Tr1<As1: Copy> { S1 }
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
+
 fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
 
 const _cdef: impl Tr1<As1: Copy> = S1;
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
 //~| ERROR `impl Trait` not allowed outside of function and inherent method return types [E0562]
 // FIXME: uncomment when `impl_trait_in_bindings` feature is fixed.
 // const _cdef_dyn: &dyn Tr1<As1: Copy> = &S1;
 
 static _sdef: impl Tr1<As1: Copy> = S1;
-//~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+//~^ ERROR associated type bounds are unstable
 //~| ERROR `impl Trait` not allowed outside of function and inherent method return types [E0562]
 // FIXME: uncomment when `impl_trait_in_bindings` feature is fixed.
 // static _sdef_dyn: &dyn Tr1<As1: Copy> = &S1;
 
 fn main() {
     let _: impl Tr1<As1: Copy> = S1;
-    //~^ ERROR associated type bounds are unstable (see issue #52662) [E0658]
+    //~^ ERROR associated type bounds are unstable
     //~| ERROR `impl Trait` not allowed outside of function and inherent method return types [E0562]
     // FIXME: uncomment when `impl_trait_in_bindings` feature is fixed.
     // let _: &dyn Tr1<As1: Copy> = &S1;
diff --git a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
index 9b83c1cfb33..702f61262df 100644
--- a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
+++ b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
@@ -1,109 +1,122 @@
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:12:22
    |
 LL |     type A: Iterator<Item: Copy>;
    |                      ^^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:15:22
    |
 LL |     type B: Iterator<Item: 'static>;
    |                      ^^^^^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:19:20
    |
 LL | struct _St1<T: Tr1<As1: Tr2>> {
    |                    ^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:26:18
    |
 LL | enum _En1<T: Tr1<As1: Tr2>> {
    |                  ^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:33:19
    |
 LL | union _Un1<T: Tr1<As1: Tr2>> {
    |                   ^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:40:37
    |
 LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
    |                                     ^^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:43:22
    |
 LL | fn _apit(_: impl Tr1<As1: Copy>) {}
    |                      ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:45:26
    |
 LL | fn _apit_dyn(_: &dyn Tr1<As1: Copy>) {}
    |                          ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
+error[E0658]: associated type bounds are unstable
   --> $DIR/feature-gate-associated_type_bounds.rs:48:24
    |
 LL | fn _rpit() -> impl Tr1<As1: Copy> { S1 }
    |                        ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
-  --> $DIR/feature-gate-associated_type_bounds.rs:50:31
+error[E0658]: associated type bounds are unstable
+  --> $DIR/feature-gate-associated_type_bounds.rs:51:31
    |
 LL | fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
    |                               ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
-  --> $DIR/feature-gate-associated_type_bounds.rs:53:23
+error[E0658]: associated type bounds are unstable
+  --> $DIR/feature-gate-associated_type_bounds.rs:54:23
    |
 LL | const _cdef: impl Tr1<As1: Copy> = S1;
    |                       ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
-  --> $DIR/feature-gate-associated_type_bounds.rs:59:24
+error[E0658]: associated type bounds are unstable
+  --> $DIR/feature-gate-associated_type_bounds.rs:60:24
    |
 LL | static _sdef: impl Tr1<As1: Copy> = S1;
    |                        ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
-error[E0658]: associated type bounds are unstable (see issue #52662)
-  --> $DIR/feature-gate-associated_type_bounds.rs:66:21
+error[E0658]: associated type bounds are unstable
+  --> $DIR/feature-gate-associated_type_bounds.rs:67:21
    |
 LL |     let _: impl Tr1<As1: Copy> = S1;
    |                     ^^^^^^^^^
    |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/52662
    = help: add #![feature(associated_type_bounds)] to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
-  --> $DIR/feature-gate-associated_type_bounds.rs:53:14
+  --> $DIR/feature-gate-associated_type_bounds.rs:54:14
    |
 LL | const _cdef: impl Tr1<As1: Copy> = S1;
    |              ^^^^^^^^^^^^^^^^^^^
@@ -111,7 +124,7 @@ LL | const _cdef: impl Tr1<As1: Copy> = S1;
    = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
-  --> $DIR/feature-gate-associated_type_bounds.rs:59:15
+  --> $DIR/feature-gate-associated_type_bounds.rs:60:15
    |
 LL | static _sdef: impl Tr1<As1: Copy> = S1;
    |               ^^^^^^^^^^^^^^^^^^^
@@ -119,7 +132,7 @@ LL | static _sdef: impl Tr1<As1: Copy> = S1;
    = help: add #![feature(impl_trait_in_bindings)] to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
-  --> $DIR/feature-gate-associated_type_bounds.rs:66:12
+  --> $DIR/feature-gate-associated_type_bounds.rs:67:12
    |
 LL |     let _: impl Tr1<As1: Copy> = S1;
    |            ^^^^^^^^^^^^^^^^^^^
@@ -128,5 +141,5 @@ LL |     let _: impl Tr1<As1: Copy> = S1;
 
 error: aborting due to 16 previous errors
 
-Some errors occurred: E0562, E0658.
+Some errors have detailed explanations: E0562, E0658.
 For more information about an error, try `rustc --explain E0562`.
diff --git a/src/test/ui/generator/yield-while-local-borrowed.stderr b/src/test/ui/generator/yield-while-local-borrowed.stderr
index c1513ef9b71..56f425b7e70 100644
--- a/src/test/ui/generator/yield-while-local-borrowed.stderr
+++ b/src/test/ui/generator/yield-while-local-borrowed.stderr
@@ -1,21 +1,39 @@
-error[E0626]: borrow may still be in use when generator yields
-  --> $DIR/yield-while-local-borrowed.rs:13:17
+error[E0626]: borrow may still be in use when generator yields (Ast)
+  --> $DIR/yield-while-local-borrowed.rs:15:22
+   |
+LL |         let a = &mut 3;
+   |                      ^
+...
+LL |         yield();
+   |         ------- possible yield occurs here
+
+error[E0626]: borrow may still be in use when generator yields (Ast)
+  --> $DIR/yield-while-local-borrowed.rs:43:22
+   |
+LL |             let b = &a;
+   |                      ^
+...
+LL |             yield();
+   |             ------- possible yield occurs here
+
+error[E0626]: borrow may still be in use when generator yields (Mir)
+  --> $DIR/yield-while-local-borrowed.rs:15:17
    |
 LL |         let a = &mut 3;
    |                 ^^^^^^
-LL |
+...
 LL |         yield();
    |         ------- possible yield occurs here
 
-error[E0626]: borrow may still be in use when generator yields
-  --> $DIR/yield-while-local-borrowed.rs:40:21
+error[E0626]: borrow may still be in use when generator yields (Mir)
+  --> $DIR/yield-while-local-borrowed.rs:43:21
    |
 LL |             let b = &a;
    |                     ^^
-LL |
+...
 LL |             yield();
    |             ------- possible yield occurs here
 
-error: aborting due to 2 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0626`.
diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr
index 3300db58d44..9dafe1c24f1 100644
--- a/src/test/ui/indexing-requires-a-uint.stderr
+++ b/src/test/ui/indexing-requires-a-uint.stderr
@@ -12,7 +12,7 @@ error[E0308]: mismatched types
    |
 LL |     bar::<isize>(i);  // i should not be re-coerced back to an isize
    |                  ^ expected isize, found usize
-help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     bar::<isize>(i.try_into().unwrap());  // i should not be re-coerced back to an isize
    |                  ^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/integer-literal-suffix-inference.stderr b/src/test/ui/integer-literal-suffix-inference.stderr
index 80b601dc439..b5b3f27f0e6 100644
--- a/src/test/ui/integer-literal-suffix-inference.stderr
+++ b/src/test/ui/integer-literal-suffix-inference.stderr
@@ -3,7 +3,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i8(a16);
    |           ^^^ expected i8, found i16
-help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     id_i8(a16.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i8(a32);
    |           ^^^ expected i8, found i32
-help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     id_i8(a32.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i8(a64);
    |           ^^^ expected i8, found i64
-help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     id_i8(a64.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -42,7 +42,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i16(a32);
    |            ^^^ expected i16, found i32
-help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     id_i16(a32.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -52,7 +52,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i16(a64);
    |            ^^^ expected i16, found i64
-help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     id_i16(a64.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -80,7 +80,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i32(a64);
    |            ^^^ expected i32, found i64
-help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     id_i32(a64.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -117,7 +117,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i8(c16);
    |           ^^^ expected i8, found i16
-help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     id_i8(c16.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -127,7 +127,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i8(c32);
    |           ^^^ expected i8, found i32
-help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     id_i8(c32.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -137,7 +137,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i8(c64);
    |           ^^^ expected i8, found i64
-help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     id_i8(c64.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -156,7 +156,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i16(c32);
    |            ^^^ expected i16, found i32
-help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     id_i16(c32.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -166,7 +166,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i16(c64);
    |            ^^^ expected i16, found i64
-help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     id_i16(c64.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -194,7 +194,7 @@ error[E0308]: mismatched types
    |
 LL |     id_i32(c64);
    |            ^^^ expected i32, found i64
-help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     id_i32(c64.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -231,7 +231,7 @@ error[E0308]: mismatched types
    |
 LL |     id_u8(b16);
    |           ^^^ expected u8, found u16
-help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     id_u8(b16.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -241,7 +241,7 @@ error[E0308]: mismatched types
    |
 LL |     id_u8(b32);
    |           ^^^ expected u8, found u32
-help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     id_u8(b32.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -251,7 +251,7 @@ error[E0308]: mismatched types
    |
 LL |     id_u8(b64);
    |           ^^^ expected u8, found u64
-help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     id_u8(b64.try_into().unwrap());
    |           ^^^^^^^^^^^^^^^^^^^^^^^
@@ -270,7 +270,7 @@ error[E0308]: mismatched types
    |
 LL |     id_u16(b32);
    |            ^^^ expected u16, found u32
-help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     id_u16(b32.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -280,7 +280,7 @@ error[E0308]: mismatched types
    |
 LL |     id_u16(b64);
    |            ^^^ expected u16, found u64
-help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     id_u16(b64.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
@@ -308,7 +308,7 @@ error[E0308]: mismatched types
    |
 LL |     id_u32(b64);
    |            ^^^ expected u32, found u64
-help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     id_u32(b64.try_into().unwrap());
    |            ^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-13359.stderr b/src/test/ui/issues/issue-13359.stderr
index 7cfd754f72d..b16b7a5b2cf 100644
--- a/src/test/ui/issues/issue-13359.stderr
+++ b/src/test/ui/issues/issue-13359.stderr
@@ -3,7 +3,7 @@ error[E0308]: mismatched types
    |
 LL |     foo(1*(1 as isize));
    |         ^^^^^^^^^^^^^^ expected i16, found isize
-help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo((1*(1 as isize)).try_into().unwrap());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
    |
 LL |     bar(1*(1 as usize));
    |         ^^^^^^^^^^^^^^ expected u32, found usize
-help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     bar((1*(1 as usize)).try_into().unwrap());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-31910.stderr b/src/test/ui/issues/issue-31910.stderr
index e7555b958a3..8dd9287ffec 100644
--- a/src/test/ui/issues/issue-31910.stderr
+++ b/src/test/ui/issues/issue-31910.stderr
@@ -3,7 +3,7 @@ error[E0308]: mismatched types
    |
 LL |     X = Trait::Number,
    |         ^^^^^^^^^^^^^ expected isize, found i32
-help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     X = Trait::Number.try_into().unwrap(),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-45697-1.stderr b/src/test/ui/issues/issue-45697-1.stderr
index 30c69f19658..854e18003f3 100644
--- a/src/test/ui/issues/issue-45697-1.stderr
+++ b/src/test/ui/issues/issue-45697-1.stderr
@@ -1,4 +1,12 @@
-error[E0503]: cannot use `*y.pointer` because it was mutably borrowed
+error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast)
+  --> $DIR/issue-45697-1.rs:20:9
+   |
+LL |         let z = copy_borrowed_ptr(&mut y);
+   |                                        - borrow of `*y.pointer` occurs here
+LL |         *y.pointer += 1;
+   |         ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here
+
+error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir)
   --> $DIR/issue-45697-1.rs:20:9
    |
 LL |         let z = copy_borrowed_ptr(&mut y);
@@ -9,7 +17,7 @@ LL |         *y.pointer += 1;
 LL |         *z.pointer += 1;
    |         --------------- borrow later used here
 
-error[E0506]: cannot assign to `*y.pointer` because it is borrowed
+error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir)
   --> $DIR/issue-45697-1.rs:20:9
    |
 LL |         let z = copy_borrowed_ptr(&mut y);
@@ -20,7 +28,7 @@ LL |         *y.pointer += 1;
 LL |         *z.pointer += 1;
    |         --------------- borrow later used here
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0503, E0506.
 For more information about an error, try `rustc --explain E0503`.
diff --git a/src/test/ui/issues/issue-45697.stderr b/src/test/ui/issues/issue-45697.stderr
index 26749d36f0b..01ae416b1cf 100644
--- a/src/test/ui/issues/issue-45697.stderr
+++ b/src/test/ui/issues/issue-45697.stderr
@@ -1,4 +1,12 @@
-error[E0503]: cannot use `*y.pointer` because it was mutably borrowed
+error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Ast)
+  --> $DIR/issue-45697.rs:20:9
+   |
+LL |         let z = copy_borrowed_ptr(&mut y);
+   |                                        - borrow of `*y.pointer` occurs here
+LL |         *y.pointer += 1;
+   |         ^^^^^^^^^^^^^^^ assignment to borrowed `*y.pointer` occurs here
+
+error[E0503]: cannot use `*y.pointer` because it was mutably borrowed (Mir)
   --> $DIR/issue-45697.rs:20:9
    |
 LL |         let z = copy_borrowed_ptr(&mut y);
@@ -9,7 +17,7 @@ LL |         *y.pointer += 1;
 LL |         *z.pointer += 1;
    |         --------------- borrow later used here
 
-error[E0506]: cannot assign to `*y.pointer` because it is borrowed
+error[E0506]: cannot assign to `*y.pointer` because it is borrowed (Mir)
   --> $DIR/issue-45697.rs:20:9
    |
 LL |         let z = copy_borrowed_ptr(&mut y);
@@ -20,7 +28,7 @@ LL |         *y.pointer += 1;
 LL |         *z.pointer += 1;
    |         --------------- borrow later used here
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0503, E0506.
 For more information about an error, try `rustc --explain E0503`.
diff --git a/src/test/ui/issues/issue-46471-1.stderr b/src/test/ui/issues/issue-46471-1.stderr
index b09f31729a5..51026c9f2d8 100644
--- a/src/test/ui/issues/issue-46471-1.stderr
+++ b/src/test/ui/issues/issue-46471-1.stderr
@@ -1,5 +1,16 @@
-error[E0597]: `z` does not live long enough
-  --> $DIR/issue-46471-1.rs:4:9
+error[E0597]: `z` does not live long enough (Ast)
+  --> $DIR/issue-46471-1.rs:6:14
+   |
+LL |         &mut z
+   |              ^ borrowed value does not live long enough
+LL |     };
+   |     - `z` dropped here while still borrowed
+...
+LL | }
+   | - borrowed value needs to live until here
+
+error[E0597]: `z` does not live long enough (Mir)
+  --> $DIR/issue-46471-1.rs:6:9
    |
 LL |         &mut z
    |         ^^^^^^
@@ -9,6 +20,6 @@ LL |         &mut z
 LL |     };
    |     - `z` dropped here while still borrowed
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/issues/issue-46471.stderr b/src/test/ui/issues/issue-46471.stderr
index 935414c1f3f..90202e307eb 100644
--- a/src/test/ui/issues/issue-46471.stderr
+++ b/src/test/ui/issues/issue-46471.stderr
@@ -1,9 +1,21 @@
-error[E0515]: cannot return reference to local variable `x`
-  --> $DIR/issue-46471.rs:3:5
+error[E0597]: `x` does not live long enough (Ast)
+  --> $DIR/issue-46471.rs:5:6
+   |
+LL |     &x
+   |      ^ borrowed value does not live long enough
+...
+LL | }
+   | - borrowed value only lives until here
+   |
+   = note: borrowed value must be valid for the static lifetime...
+
+error[E0515]: cannot return reference to local variable `x` (Mir)
+  --> $DIR/issue-46471.rs:5:5
    |
 LL |     &x
    |     ^^ returns a reference to data owned by the current function
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0515`.
+Some errors have detailed explanations: E0515, E0597.
+For more information about an error, try `rustc --explain E0515`.
diff --git a/src/test/ui/issues/issue-46472.stderr b/src/test/ui/issues/issue-46472.stderr
index 6e561e03a8b..0cc93a081b2 100644
--- a/src/test/ui/issues/issue-46472.stderr
+++ b/src/test/ui/issues/issue-46472.stderr
@@ -1,5 +1,20 @@
-error[E0515]: cannot return reference to temporary value
-  --> $DIR/issue-46472.rs:2:5
+error[E0597]: borrowed value does not live long enough (Ast)
+  --> $DIR/issue-46472.rs:4:10
+   |
+LL |     &mut 4
+   |          ^ temporary value does not live long enough
+...
+LL | }
+   | - temporary value only lives until here
+   |
+note: borrowed value must be valid for the lifetime 'a as defined on the function body at 3:8...
+  --> $DIR/issue-46472.rs:3:8
+   |
+LL | fn bar<'a>() -> &'a mut u32 {
+   |        ^^
+
+error[E0515]: cannot return reference to temporary value (Mir)
+  --> $DIR/issue-46472.rs:4:5
    |
 LL |     &mut 4
    |     ^^^^^-
@@ -7,6 +22,7 @@ LL |     &mut 4
    |     |    temporary value created here
    |     returns a reference to data owned by the current function
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0515`.
+Some errors have detailed explanations: E0515, E0597.
+For more information about an error, try `rustc --explain E0515`.
diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr
index c646912d3b6..e15290f0b9e 100644
--- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr
+++ b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr
@@ -1,5 +1,36 @@
-error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/liveness-assign-imm-local-notes.rs:10:9
+error[E0384]: cannot assign twice to immutable variable `x` (Ast)
+  --> $DIR/liveness-assign-imm-local-notes.rs:13:9
+   |
+LL |         x = 2;
+   |         ----- first assignment to `x`
+LL |         x = 3;
+   |         ^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `x` (Ast)
+  --> $DIR/liveness-assign-imm-local-notes.rs:25:13
+   |
+LL |             x = 2;
+   |             ----- first assignment to `x`
+LL |             x = 3;
+   |             ^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `x` (Ast)
+  --> $DIR/liveness-assign-imm-local-notes.rs:35:13
+   |
+LL |             x = 1;
+   |             ^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `x` (Ast)
+  --> $DIR/liveness-assign-imm-local-notes.rs:38:13
+   |
+LL |             x = 1;
+   |             ----- first assignment to `x`
+...
+LL |             x = 2;
+   |             ^^^^^ cannot assign twice to immutable variable
+
+error[E0384]: cannot assign twice to immutable variable `x` (Mir)
+  --> $DIR/liveness-assign-imm-local-notes.rs:13:9
    |
 LL |     let x;
    |         - help: make this binding mutable: `mut x`
@@ -9,8 +40,8 @@ LL |         x = 2;
 LL |         x = 3;
    |         ^^^^^ cannot assign twice to immutable variable
 
-error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/liveness-assign-imm-local-notes.rs:21:13
+error[E0384]: cannot assign twice to immutable variable `x` (Mir)
+  --> $DIR/liveness-assign-imm-local-notes.rs:25:13
    |
 LL |         let x;
    |             - help: make this binding mutable: `mut x`
@@ -20,8 +51,8 @@ LL |             x = 2;
 LL |             x = 3;
    |             ^^^^^ cannot assign twice to immutable variable
 
-error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/liveness-assign-imm-local-notes.rs:30:13
+error[E0384]: cannot assign twice to immutable variable `x` (Mir)
+  --> $DIR/liveness-assign-imm-local-notes.rs:35:13
    |
 LL |     let x;
    |         - help: make this binding mutable: `mut x`
@@ -29,18 +60,18 @@ LL |     let x;
 LL |             x = 1;
    |             ^^^^^ cannot assign twice to immutable variable
 
-error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/liveness-assign-imm-local-notes.rs:32:13
+error[E0384]: cannot assign twice to immutable variable `x` (Mir)
+  --> $DIR/liveness-assign-imm-local-notes.rs:38:13
    |
 LL |     let x;
    |         - help: make this binding mutable: `mut x`
 ...
 LL |             x = 1;
    |             ----- first assignment to `x`
-LL |         } else {
+...
 LL |             x = 2;
    |             ^^^^^ cannot assign twice to immutable variable
 
-error: aborting due to 4 previous errors
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0384`.
diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
index b1bd749bef4..49c72a655e5 100644
--- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
+++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
    |
 LL |     let y: usize = x.foo();
    |                    ^^^^^^^ expected usize, found isize
-help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     let y: usize = x.foo().try_into().unwrap();
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr
index 881d9fd3202..1a81df8e2c4 100644
--- a/src/test/ui/mismatched_types/issue-26480.stderr
+++ b/src/test/ui/mismatched_types/issue-26480.stderr
@@ -6,7 +6,7 @@ LL |                   $arr.len() * size_of($arr[0]));
 ...
 LL |     write!(hello);
    |     -------------- in this macro invocation
-help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |                   ($arr.len() * size_of($arr[0])).try_into().unwrap());
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/moves/moves-based-on-type-tuple.stderr b/src/test/ui/moves/moves-based-on-type-tuple.stderr
index 2e1ddbdf57f..c49dbdab402 100644
--- a/src/test/ui/moves/moves-based-on-type-tuple.stderr
+++ b/src/test/ui/moves/moves-based-on-type-tuple.stderr
@@ -1,5 +1,15 @@
-error[E0382]: use of moved value: `x`
-  --> $DIR/moves-based-on-type-tuple.rs:4:13
+error[E0382]: use of moved value: `x` (Ast)
+  --> $DIR/moves-based-on-type-tuple.rs:6:13
+   |
+LL |     box (x, x)
+   |          -  ^ value used here after move
+   |          |
+   |          value moved here
+   |
+   = note: move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
+
+error[E0382]: use of moved value: `x` (Mir)
+  --> $DIR/moves-based-on-type-tuple.rs:6:13
    |
 LL | fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> {
    |        - move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
@@ -8,6 +18,6 @@ LL |     box (x, x)
    |          |
    |          value moved here
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/nll/get_default.stderr b/src/test/ui/nll/get_default.stderr
index af79771e7e1..abb5343845b 100644
--- a/src/test/ui/nll/get_default.stderr
+++ b/src/test/ui/nll/get_default.stderr
@@ -1,5 +1,41 @@
-error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
-  --> $DIR/get_default.rs:21:17
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
+  --> $DIR/get_default.rs:23:17
+   |
+LL |         match map.get() {
+   |               --- immutable borrow occurs here
+...
+LL |                 map.set(String::new()); // Ideally, this would not error.
+   |                 ^^^ mutable borrow occurs here
+...
+LL | }
+   | - immutable borrow ends here
+
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
+  --> $DIR/get_default.rs:35:17
+   |
+LL |         match map.get() {
+   |               --- immutable borrow occurs here
+LL |             Some(v) => {
+LL |                 map.set(String::new()); // Both AST and MIR error here
+   |                 ^^^ mutable borrow occurs here
+...
+LL | }
+   | - immutable borrow ends here
+
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
+  --> $DIR/get_default.rs:41:17
+   |
+LL |         match map.get() {
+   |               --- immutable borrow occurs here
+...
+LL |                 map.set(String::new()); // Ideally, just AST would error here
+   |                 ^^^ mutable borrow occurs here
+...
+LL | }
+   | - immutable borrow ends here
+
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
+  --> $DIR/get_default.rs:23:17
    |
 LL | fn ok(map: &mut Map) -> &String {
    |            - let's call the lifetime of this reference `'1`
@@ -11,10 +47,10 @@ LL |                 return v;
    |                        - returning this value requires that `*map` is borrowed for `'1`
 ...
 LL |                 map.set(String::new()); // Ideally, this would not error.
-   |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
+   |                 ^^^ mutable borrow occurs here
 
-error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
-  --> $DIR/get_default.rs:32:17
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
+  --> $DIR/get_default.rs:35:17
    |
 LL | fn err(map: &mut Map) -> &String {
    |             - let's call the lifetime of this reference `'1`
@@ -23,13 +59,13 @@ LL |         match map.get() {
    |               --- immutable borrow occurs here
 LL |             Some(v) => {
 LL |                 map.set(String::new()); // Both AST and MIR error here
-   |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
-LL |
+   |                 ^^^ mutable borrow occurs here
+...
 LL |                 return v;
    |                        - returning this value requires that `*map` is borrowed for `'1`
 
-error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable
-  --> $DIR/get_default.rs:37:17
+error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
+  --> $DIR/get_default.rs:41:17
    |
 LL | fn err(map: &mut Map) -> &String {
    |             - let's call the lifetime of this reference `'1`
@@ -41,8 +77,8 @@ LL |                 return v;
    |                        - returning this value requires that `*map` is borrowed for `'1`
 ...
 LL |                 map.set(String::new()); // Ideally, just AST would error here
-   |                 ^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
+   |                 ^^^ mutable borrow occurs here
 
-error: aborting due to 3 previous errors
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0502`.
diff --git a/src/test/ui/nll/loan_ends_mid_block_pair.stderr b/src/test/ui/nll/loan_ends_mid_block_pair.stderr
index eb8442b31d7..85703bda31c 100644
--- a/src/test/ui/nll/loan_ends_mid_block_pair.stderr
+++ b/src/test/ui/nll/loan_ends_mid_block_pair.stderr
@@ -1,5 +1,59 @@
-error[E0506]: cannot assign to `data.0` because it is borrowed
-  --> $DIR/loan_ends_mid_block_pair.rs:12:5
+error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
+  --> $DIR/loan_ends_mid_block_pair.rs:14:5
+   |
+LL |     let c = &mut data.0;
+   |                  ------ borrow of `data.0` occurs here
+LL |     capitalize(c);
+LL |     data.0 = 'e';
+   |     ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
+
+error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
+  --> $DIR/loan_ends_mid_block_pair.rs:17:5
+   |
+LL |     let c = &mut data.0;
+   |                  ------ borrow of `data.0` occurs here
+...
+LL |     data.0 = 'f';
+   |     ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
+
+error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
+  --> $DIR/loan_ends_mid_block_pair.rs:19:5
+   |
+LL |     let c = &mut data.0;
+   |                  ------ borrow of `data.0` occurs here
+...
+LL |     data.0 = 'g';
+   |     ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
+
+error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
+  --> $DIR/loan_ends_mid_block_pair.rs:28:5
+   |
+LL |     let c = &mut data.0;
+   |                  ------ borrow of `data.0` occurs here
+LL |     capitalize(c);
+LL |     data.0 = 'e';
+   |     ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
+
+error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
+  --> $DIR/loan_ends_mid_block_pair.rs:30:5
+   |
+LL |     let c = &mut data.0;
+   |                  ------ borrow of `data.0` occurs here
+...
+LL |     data.0 = 'f';
+   |     ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
+
+error[E0506]: cannot assign to `data.0` because it is borrowed (Ast)
+  --> $DIR/loan_ends_mid_block_pair.rs:32:5
+   |
+LL |     let c = &mut data.0;
+   |                  ------ borrow of `data.0` occurs here
+...
+LL |     data.0 = 'g';
+   |     ^^^^^^^^^^^^ assignment to borrowed `data.0` occurs here
+
+error[E0506]: cannot assign to `data.0` because it is borrowed (Mir)
+  --> $DIR/loan_ends_mid_block_pair.rs:14:5
    |
 LL |     let c = &mut data.0;
    |             ----------- borrow of `data.0` occurs here
@@ -10,6 +64,6 @@ LL |     data.0 = 'e';
 LL |     capitalize(c);
    |                - borrow later used here
 
-error: aborting due to previous error
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0506`.
diff --git a/src/test/ui/nll/loan_ends_mid_block_vec.stderr b/src/test/ui/nll/loan_ends_mid_block_vec.stderr
index c0b97bea348..a3f1391f001 100644
--- a/src/test/ui/nll/loan_ends_mid_block_vec.stderr
+++ b/src/test/ui/nll/loan_ends_mid_block_vec.stderr
@@ -1,5 +1,77 @@
-error[E0499]: cannot borrow `data` as mutable more than once at a time
-  --> $DIR/loan_ends_mid_block_vec.rs:11:5
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
+  --> $DIR/loan_ends_mid_block_vec.rs:13:5
+   |
+LL |     let slice = &mut data;
+   |                      ---- first mutable borrow occurs here
+LL |     capitalize(slice);
+LL |     data.push('d');
+   |     ^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
+  --> $DIR/loan_ends_mid_block_vec.rs:16:5
+   |
+LL |     let slice = &mut data;
+   |                      ---- first mutable borrow occurs here
+...
+LL |     data.push('e');
+   |     ^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
+  --> $DIR/loan_ends_mid_block_vec.rs:19:5
+   |
+LL |     let slice = &mut data;
+   |                      ---- first mutable borrow occurs here
+...
+LL |     data.push('f');
+   |     ^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
+  --> $DIR/loan_ends_mid_block_vec.rs:29:5
+   |
+LL |     let slice = &mut data;
+   |                      ---- first mutable borrow occurs here
+LL |     capitalize(slice);
+LL |     data.push('d');
+   |     ^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
+  --> $DIR/loan_ends_mid_block_vec.rs:31:5
+   |
+LL |     let slice = &mut data;
+   |                      ---- first mutable borrow occurs here
+...
+LL |     data.push('e');
+   |     ^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Ast)
+  --> $DIR/loan_ends_mid_block_vec.rs:33:5
+   |
+LL |     let slice = &mut data;
+   |                      ---- first mutable borrow occurs here
+...
+LL |     data.push('f');
+   |     ^^^^ second mutable borrow occurs here
+LL |
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir)
+  --> $DIR/loan_ends_mid_block_vec.rs:13:5
    |
 LL |     let slice = &mut data;
    |                 --------- first mutable borrow occurs here
@@ -10,8 +82,8 @@ LL |     data.push('d');
 LL |     capitalize(slice);
    |                ----- first borrow later used here
 
-error[E0499]: cannot borrow `data` as mutable more than once at a time
-  --> $DIR/loan_ends_mid_block_vec.rs:13:5
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir)
+  --> $DIR/loan_ends_mid_block_vec.rs:16:5
    |
 LL |     let slice = &mut data;
    |                 --------- first mutable borrow occurs here
@@ -22,18 +94,18 @@ LL |     data.push('e');
 LL |     capitalize(slice);
    |                ----- first borrow later used here
 
-error[E0499]: cannot borrow `data` as mutable more than once at a time
-  --> $DIR/loan_ends_mid_block_vec.rs:15:5
+error[E0499]: cannot borrow `data` as mutable more than once at a time (Mir)
+  --> $DIR/loan_ends_mid_block_vec.rs:19:5
    |
 LL |     let slice = &mut data;
    |                 --------- first mutable borrow occurs here
 ...
 LL |     data.push('f');
    |     ^^^^ second mutable borrow occurs here
-LL |
+...
 LL |     capitalize(slice);
    |                ----- first borrow later used here
 
-error: aborting due to 3 previous errors
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/ui/nll/region-ends-after-if-condition.stderr b/src/test/ui/nll/region-ends-after-if-condition.stderr
index c03e3857906..aa876a0bcb3 100644
--- a/src/test/ui/nll/region-ends-after-if-condition.stderr
+++ b/src/test/ui/nll/region-ends-after-if-condition.stderr
@@ -1,15 +1,39 @@
-error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable
-  --> $DIR/region-ends-after-if-condition.rs:26:9
+error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Ast)
+  --> $DIR/region-ends-after-if-condition.rs:19:9
+   |
+LL |     let value = &my_struct.field;
+   |                  --------------- immutable borrow occurs here
+LL |     if value.is_empty() {
+LL |         my_struct.field.push_str("Hello, world!");
+   |         ^^^^^^^^^^^^^^^ mutable borrow occurs here
+...
+LL | }
+   | - immutable borrow ends here
+
+error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Ast)
+  --> $DIR/region-ends-after-if-condition.rs:29:9
+   |
+LL |     let value = &my_struct.field;
+   |                  --------------- immutable borrow occurs here
+LL |     if value.is_empty() {
+LL |         my_struct.field.push_str("Hello, world!");
+   |         ^^^^^^^^^^^^^^^ mutable borrow occurs here
+...
+LL | }
+   | - immutable borrow ends here
+
+error[E0502]: cannot borrow `my_struct.field` as mutable because it is also borrowed as immutable (Mir)
+  --> $DIR/region-ends-after-if-condition.rs:29:9
    |
 LL |     let value = &my_struct.field;
    |                 ---------------- immutable borrow occurs here
 LL |     if value.is_empty() {
 LL |         my_struct.field.push_str("Hello, world!");
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
+   |         ^^^^^^^^^^^^^^^ mutable borrow occurs here
 ...
 LL |     drop(value);
    |          ----- immutable borrow later used here
 
-error: aborting due to previous error
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0502`.
diff --git a/src/test/ui/nll/return_from_loop.stderr b/src/test/ui/nll/return_from_loop.stderr
index efd56ea2dd5..09882d55cb7 100644
--- a/src/test/ui/nll/return_from_loop.stderr
+++ b/src/test/ui/nll/return_from_loop.stderr
@@ -1,15 +1,39 @@
-error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time
-  --> $DIR/return_from_loop.rs:20:9
+error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast)
+  --> $DIR/return_from_loop.rs:22:9
+   |
+LL |     let value = &mut my_struct.field;
+   |                      --------------- first mutable borrow occurs here
+LL |     loop {
+LL |         my_struct.field.push_str("Hello, world!");
+   |         ^^^^^^^^^^^^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Ast)
+  --> $DIR/return_from_loop.rs:35:9
+   |
+LL |     let value = &mut my_struct.field;
+   |                      --------------- first mutable borrow occurs here
+LL |     loop {
+LL |         my_struct.field.push_str("Hello, world!");
+   |         ^^^^^^^^^^^^^^^ second mutable borrow occurs here
+...
+LL | }
+   | - first borrow ends here
+
+error[E0499]: cannot borrow `my_struct.field` as mutable more than once at a time (Mir)
+  --> $DIR/return_from_loop.rs:22:9
    |
 LL |     let value = &mut my_struct.field;
    |                 -------------------- first mutable borrow occurs here
 LL |     loop {
 LL |         my_struct.field.push_str("Hello, world!");
    |         ^^^^^^^^^^^^^^^ second mutable borrow occurs here
-LL |
+...
 LL |         value.len();
    |         ----- first borrow later used here
 
-error: aborting due to previous error
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0499`.
diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr
index 3f69bcc7d4a..ead3a79da02 100644
--- a/src/test/ui/numeric/const-scope.stderr
+++ b/src/test/ui/numeric/const-scope.stderr
@@ -37,7 +37,7 @@ error[E0308]: mismatched types
    |
 LL |     let d: i8 = c;
    |                 ^ expected i8, found i32
-help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     let d: i8 = c.try_into().unwrap();
    |                 ^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/numeric/len.stderr b/src/test/ui/numeric/len.stderr
index c767bdd9bd5..5a9349b4c0f 100644
--- a/src/test/ui/numeric/len.stderr
+++ b/src/test/ui/numeric/len.stderr
@@ -3,7 +3,7 @@ error[E0308]: mismatched types
    |
 LL |     test(array.len());
    |          ^^^^^^^^^^^ expected u32, found usize
-help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     test(array.len().try_into().unwrap());
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/src/test/ui/numeric/numeric-cast-2.stderr
index f58389ce96c..be4411e630b 100644
--- a/src/test/ui/numeric/numeric-cast-2.stderr
+++ b/src/test/ui/numeric/numeric-cast-2.stderr
@@ -3,7 +3,7 @@ error[E0308]: mismatched types
    |
 LL |     let x: u16 = foo();
    |                  ^^^^^ expected u16, found i32
-help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     let x: u16 = foo().try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
    |
 LL |     let y: i64 = x + x;
    |                  ^^^^^ expected i64, found u16
-help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     let y: i64 = (x + x).try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ error[E0308]: mismatched types
    |
 LL |     let z: i32 = x + x;
    |                  ^^^^^ expected i32, found u16
-help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     let z: i32 = (x + x).try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/numeric/numeric-cast.stderr b/src/test/ui/numeric/numeric-cast.stderr
index e66b83f2b39..9e7dcf7e41b 100644
--- a/src/test/ui/numeric/numeric-cast.stderr
+++ b/src/test/ui/numeric/numeric-cast.stderr
@@ -3,7 +3,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_u64);
    |                  ^^^^^ expected usize, found u64
-help: you can convert an `u64` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_u64.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_u32);
    |                  ^^^^^ expected usize, found u32
-help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_u32.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_u16);
    |                  ^^^^^ expected usize, found u16
-help: you can convert an `u16` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_u16.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -33,7 +33,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_u8);
    |                  ^^^^ expected usize, found u8
-help: you can convert an `u8` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `u8` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_u8.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -43,7 +43,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_isize);
    |                  ^^^^^^^ expected usize, found isize
-help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_isize.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -53,7 +53,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_i64);
    |                  ^^^^^ expected usize, found i64
-help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_i64.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -63,7 +63,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_i32);
    |                  ^^^^^ expected usize, found i32
-help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_i32.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,7 +73,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_i16);
    |                  ^^^^^ expected usize, found i16
-help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_i16.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -83,7 +83,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<usize>(x_i8);
    |                  ^^^^ expected usize, found i8
-help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `i8` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<usize>(x_i8.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_usize);
    |                  ^^^^^^^ expected isize, found usize
-help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_usize.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -103,7 +103,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_u64);
    |                  ^^^^^ expected isize, found u64
-help: you can convert an `u64` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_u64.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -113,7 +113,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_u32);
    |                  ^^^^^ expected isize, found u32
-help: you can convert an `u32` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_u32.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -123,7 +123,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_u16);
    |                  ^^^^^ expected isize, found u16
-help: you can convert an `u16` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_u16.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -133,7 +133,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_u8);
    |                  ^^^^ expected isize, found u8
-help: you can convert an `u8` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `u8` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_u8.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -143,7 +143,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_i64);
    |                  ^^^^^ expected isize, found i64
-help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_i64.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -153,7 +153,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_i32);
    |                  ^^^^^ expected isize, found i32
-help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_i32.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -163,7 +163,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_i16);
    |                  ^^^^^ expected isize, found i16
-help: you can convert an `i16` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_i16.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -173,7 +173,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<isize>(x_i8);
    |                  ^^^^ expected isize, found i8
-help: you can convert an `i8` to `isize` and panic if the converted value wouldn't fit
+help: you can convert an `i8` to `isize` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<isize>(x_i8.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -183,7 +183,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u64>(x_usize);
    |                ^^^^^^^ expected u64, found usize
-help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u64>(x_usize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -220,7 +220,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u64>(x_isize);
    |                ^^^^^^^ expected u64, found isize
-help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u64>(x_isize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -230,7 +230,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u64>(x_i64);
    |                ^^^^^ expected u64, found i64
-help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u64>(x_i64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -240,7 +240,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u64>(x_i32);
    |                ^^^^^ expected u64, found i32
-help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u64>(x_i32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -250,7 +250,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u64>(x_i16);
    |                ^^^^^ expected u64, found i16
-help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u64>(x_i16.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -260,7 +260,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u64>(x_i8);
    |                ^^^^ expected u64, found i8
-help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit
+help: you can convert an `i8` to `u64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u64>(x_i8.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -270,7 +270,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i64>(x_usize);
    |                ^^^^^^^ expected i64, found usize
-help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i64>(x_usize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -280,7 +280,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i64>(x_u64);
    |                ^^^^^ expected i64, found u64
-help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i64>(x_u64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -290,7 +290,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i64>(x_u32);
    |                ^^^^^ expected i64, found u32
-help: you can convert an `u32` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i64>(x_u32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -300,7 +300,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i64>(x_u16);
    |                ^^^^^ expected i64, found u16
-help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i64>(x_u16.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -310,7 +310,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i64>(x_u8);
    |                ^^^^ expected i64, found u8
-help: you can convert an `u8` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `u8` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i64>(x_u8.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -320,7 +320,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i64>(x_isize);
    |                ^^^^^^^ expected i64, found isize
-help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `i64` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i64>(x_isize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -357,7 +357,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_usize);
    |                ^^^^^^^ expected u32, found usize
-help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_usize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -367,7 +367,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_u64);
    |                ^^^^^ expected u32, found u64
-help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_u64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -395,7 +395,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_isize);
    |                ^^^^^^^ expected u32, found isize
-help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_isize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -405,7 +405,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_i64);
    |                ^^^^^ expected u32, found i64
-help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_i64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -415,7 +415,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_i32);
    |                ^^^^^ expected u32, found i32
-help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_i32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -425,7 +425,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_i16);
    |                ^^^^^ expected u32, found i16
-help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_i16.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -435,7 +435,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u32>(x_i8);
    |                ^^^^ expected u32, found i8
-help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit
+help: you can convert an `i8` to `u32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u32>(x_i8.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -445,7 +445,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_usize);
    |                ^^^^^^^ expected i32, found usize
-help: you can convert an `usize` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_usize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -455,7 +455,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_u64);
    |                ^^^^^ expected i32, found u64
-help: you can convert an `u64` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_u64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -465,7 +465,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_u32);
    |                ^^^^^ expected i32, found u32
-help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_u32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -475,7 +475,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_u16);
    |                ^^^^^ expected i32, found u16
-help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_u16.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -485,7 +485,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_u8);
    |                ^^^^ expected i32, found u8
-help: you can convert an `u8` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `u8` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_u8.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -495,7 +495,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_isize);
    |                ^^^^^^^ expected i32, found isize
-help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_isize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -505,7 +505,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i32>(x_i64);
    |                ^^^^^ expected i32, found i64
-help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i32>(x_i64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -533,7 +533,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_usize);
    |                ^^^^^^^ expected u16, found usize
-help: you can convert an `usize` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_usize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -543,7 +543,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_u64);
    |                ^^^^^ expected u16, found u64
-help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_u64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -553,7 +553,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_u32);
    |                ^^^^^ expected u16, found u32
-help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_u32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -572,7 +572,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_isize);
    |                ^^^^^^^ expected u16, found isize
-help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_isize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -582,7 +582,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_i64);
    |                ^^^^^ expected u16, found i64
-help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_i64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -592,7 +592,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_i32);
    |                ^^^^^ expected u16, found i32
-help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_i32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -602,7 +602,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_i16);
    |                ^^^^^ expected u16, found i16
-help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_i16.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -612,7 +612,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u16>(x_i8);
    |                ^^^^ expected u16, found i8
-help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `i8` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u16>(x_i8.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -622,7 +622,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_usize);
    |                ^^^^^^^ expected i16, found usize
-help: you can convert an `usize` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_usize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -632,7 +632,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_u64);
    |                ^^^^^ expected i16, found u64
-help: you can convert an `u64` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_u64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -642,7 +642,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_u32);
    |                ^^^^^ expected i16, found u32
-help: you can convert an `u32` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_u32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -652,7 +652,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_u16);
    |                ^^^^^ expected i16, found u16
-help: you can convert an `u16` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_u16.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -662,7 +662,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_u8);
    |                ^^^^ expected i16, found u8
-help: you can convert an `u8` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `u8` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_u8.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -672,7 +672,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_isize);
    |                ^^^^^^^ expected i16, found isize
-help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_isize.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -682,7 +682,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_i64);
    |                ^^^^^ expected i16, found i64
-help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_i64.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -692,7 +692,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i16>(x_i32);
    |                ^^^^^ expected i16, found i32
-help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i16>(x_i32.try_into().unwrap());
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -711,7 +711,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_usize);
    |               ^^^^^^^ expected u8, found usize
-help: you can convert an `usize` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_usize.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -721,7 +721,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_u64);
    |               ^^^^^ expected u8, found u64
-help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_u64.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -731,7 +731,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_u32);
    |               ^^^^^ expected u8, found u32
-help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_u32.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -741,7 +741,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_u16);
    |               ^^^^^ expected u8, found u16
-help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_u16.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -751,7 +751,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_isize);
    |               ^^^^^^^ expected u8, found isize
-help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_isize.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -761,7 +761,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_i64);
    |               ^^^^^ expected u8, found i64
-help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_i64.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -771,7 +771,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_i32);
    |               ^^^^^ expected u8, found i32
-help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_i32.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -781,7 +781,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_i16);
    |               ^^^^^ expected u8, found i16
-help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_i16.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -791,7 +791,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<u8>(x_i8);
    |               ^^^^ expected u8, found i8
-help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `i8` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<u8>(x_i8.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -801,7 +801,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_usize);
    |               ^^^^^^^ expected i8, found usize
-help: you can convert an `usize` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `usize` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_usize.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -811,7 +811,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_u64);
    |               ^^^^^ expected i8, found u64
-help: you can convert an `u64` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `u64` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_u64.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -821,7 +821,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_u32);
    |               ^^^^^ expected i8, found u32
-help: you can convert an `u32` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `u32` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_u32.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -831,7 +831,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_u16);
    |               ^^^^^ expected i8, found u16
-help: you can convert an `u16` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `u16` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_u16.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -841,7 +841,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_u8);
    |               ^^^^ expected i8, found u8
-help: you can convert an `u8` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `u8` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_u8.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -851,7 +851,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_isize);
    |               ^^^^^^^ expected i8, found isize
-help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_isize.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -861,7 +861,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_i64);
    |               ^^^^^ expected i8, found i64
-help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_i64.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -871,7 +871,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_i32);
    |               ^^^^^ expected i8, found i32
-help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_i32.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -881,7 +881,7 @@ error[E0308]: mismatched types
    |
 LL |     foo::<i8>(x_i16);
    |               ^^^^^ expected i8, found i16
-help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
+help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
    |
 LL |     foo::<i8>(x_i16.try_into().unwrap());
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/pub/pub-restricted.stderr b/src/test/ui/pub/pub-restricted.stderr
index 596264ba16b..7eeefa95505 100644
--- a/src/test/ui/pub/pub-restricted.stderr
+++ b/src/test/ui/pub/pub-restricted.stderr
@@ -21,18 +21,7 @@ LL | pub (b) fn bfn() {}
            `pub(in path::to::module)`: visible only on the specified path
 
 error[E0704]: incorrect visibility restriction
-  --> $DIR/pub-restricted.rs:7:6
-   |
-LL | pub (crate::a) fn cfn() {}
-   |      ^^^^^^^^ help: make this visible only to module `crate::a` with `in`: `in crate::a`
-   |
-   = help: some possible visibility restrictions are:
-           `pub(crate)`: visible only on the current crate
-           `pub(super)`: visible only in the current module's parent
-           `pub(in path::to::module)`: visible only on the specified path
-
-error[E0704]: incorrect visibility restriction
-  --> $DIR/pub-restricted.rs:24:14
+  --> $DIR/pub-restricted.rs:22:14
    |
 LL |         pub (a) invalid: usize,
    |              ^ help: make this visible only to module `a` with `in`: `in a`
@@ -43,7 +32,7 @@ LL |         pub (a) invalid: usize,
            `pub(in path::to::module)`: visible only on the specified path
 
 error[E0704]: incorrect visibility restriction
-  --> $DIR/pub-restricted.rs:33:6
+  --> $DIR/pub-restricted.rs:31:6
    |
 LL | pub (xyz) fn xyz() {}
    |      ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
@@ -54,11 +43,11 @@ LL | pub (xyz) fn xyz() {}
            `pub(in path::to::module)`: visible only on the specified path
 
 error: visibilities can only be restricted to ancestor modules
-  --> $DIR/pub-restricted.rs:25:17
+  --> $DIR/pub-restricted.rs:23:17
    |
 LL |         pub (in x) non_parent_invalid: usize,
    |                 ^
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0704`.
diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr
index df73ac0b182..6772aa1c38d 100644
--- a/src/test/ui/repeat_count.stderr
+++ b/src/test/ui/repeat_count.stderr
@@ -42,7 +42,7 @@ error[E0308]: mismatched types
    |
 LL |     let f = [0; -4_isize];
    |                 ^^^^^^^^ expected usize, found isize
-help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     let f = [0; (-4_isize).try_into().unwrap()];
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -52,7 +52,7 @@ error[E0308]: mismatched types
    |
 LL |     let f = [0_usize; -1_isize];
    |                       ^^^^^^^^ expected usize, found isize
-help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
    |
 LL |     let f = [0_usize; (-1_isize).try_into().unwrap()];
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/shift-various-bad-types.stderr b/src/test/ui/shift-various-bad-types.stderr
index 409fabb951a..97523fe82cd 100644
--- a/src/test/ui/shift-various-bad-types.stderr
+++ b/src/test/ui/shift-various-bad-types.stderr
@@ -27,7 +27,7 @@ error[E0308]: mismatched types
    |
 LL |     let _: i32 = 22_i64 >> 1_i32;
    |                  ^^^^^^^^^^^^^^^ expected i32, found i64
-help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
+help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
    |
 LL |     let _: i32 = (22_i64 >> 1_i32).try_into().unwrap();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/symbol-names/basic.stderr b/src/test/ui/symbol-names/basic.stderr
new file mode 100644
index 00000000000..6ddd93d632e
--- /dev/null
+++ b/src/test/ui/symbol-names/basic.stderr
@@ -0,0 +1,14 @@
+error: symbol-name(_ZN5basic4main17h08bcaf310214ed52E)
+  --> $DIR/basic.rs:3:1
+   |
+LL | #[rustc_symbol_name]
+   | ^^^^^^^^^^^^^^^^^^^^
+
+error: def-path(main)
+  --> $DIR/basic.rs:4:1
+   |
+LL | #[rustc_def_path]
+   | ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/symbol-names/impl1.stderr b/src/test/ui/symbol-names/impl1.stderr
new file mode 100644
index 00000000000..eda8646b5b4
--- /dev/null
+++ b/src/test/ui/symbol-names/impl1.stderr
@@ -0,0 +1,26 @@
+error: symbol-name(_ZN5impl13foo3Foo3bar17hc487d6ec13fe9124E)
+  --> $DIR/impl1.rs:8:9
+   |
+LL |         #[rustc_symbol_name]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: def-path(foo::Foo::bar)
+  --> $DIR/impl1.rs:9:9
+   |
+LL |         #[rustc_def_path]
+   |         ^^^^^^^^^^^^^^^^^
+
+error: symbol-name(_ZN5impl13bar33_$LT$impl$u20$impl1..foo..Foo$GT$3baz17h38577281258e1527E)
+  --> $DIR/impl1.rs:18:9
+   |
+LL |         #[rustc_symbol_name]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: def-path(bar::<impl foo::Foo>::baz)
+  --> $DIR/impl1.rs:19:9
+   |
+LL |         #[rustc_def_path]
+   |         ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
index e9c28248044..9acd63c2c25 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
+++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
@@ -6,7 +6,7 @@ LL | fn global_bound_is_hidden() -> u8
 ...
 LL |     B::get_x()
    |     ^^^^^^^^^^ expected u8, found i32
-help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit
    |
 LL |     B::get_x().try_into().unwrap()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/tutorial-suffix-inference-test.stderr b/src/test/ui/tutorial-suffix-inference-test.stderr
index f3e1cc41cad..f51f2defd47 100644
--- a/src/test/ui/tutorial-suffix-inference-test.stderr
+++ b/src/test/ui/tutorial-suffix-inference-test.stderr
@@ -12,7 +12,7 @@ error[E0308]: mismatched types
    |
 LL |     identity_u16(y);
    |                  ^ expected u16, found i32
-help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     identity_u16(y.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^
@@ -22,7 +22,7 @@ error[E0308]: mismatched types
    |
 LL |     identity_u16(a);
    |                  ^ expected u16, found isize
-help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
+help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit
    |
 LL |     identity_u16(a.try_into().unwrap());
    |                  ^^^^^^^^^^^^^^^^^^^^^