about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-16 05:03:20 +0000
committerbors <bors@rust-lang.org>2019-07-16 05:03:20 +0000
commit02785dabad07d19b8c76a7f86763801d5d3497ff (patch)
treed2b3c2f98ca7ab753a084f6c2e1450539cd9b7ea /src/test
parent4b65a86ebace8600c8e269e8bfe3365cdc460e68 (diff)
parentda0c8feba49e5741420f545add7243e7c0ecc881 (diff)
Auto merge of #62704 - Mark-Simulacrum:rollup-oi94s2j, r=Mark-Simulacrum
Rollup of 14 pull requests

Successful merges:

 - #62103 (Add debug assertions to write_bytes and copy*)
 - #62405 (Remove never_type feature requirement for exhaustive patterns)
 - #62491 (Fix Pin urls in Option documentation)
 - #62533 (Add missing links for CannotReallocInPlace type)
 - #62634 (Less unsafe in the array example of MaybeUninit docs)
 - #62639 (Make VaListImpl<'f> invariant over the 'f lifetime)
 - #62646 (Tweak wording in feature gate errors)
 - #62662 (add spaces in front of trait requirements in libcore/cell.rs)
 - #62668 (Fix #62660)
 - #62673 (miri validation: better error messages for dangling references)
 - #62680 (Actually call `visit_block_entry` in `DataflowResultsConsumer`)
 - #62685 (Add info about undefined behavior to as_ref suggestions)
 - #62689 (Fix typo in RawWaker::new documentation)
 - #62698 (SGX target: don't pretend to be GNU/Linux to LLVM)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/codegen/issue-45222.rs1
-rw-r--r--src/test/codegen/issue-45466.rs1
-rw-r--r--src/test/codegen/swap-small-types.rs1
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-4.nll.stderr34
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-4.rs4
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-4.stderr122
-rw-r--r--src/test/ui/conditional-compilation/cfg-generic-params.stderr10
-rw-r--r--src/test/ui/consts/const-eval/ub-ref.stderr2
-rw-r--r--src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-custom_attribute2.rs34
-rw-r--r--src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr34
-rw-r--r--src/test/ui/feature-gates/feature-gate-may-dangle.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-may-dangle.stderr2
-rw-r--r--src/test/ui/issues/issue-21596.stderr1
-rw-r--r--src/test/ui/parser/issue-62660.rs11
-rw-r--r--src/test/ui/parser/issue-62660.stderr8
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates2.stderr4
-rw-r--r--src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs16
-rw-r--r--src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr16
-rw-r--r--src/test/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs9
20 files changed, 210 insertions, 106 deletions
diff --git a/src/test/codegen/issue-45222.rs b/src/test/codegen/issue-45222.rs
index da65f2dfca5..7f99ca724cf 100644
--- a/src/test/codegen/issue-45222.rs
+++ b/src/test/codegen/issue-45222.rs
@@ -1,4 +1,5 @@
 // compile-flags: -O
+// ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/src/test/codegen/issue-45466.rs b/src/test/codegen/issue-45466.rs
index 7d6e31cc740..c7954276777 100644
--- a/src/test/codegen/issue-45466.rs
+++ b/src/test/codegen/issue-45466.rs
@@ -1,4 +1,5 @@
 // compile-flags: -O
+// ignore-debug: the debug assertions get in the way
 
 #![crate_type="rlib"]
 
diff --git a/src/test/codegen/swap-small-types.rs b/src/test/codegen/swap-small-types.rs
index c8466fed7d1..6205e6a6559 100644
--- a/src/test/codegen/swap-small-types.rs
+++ b/src/test/codegen/swap-small-types.rs
@@ -1,5 +1,6 @@
 // compile-flags: -O
 // only-x86_64
+// ignore-debug: the debug assertions get in the way
 
 #![crate_type = "lib"]
 
diff --git a/src/test/ui/c-variadic/variadic-ffi-4.nll.stderr b/src/test/ui/c-variadic/variadic-ffi-4.nll.stderr
index 3c5131835b5..4947d6e5291 100644
--- a/src/test/ui/c-variadic/variadic-ffi-4.nll.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-4.nll.stderr
@@ -27,6 +27,16 @@ error: lifetime may not live long enough
   --> $DIR/variadic-ffi-4.rs:20:5
    |
 LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
+   |                                               -------                   ------- has type `core::ffi::VaListImpl<'2>`
+   |                                               |
+   |                                               has type `&mut core::ffi::VaListImpl<'1>`
+LL |     *ap0 = ap1;
+   |     ^^^^ assignment requires that `'1` must outlive `'2`
+
+error: lifetime may not live long enough
+  --> $DIR/variadic-ffi-4.rs:20:5
+   |
+LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
    |                                               -------                   ------- has type `core::ffi::VaListImpl<'1>`
    |                                               |
    |                                               has type `&mut core::ffi::VaListImpl<'2>`
@@ -34,7 +44,7 @@ LL |     *ap0 = ap1;
    |     ^^^^ assignment requires that `'1` must outlive `'2`
 
 error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-4.rs:24:5
+  --> $DIR/variadic-ffi-4.rs:25:5
    |
 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
    |                                               ---                   ------- has type `core::ffi::VaListImpl<'2>`
@@ -44,7 +54,7 @@ LL |     ap0 = &mut ap1;
    |     ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
 
 error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-4.rs:24:5
+  --> $DIR/variadic-ffi-4.rs:25:5
    |
 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
    |                                               ---                   ------- has type `core::ffi::VaListImpl<'1>`
@@ -54,7 +64,7 @@ LL |     ap0 = &mut ap1;
    |     ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
 
 error[E0384]: cannot assign to immutable argument `ap0`
-  --> $DIR/variadic-ffi-4.rs:24:5
+  --> $DIR/variadic-ffi-4.rs:25:5
    |
 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
    |                                               --- help: make this binding mutable: `mut ap0`
@@ -62,7 +72,7 @@ LL |     ap0 = &mut ap1;
    |     ^^^^^^^^^^^^^^ cannot assign to immutable argument
 
 error[E0597]: `ap1` does not live long enough
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
    |                                                    - let's call the lifetime of this reference `'1`
@@ -76,16 +86,26 @@ LL | }
    | - `ap1` dropped here while still borrowed
 
 error: lifetime may not live long enough
-  --> $DIR/variadic-ffi-4.rs:32:5
+  --> $DIR/variadic-ffi-4.rs:33:12
+   |
+LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
+   |                                               -------                   ------- has type `core::ffi::VaListImpl<'2>`
+   |                                               |
+   |                                               has type `&mut core::ffi::VaListImpl<'1>`
+LL |     *ap0 = ap1.clone();
+   |            ^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
+
+error: lifetime may not live long enough
+  --> $DIR/variadic-ffi-4.rs:33:12
    |
 LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
    |                                               -------                   ------- has type `core::ffi::VaListImpl<'1>`
    |                                               |
    |                                               has type `&mut core::ffi::VaListImpl<'2>`
 LL |     *ap0 = ap1.clone();
-   |     ^^^^ assignment requires that `'1` must outlive `'2`
+   |            ^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
 
-error: aborting due to 9 previous errors
+error: aborting due to 11 previous errors
 
 Some errors have detailed explanations: E0384, E0597, E0621.
 For more information about an error, try `rustc --explain E0384`.
diff --git a/src/test/ui/c-variadic/variadic-ffi-4.rs b/src/test/ui/c-variadic/variadic-ffi-4.rs
index 07c32ecbfc2..4a50d352a5b 100644
--- a/src/test/ui/c-variadic/variadic-ffi-4.rs
+++ b/src/test/ui/c-variadic/variadic-ffi-4.rs
@@ -18,6 +18,7 @@ pub unsafe extern "C" fn no_escape2(_: usize, ap: ...) {
 
 pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
     *ap0 = ap1; //~ ERROR: mismatched types
+    //~^ ERROR: mismatched types
 }
 
 pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
@@ -29,5 +30,6 @@ pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...
 }
 
 pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
-    *ap0 = ap1.clone(); //~ ERROR: cannot infer an appropriate lifetime
+    *ap0 = ap1.clone(); //~ ERROR: mismatched types
+    //~^ ERROR: mismatched types
 }
diff --git a/src/test/ui/c-variadic/variadic-ffi-4.stderr b/src/test/ui/c-variadic/variadic-ffi-4.stderr
index 72d4d8b6344..7aa510e6113 100644
--- a/src/test/ui/c-variadic/variadic-ffi-4.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-4.stderr
@@ -52,6 +52,7 @@ note: the anonymous lifetime #3 defined on the function body at 19:1...
    |
 LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     *ap0 = ap1;
+LL | |
 LL | | }
    | |_^
 note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 19:1
@@ -59,17 +60,43 @@ note: ...does not necessarily outlive the anonymous lifetime #2 defined on the f
    |
 LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     *ap0 = ap1;
+LL | |
+LL | | }
+   | |_^
+
+error[E0308]: mismatched types
+  --> $DIR/variadic-ffi-4.rs:20:12
+   |
+LL |     *ap0 = ap1;
+   |            ^^^ lifetime mismatch
+   |
+   = note: expected type `core::ffi::VaListImpl<'_>`
+              found type `core::ffi::VaListImpl<'_>`
+note: the anonymous lifetime #2 defined on the function body at 19:1...
+  --> $DIR/variadic-ffi-4.rs:19:1
+   |
+LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
+LL | |     *ap0 = ap1;
+LL | |
+LL | | }
+   | |_^
+note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 19:1
+  --> $DIR/variadic-ffi-4.rs:19:1
+   |
+LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
+LL | |     *ap0 = ap1;
+LL | |
 LL | | }
    | |_^
 
 error[E0490]: a value of type `core::ffi::VaListImpl<'_>` is borrowed for too long
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^
    |
-note: the type is valid for the anonymous lifetime #1 defined on the function body at 23:1
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: the type is valid for the anonymous lifetime #1 defined on the function body at 24:1
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -79,8 +106,8 @@ LL | |
 LL | |
 LL | | }
    | |_^
-note: but the borrow lasts for the anonymous lifetime #3 defined on the function body at 23:1
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: but the borrow lasts for the anonymous lifetime #3 defined on the function body at 24:1
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -92,15 +119,15 @@ LL | | }
    | |_^
 
 error[E0308]: mismatched types
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^ lifetime mismatch
    |
    = note: expected type `&mut core::ffi::VaListImpl<'_>`
               found type `&mut core::ffi::VaListImpl<'_>`
-note: the anonymous lifetime #3 defined on the function body at 23:1...
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: the anonymous lifetime #3 defined on the function body at 24:1...
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -110,8 +137,8 @@ LL | |
 LL | |
 LL | | }
    | |_^
-note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 23:1
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 24:1
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -123,15 +150,15 @@ LL | | }
    | |_^
 
 error[E0308]: mismatched types
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^ lifetime mismatch
    |
    = note: expected type `&mut core::ffi::VaListImpl<'_>`
               found type `&mut core::ffi::VaListImpl<'_>`
-note: the anonymous lifetime #2 defined on the function body at 23:1...
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: the anonymous lifetime #2 defined on the function body at 24:1...
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -141,8 +168,8 @@ LL | |
 LL | |
 LL | | }
    | |_^
-note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 23:1
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 24:1
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -154,13 +181,13 @@ LL | | }
    | |_^
 
 error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^
    |
-note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the function body at 23:1...
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the function body at 24:1...
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -171,12 +198,12 @@ LL | |
 LL | | }
    | |_^
 note: ...so that the type `core::ffi::VaListImpl<'_>` is not borrowed for too long
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^
-note: but, the lifetime must be valid for the anonymous lifetime #1 defined on the function body at 23:1...
-  --> $DIR/variadic-ffi-4.rs:23:1
+note: but, the lifetime must be valid for the anonymous lifetime #1 defined on the function body at 24:1...
+  --> $DIR/variadic-ffi-4.rs:24:1
    |
 LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     ap0 = &mut ap1;
@@ -187,39 +214,62 @@ LL | |
 LL | | }
    | |_^
 note: ...so that reference does not outlive borrowed content
-  --> $DIR/variadic-ffi-4.rs:24:11
+  --> $DIR/variadic-ffi-4.rs:25:11
    |
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^
 
-error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
-  --> $DIR/variadic-ffi-4.rs:32:16
+error[E0308]: mismatched types
+  --> $DIR/variadic-ffi-4.rs:33:12
    |
 LL |     *ap0 = ap1.clone();
-   |                ^^^^^
+   |            ^^^^^^^^^^^ lifetime mismatch
    |
-note: first, the lifetime cannot outlive the anonymous lifetime #3 defined on the function body at 31:1...
-  --> $DIR/variadic-ffi-4.rs:31:1
+   = note: expected type `core::ffi::VaListImpl<'_>`
+              found type `core::ffi::VaListImpl<'_>`
+note: the anonymous lifetime #3 defined on the function body at 32:1...
+  --> $DIR/variadic-ffi-4.rs:32:1
    |
 LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     *ap0 = ap1.clone();
+LL | |
 LL | | }
    | |_^
-   = note: ...so that the types are compatible:
-           expected &core::ffi::VaListImpl<'_>
-              found &core::ffi::VaListImpl<'_>
-note: but, the lifetime must be valid for the anonymous lifetime #2 defined on the function body at 31:1...
-  --> $DIR/variadic-ffi-4.rs:31:1
+note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 32:1
+  --> $DIR/variadic-ffi-4.rs:32:1
    |
 LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
 LL | |     *ap0 = ap1.clone();
+LL | |
+LL | | }
+   | |_^
+
+error[E0308]: mismatched types
+  --> $DIR/variadic-ffi-4.rs:33:12
+   |
+LL |     *ap0 = ap1.clone();
+   |            ^^^^^^^^^^^ lifetime mismatch
+   |
+   = note: expected type `core::ffi::VaListImpl<'_>`
+              found type `core::ffi::VaListImpl<'_>`
+note: the anonymous lifetime #2 defined on the function body at 32:1...
+  --> $DIR/variadic-ffi-4.rs:32:1
+   |
+LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
+LL | |     *ap0 = ap1.clone();
+LL | |
+LL | | }
+   | |_^
+note: ...does not necessarily outlive the anonymous lifetime #3 defined on the function body at 32:1
+  --> $DIR/variadic-ffi-4.rs:32:1
+   |
+LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
+LL | |     *ap0 = ap1.clone();
+LL | |
 LL | | }
    | |_^
-   = note: ...so that the expression is assignable:
-           expected core::ffi::VaListImpl<'_>
-              found core::ffi::VaListImpl<'_>
 
-error: aborting due to 9 previous errors
+error: aborting due to 11 previous errors
 
 Some errors have detailed explanations: E0308, E0621.
 For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/conditional-compilation/cfg-generic-params.stderr b/src/test/ui/conditional-compilation/cfg-generic-params.stderr
index b73d7da30b8..1f9731fcfbe 100644
--- a/src/test/ui/conditional-compilation/cfg-generic-params.stderr
+++ b/src/test/ui/conditional-compilation/cfg-generic-params.stderr
@@ -16,7 +16,7 @@ error: only lifetime parameters can be used in this context
 LL | struct WhereBad where for<#[cfg(no)] 'a, #[cfg(yes)] T> u8: Copy;
    |                                                      ^
 
-error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/cfg-generic-params.rs:19:29
    |
 LL | fn f_lt_yes<#[cfg_attr(yes, unknown)] 'a>() {}
@@ -25,7 +25,7 @@ LL | fn f_lt_yes<#[cfg_attr(yes, unknown)] 'a>() {}
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/cfg-generic-params.rs:21:29
    |
 LL | fn f_ty_yes<#[cfg_attr(yes, unknown)] T>() {}
@@ -34,7 +34,7 @@ LL | fn f_ty_yes<#[cfg_attr(yes, unknown)] T>() {}
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/cfg-generic-params.rs:24:34
    |
 LL | type FnYes = for<#[cfg_attr(yes, unknown)] 'a> fn();
@@ -43,7 +43,7 @@ LL | type FnYes = for<#[cfg_attr(yes, unknown)] 'a> fn();
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/cfg-generic-params.rs:28:40
    |
 LL | type PolyYes = dyn for<#[cfg_attr(yes, unknown)] 'a> Copy;
@@ -52,7 +52,7 @@ LL | type PolyYes = dyn for<#[cfg_attr(yes, unknown)] 'a> Copy;
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/cfg-generic-params.rs:32:43
    |
 LL | struct WhereYes where for<#[cfg_attr(yes, unknown)] 'a> u8: Copy;
diff --git a/src/test/ui/consts/const-eval/ub-ref.stderr b/src/test/ui/consts/const-eval/ub-ref.stderr
index 33535c235e3..f1702955ed7 100644
--- a/src/test/ui/consts/const-eval/ub-ref.stderr
+++ b/src/test/ui/consts/const-eval/ub-ref.stderr
@@ -34,7 +34,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref.rs:20:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered integer pointer in non-ZST reference
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling reference (created from integer)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
diff --git a/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr b/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr
index 19db90c1cb5..aac32ecc5b7 100644
--- a/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr
+++ b/src/test/ui/consts/const-eval/union-ub-fat-ptr.stderr
@@ -2,7 +2,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub-fat-ptr.rs:78:1
    |
 LL | const B: &str = unsafe { SliceTransmute { repr: SliceRepr { ptr: &42, len: 999 } }.str};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling (not entirely in bounds) reference
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling reference (not entirely in bounds)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
@@ -26,7 +26,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/union-ub-fat-ptr.rs:90:1
    |
 LL | const B2: &[u8] = unsafe { SliceTransmute { repr: SliceRepr { ptr: &42, len: 999 } }.slice};
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling (not entirely in bounds) reference
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered dangling reference (not entirely in bounds)
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
 
diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs b/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs
index 2137a2a003a..8fe11cb02a0 100644
--- a/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs
+++ b/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs
@@ -4,54 +4,54 @@
 // gate-test-custom_attribute
 
 struct StLt<#[lt_struct] 'a>(&'a u32);
-//~^ ERROR The attribute `lt_struct` is currently unknown to the compiler
+//~^ ERROR the attribute `lt_struct` is currently unknown to the compiler
 struct StTy<#[ty_struct] I>(I);
-//~^ ERROR The attribute `ty_struct` is currently unknown to the compiler
+//~^ ERROR the attribute `ty_struct` is currently unknown to the compiler
 
 enum EnLt<#[lt_enum] 'b> { A(&'b u32), B }
-//~^ ERROR The attribute `lt_enum` is currently unknown to the compiler
+//~^ ERROR the attribute `lt_enum` is currently unknown to the compiler
 enum EnTy<#[ty_enum] J> { A(J), B }
-//~^ ERROR The attribute `ty_enum` is currently unknown to the compiler
+//~^ ERROR the attribute `ty_enum` is currently unknown to the compiler
 
 trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
-//~^ ERROR The attribute `lt_trait` is currently unknown to the compiler
+//~^ ERROR the attribute `lt_trait` is currently unknown to the compiler
 trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); }
-//~^ ERROR The attribute `ty_trait` is currently unknown to the compiler
+//~^ ERROR the attribute `ty_trait` is currently unknown to the compiler
 
 type TyLt<#[lt_type] 'd> = &'d u32;
-//~^ ERROR The attribute `lt_type` is currently unknown to the compiler
+//~^ ERROR the attribute `lt_type` is currently unknown to the compiler
 type TyTy<#[ty_type] L> = (L, );
-//~^ ERROR The attribute `ty_type` is currently unknown to the compiler
+//~^ ERROR the attribute `ty_type` is currently unknown to the compiler
 
 impl<#[lt_inherent] 'e> StLt<'e> { }
-//~^ ERROR The attribute `lt_inherent` is currently unknown to the compiler
+//~^ ERROR the attribute `lt_inherent` is currently unknown to the compiler
 impl<#[ty_inherent] M> StTy<M> { }
-//~^ ERROR The attribute `ty_inherent` is currently unknown to the compiler
+//~^ ERROR the attribute `ty_inherent` is currently unknown to the compiler
 
 impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
-    //~^ ERROR The attribute `lt_impl_for` is currently unknown to the compiler
+    //~^ ERROR the attribute `lt_impl_for` is currently unknown to the compiler
     fn foo(&self, _: &'f [u32]) -> &'f u32 { loop { } }
 }
 impl<#[ty_impl_for] N> TrTy<N> for StTy<N> {
-    //~^ ERROR The attribute `ty_impl_for` is currently unknown to the compiler
+    //~^ ERROR the attribute `ty_impl_for` is currently unknown to the compiler
     fn foo(&self, _: N) { }
 }
 
 fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
-//~^ ERROR The attribute `lt_fn` is currently unknown to the compiler
+//~^ ERROR the attribute `lt_fn` is currently unknown to the compiler
 fn f_ty<#[ty_fn] O>(_: O) { }
-//~^ ERROR The attribute `ty_fn` is currently unknown to the compiler
+//~^ ERROR the attribute `ty_fn` is currently unknown to the compiler
 
 impl<I> StTy<I> {
     fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
-    //~^ ERROR The attribute `lt_meth` is currently unknown to the compiler
+    //~^ ERROR the attribute `lt_meth` is currently unknown to the compiler
     fn m_ty<#[ty_meth] P>(_: P) { }
-    //~^ ERROR The attribute `ty_meth` is currently unknown to the compiler
+    //~^ ERROR the attribute `ty_meth` is currently unknown to the compiler
 }
 
 fn hof_lt<Q>(_: Q)
     where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
-    //~^ ERROR The attribute `lt_hof` is currently unknown to the compiler
+    //~^ ERROR the attribute `lt_hof` is currently unknown to the compiler
 {
 }
 
diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr
index f159308dcb8..15e0c41b906 100644
--- a/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr
@@ -1,4 +1,4 @@
-error[E0658]: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:6:13
    |
 LL | struct StLt<#[lt_struct] 'a>(&'a u32);
@@ -7,7 +7,7 @@ LL | struct StLt<#[lt_struct] 'a>(&'a u32);
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:8:13
    |
 LL | struct StTy<#[ty_struct] I>(I);
@@ -16,7 +16,7 @@ LL | struct StTy<#[ty_struct] I>(I);
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:11:11
    |
 LL | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B }
@@ -25,7 +25,7 @@ LL | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:13:11
    |
 LL | enum EnTy<#[ty_enum] J> { A(J), B }
@@ -34,7 +34,7 @@ LL | enum EnTy<#[ty_enum] J> { A(J), B }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:16:12
    |
 LL | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
@@ -43,7 +43,7 @@ LL | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:18:12
    |
 LL | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); }
@@ -52,7 +52,7 @@ LL | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:21:11
    |
 LL | type TyLt<#[lt_type] 'd> = &'d u32;
@@ -61,7 +61,7 @@ LL | type TyLt<#[lt_type] 'd> = &'d u32;
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:23:11
    |
 LL | type TyTy<#[ty_type] L> = (L, );
@@ -70,7 +70,7 @@ LL | type TyTy<#[ty_type] L> = (L, );
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:26:6
    |
 LL | impl<#[lt_inherent] 'e> StLt<'e> { }
@@ -79,7 +79,7 @@ LL | impl<#[lt_inherent] 'e> StLt<'e> { }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:28:6
    |
 LL | impl<#[ty_inherent] M> StTy<M> { }
@@ -88,7 +88,7 @@ LL | impl<#[ty_inherent] M> StTy<M> { }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:31:6
    |
 LL | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
@@ -97,7 +97,7 @@ LL | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:35:6
    |
 LL | impl<#[ty_impl_for] N> TrTy<N> for StTy<N> {
@@ -106,7 +106,7 @@ LL | impl<#[ty_impl_for] N> TrTy<N> for StTy<N> {
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:40:9
    |
 LL | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
@@ -115,7 +115,7 @@ LL | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:42:9
    |
 LL | fn f_ty<#[ty_fn] O>(_: O) { }
@@ -124,7 +124,7 @@ LL | fn f_ty<#[ty_fn] O>(_: O) { }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:46:13
    |
 LL |     fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
@@ -133,7 +133,7 @@ LL |     fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:48:13
    |
 LL |     fn m_ty<#[ty_meth] P>(_: P) { }
@@ -142,7 +142,7 @@ LL |     fn m_ty<#[ty_meth] P>(_: P) { }
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/feature-gate-custom_attribute2.rs:53:19
    |
 LL |     where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
diff --git a/src/test/ui/feature-gates/feature-gate-may-dangle.rs b/src/test/ui/feature-gates/feature-gate-may-dangle.rs
index 20896e426f6..23db92c15df 100644
--- a/src/test/ui/feature-gates/feature-gate-may-dangle.rs
+++ b/src/test/ui/feature-gates/feature-gate-may-dangle.rs
@@ -4,7 +4,7 @@
 
 struct Pt<A>(A);
 unsafe impl<#[may_dangle] A> Drop for Pt<A> {
-    //~^ ERROR may_dangle has unstable semantics and may be removed in the future
+    //~^ ERROR `may_dangle` has unstable semantics and may be removed in the future
     fn drop(&mut self) { }
 }
 
diff --git a/src/test/ui/feature-gates/feature-gate-may-dangle.stderr b/src/test/ui/feature-gates/feature-gate-may-dangle.stderr
index c47bb75e6bc..b344d737574 100644
--- a/src/test/ui/feature-gates/feature-gate-may-dangle.stderr
+++ b/src/test/ui/feature-gates/feature-gate-may-dangle.stderr
@@ -1,4 +1,4 @@
-error[E0658]: may_dangle has unstable semantics and may be removed in the future
+error[E0658]: `may_dangle` has unstable semantics and may be removed in the future
   --> $DIR/feature-gate-may-dangle.rs:6:13
    |
 LL | unsafe impl<#[may_dangle] A> Drop for Pt<A> {
diff --git a/src/test/ui/issues/issue-21596.stderr b/src/test/ui/issues/issue-21596.stderr
index 07d29f30e98..8e4e09b13a9 100644
--- a/src/test/ui/issues/issue-21596.stderr
+++ b/src/test/ui/issues/issue-21596.stderr
@@ -5,6 +5,7 @@ LL |     println!("{}", z.to_string());
    |                      ^^^^^^^^^
    |
    = note: try using `<*const T>::as_ref()` to get a reference to the type behind the pointer: https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
+   = note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior
    = note: the method `to_string` exists but the following trait bounds were not satisfied:
            `*const u8 : std::string::ToString`
 
diff --git a/src/test/ui/parser/issue-62660.rs b/src/test/ui/parser/issue-62660.rs
new file mode 100644
index 00000000000..33c8a9fa328
--- /dev/null
+++ b/src/test/ui/parser/issue-62660.rs
@@ -0,0 +1,11 @@
+// Regression test for issue #62660: if a receiver's type does not
+// successfully parse, emit the correct error instead of ICE-ing the compiler.
+
+struct Foo;
+
+impl Foo {
+    pub fn foo(_: i32, self: Box<Self) {}
+    //~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `)`
+}
+
+fn main() {}
diff --git a/src/test/ui/parser/issue-62660.stderr b/src/test/ui/parser/issue-62660.stderr
new file mode 100644
index 00000000000..3a8f6797b82
--- /dev/null
+++ b/src/test/ui/parser/issue-62660.stderr
@@ -0,0 +1,8 @@
+error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `)`
+  --> $DIR/issue-62660.rs:7:38
+   |
+LL |     pub fn foo(_: i32, self: Box<Self) {}
+   |                                      ^ expected one of 7 possible tokens here
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/proc-macro/proc-macro-gates2.stderr b/src/test/ui/proc-macro/proc-macro-gates2.stderr
index 88847193884..a7f6f8bfb13 100644
--- a/src/test/ui/proc-macro/proc-macro-gates2.stderr
+++ b/src/test/ui/proc-macro/proc-macro-gates2.stderr
@@ -1,4 +1,4 @@
-error[E0658]: The attribute `empty_attr` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `empty_attr` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/proc-macro-gates2.rs:12:11
    |
 LL | fn _test6<#[empty_attr] T>() {}
@@ -7,7 +7,7 @@ LL | fn _test6<#[empty_attr] T>() {}
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `empty_attr` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `empty_attr` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/proc-macro-gates2.rs:17:9
    |
 LL |         #[empty_attr]
diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs
index 352375729bd..b957c673a41 100644
--- a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs
+++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs
@@ -5,7 +5,7 @@ extern "C" {
         /// Foo
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+        //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -21,7 +21,7 @@ type FnType = fn(
     /// Foo
     //~^ ERROR documentation comments cannot be applied to function
     #[test] a: u32,
-    //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+    //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
     /// Bar
     //~^ ERROR documentation comments cannot be applied to function
     #[must_use]
@@ -36,7 +36,7 @@ pub fn foo(
     /// Foo
     //~^ ERROR documentation comments cannot be applied to function
     #[test] a: u32,
-    //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+    //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
     /// Bar
     //~^ ERROR documentation comments cannot be applied to function
     #[must_use]
@@ -56,7 +56,7 @@ impl SelfStruct {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+        //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -77,7 +77,7 @@ impl RefStruct {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+        //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -96,7 +96,7 @@ trait RefTrait {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+        //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -115,7 +115,7 @@ impl RefTrait for RefStruct {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+        //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -132,7 +132,7 @@ fn main() {
         /// Foo
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: u32,
-        //~^ ERROR The attribute `test` is currently unknown to the compiler and may have
+        //~^ ERROR the attribute `test` is currently unknown to the compiler and may have
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr
index a4db4b6207d..a57572abb35 100644
--- a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr
+++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr
@@ -262,7 +262,7 @@ error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-i
 LL |         #[no_mangle] b: i32
    |         ^^^^^^^^^^^^
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:7:9
    |
 LL |         #[test] a: i32,
@@ -271,7 +271,7 @@ LL |         #[test] a: i32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:23:5
    |
 LL |     #[test] a: u32,
@@ -280,7 +280,7 @@ LL |     #[test] a: u32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:38:5
    |
 LL |     #[test] a: u32,
@@ -289,7 +289,7 @@ LL |     #[test] a: u32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:58:9
    |
 LL |         #[test] a: i32,
@@ -298,7 +298,7 @@ LL |         #[test] a: i32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:79:9
    |
 LL |         #[test] a: i32,
@@ -307,7 +307,7 @@ LL |         #[test] a: i32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:98:9
    |
 LL |         #[test] a: i32,
@@ -316,7 +316,7 @@ LL |         #[test] a: i32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:117:9
    |
 LL |         #[test] a: i32,
@@ -325,7 +325,7 @@ LL |         #[test] a: i32,
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(custom_attribute)]` to the crate attributes to enable
 
-error[E0658]: The attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
+error[E0658]: the attribute `test` is currently unknown to the compiler and may have meaning added to it in the future
   --> $DIR/param-attrs-builtin-attrs.rs:134:9
    |
 LL |         #[test] a: u32,
diff --git a/src/test/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs b/src/test/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs
new file mode 100644
index 00000000000..b5943207835
--- /dev/null
+++ b/src/test/ui/uninhabited/exhaustive-wo-nevertype-issue-51221.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+#![feature(exhaustive_patterns)]
+
+enum Void {}
+fn main() {
+    let a: Option<Void> = None;
+    let None = a;
+}