about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/rustdoc-json/doc_hidden_failure.rs3
-rw-r--r--tests/rustdoc-json/enums/field_hidden.rs6
-rw-r--r--tests/rustdoc-json/enums/kind.rs6
-rw-r--r--tests/rustdoc-json/enums/tuple_fields_hidden.rs6
-rw-r--r--tests/rustdoc-json/enums/use_glob.rs3
-rw-r--r--tests/rustdoc-json/enums/use_variant.rs3
-rw-r--r--tests/rustdoc-json/fn_pointer/generics.rs3
-rw-r--r--tests/rustdoc-json/fns/extern_c_variadic.rs3
-rw-r--r--tests/rustdoc-json/fns/generic_args.rs3
-rw-r--r--tests/rustdoc-json/fns/generic_returns.rs3
-rw-r--r--tests/rustdoc-json/fns/generics.rs3
-rw-r--r--tests/rustdoc-json/generic-associated-types/gats.rs9
-rw-r--r--tests/rustdoc-json/glob_import.rs3
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility.rs7
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs6
-rw-r--r--tests/rustdoc-json/impls/impl_item_visibility_show_private.rs6
-rw-r--r--tests/rustdoc-json/impls/import_from_private.rs14
-rw-r--r--tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs8
-rw-r--r--tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs3
-rw-r--r--tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs12
-rw-r--r--tests/rustdoc-json/impls/local_for_local.rs5
-rw-r--r--tests/rustdoc-json/impls/local_for_local_primitive.rs2
-rw-r--r--tests/rustdoc-json/lifetime/longest.rs9
-rw-r--r--tests/rustdoc-json/lifetime/outlives.rs3
-rw-r--r--tests/rustdoc-json/methods/abi.rs2
-rw-r--r--tests/rustdoc-json/non_lifetime_binders.rs11
-rw-r--r--tests/rustdoc-json/primitives/primitive_overloading.rs6
-rw-r--r--tests/rustdoc-json/reexport/export_extern_crate_as_self.rs3
-rw-r--r--tests/rustdoc-json/reexport/glob_collision.rs3
-rw-r--r--tests/rustdoc-json/reexport/glob_extern.rs3
-rw-r--r--tests/rustdoc-json/reexport/glob_private.rs3
-rw-r--r--tests/rustdoc-json/reexport/in_root_and_mod.rs3
-rw-r--r--tests/rustdoc-json/reexport/in_root_and_mod_pub.rs3
-rw-r--r--tests/rustdoc-json/reexport/macro.rs3
-rw-r--r--tests/rustdoc-json/reexport/mod_not_included.rs3
-rw-r--r--tests/rustdoc-json/reexport/private_twice_one_inline.rs4
-rw-r--r--tests/rustdoc-json/reexport/private_two_names.rs3
-rw-r--r--tests/rustdoc-json/reexport/pub_use_doc_hidden.rs3
-rw-r--r--tests/rustdoc-json/reexport/reexport_of_hidden.rs10
-rw-r--r--tests/rustdoc-json/reexport/rename_private.rs3
-rw-r--r--tests/rustdoc-json/reexport/rename_public.rs3
-rw-r--r--tests/rustdoc-json/reexport/same_name_different_types.rs3
-rw-r--r--tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs2
-rw-r--r--tests/rustdoc-json/reexport/simple_private.rs2
-rw-r--r--tests/rustdoc-json/reexport/simple_public.rs3
-rw-r--r--tests/rustdoc-json/return_private.rs3
-rw-r--r--tests/rustdoc-json/stripped_modules.rs3
-rw-r--r--tests/rustdoc-json/traits/implementors.rs29
-rw-r--r--tests/rustdoc-json/traits/private_supertrait.rs4
-rw-r--r--tests/rustdoc-json/traits/supertrait.rs4
-rw-r--r--tests/rustdoc-json/type/inherent_associated_type.rs2
-rw-r--r--tests/rustdoc-ui/issues/issue-107918.rs2
-rw-r--r--tests/ui/async-await/no-async-const.rs1
-rw-r--r--tests/ui/async-await/no-async-const.stderr11
-rw-r--r--tests/ui/async-await/no-unsafe-async.rs2
-rw-r--r--tests/ui/async-await/no-unsafe-async.stderr5
-rw-r--r--tests/ui/auto-traits/has-arguments.rs10
-rw-r--r--tests/ui/auto-traits/has-arguments.stderr11
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs3
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.stderr12
-rw-r--r--tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs32
-rw-r--r--tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr34
-rw-r--r--tests/ui/consts/const_in_pattern/issue-44333.rs4
-rw-r--r--tests/ui/consts/const_in_pattern/issue-44333.stderr4
-rw-r--r--tests/ui/consts/issue-34784.rs21
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr40
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr40
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs20
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs5
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr11
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs22
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr28
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs5
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr11
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs2
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs2
-rw-r--r--tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs2
-rw-r--r--tests/ui/pattern/usefulness/consts-opaque.rs24
-rw-r--r--tests/ui/pattern/usefulness/consts-opaque.stderr84
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs30
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.stderr93
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs9
-rw-r--r--tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr15
83 files changed, 583 insertions, 265 deletions
diff --git a/tests/rustdoc-json/doc_hidden_failure.rs b/tests/rustdoc-json/doc_hidden_failure.rs
index 0d2c6b2209b..e2ce66c99e4 100644
--- a/tests/rustdoc-json/doc_hidden_failure.rs
+++ b/tests/rustdoc-json/doc_hidden_failure.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/98007>.
 
-#![feature(no_core)]
-#![no_core]
-
 mod auto {
     mod action_row {
         pub struct ActionRowBuilder;
diff --git a/tests/rustdoc-json/enums/field_hidden.rs b/tests/rustdoc-json/enums/field_hidden.rs
index f2409858057..74d96248d5c 100644
--- a/tests/rustdoc-json/enums/field_hidden.rs
+++ b/tests/rustdoc-json/enums/field_hidden.rs
@@ -1,11 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/100529>.
 
-#![no_core]
-#![feature(no_core, lang_items)]
-
-#[lang = "sized"]
-trait Sized {}
-
 // @has "$.index[*][?(@.name=='ParseError')]"
 // @has "$.index[*][?(@.name=='UnexpectedEndTag')]"
 // @is "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant.kind.tuple" [null]
diff --git a/tests/rustdoc-json/enums/kind.rs b/tests/rustdoc-json/enums/kind.rs
index 777161c4e4b..68483683464 100644
--- a/tests/rustdoc-json/enums/kind.rs
+++ b/tests/rustdoc-json/enums/kind.rs
@@ -1,11 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core, lang_items)]
-#![no_core]
-
-#[lang = "sized"]
-trait Sized {}
-
 pub enum Foo {
     // @set Unit = "$.index[*][?(@.name=='Unit')].id"
     // @is "$.index[*][?(@.name=='Unit')].inner.variant.kind" '"plain"'
diff --git a/tests/rustdoc-json/enums/tuple_fields_hidden.rs b/tests/rustdoc-json/enums/tuple_fields_hidden.rs
index 34a4f4aec53..53cdf83ffa6 100644
--- a/tests/rustdoc-json/enums/tuple_fields_hidden.rs
+++ b/tests/rustdoc-json/enums/tuple_fields_hidden.rs
@@ -1,9 +1,3 @@
-#![feature(no_core, lang_items)]
-#![no_core]
-
-#[lang = "sized"]
-trait Sized {}
-
 // @set 1.1.0 = "$.index[*][?(@.docs=='1.1.0')].id"
 // @set 2.1.0 = "$.index[*][?(@.docs=='2.1.0')].id"
 // @set 2.1.1 = "$.index[*][?(@.docs=='2.1.1')].id"
diff --git a/tests/rustdoc-json/enums/use_glob.rs b/tests/rustdoc-json/enums/use_glob.rs
index 49990ec5331..bec89530b05 100644
--- a/tests/rustdoc-json/enums/use_glob.rs
+++ b/tests/rustdoc-json/enums/use_glob.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/104942>
 
-#![feature(no_core)]
-#![no_core]
-
 // @set Color = "$.index[*][?(@.name == 'Color')].id"
 pub enum Color {
     Red,
diff --git a/tests/rustdoc-json/enums/use_variant.rs b/tests/rustdoc-json/enums/use_variant.rs
index 8190e1cbe81..c7e0c21f1ef 100644
--- a/tests/rustdoc-json/enums/use_variant.rs
+++ b/tests/rustdoc-json/enums/use_variant.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 // @set AlwaysNone = "$.index[*][?(@.name == 'AlwaysNone')].id"
 pub enum AlwaysNone {
     // @set None = "$.index[*][?(@.name == 'None')].id"
diff --git a/tests/rustdoc-json/fn_pointer/generics.rs b/tests/rustdoc-json/fn_pointer/generics.rs
index 3b82561ec7d..8b3a8c0a74e 100644
--- a/tests/rustdoc-json/fn_pointer/generics.rs
+++ b/tests/rustdoc-json/fn_pointer/generics.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @count "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[*]" 1
 // @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][0]" '"val"'
 // @is "$.index[*][?(@.name=='WithHigherRankTraitBounds')].inner.type_alias.type.function_pointer.decl.inputs[0][1].borrowed_ref.lifetime" \"\'c\"
diff --git a/tests/rustdoc-json/fns/extern_c_variadic.rs b/tests/rustdoc-json/fns/extern_c_variadic.rs
index d6ea343b991..eef9ae99eb0 100644
--- a/tests/rustdoc-json/fns/extern_c_variadic.rs
+++ b/tests/rustdoc-json/fns/extern_c_variadic.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 extern "C" {
     // @is "$.index[*][?(@.name == 'not_variadic')].inner.function.decl.c_variadic" false
     pub fn not_variadic(_: i32);
diff --git a/tests/rustdoc-json/fns/generic_args.rs b/tests/rustdoc-json/fns/generic_args.rs
index 539d17f831e..2f6cf3bf65a 100644
--- a/tests/rustdoc-json/fns/generic_args.rs
+++ b/tests/rustdoc-json/fns/generic_args.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @set foo = "$.index[*][?(@.name=='Foo')].id"
 pub trait Foo {}
 
diff --git a/tests/rustdoc-json/fns/generic_returns.rs b/tests/rustdoc-json/fns/generic_returns.rs
index 27d842066f4..8e82efef4be 100644
--- a/tests/rustdoc-json/fns/generic_returns.rs
+++ b/tests/rustdoc-json/fns/generic_returns.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @count "$.index[*][?(@.name=='generic_returns')].inner.module.items[*]" 2
 
 // @set foo = "$.index[*][?(@.name=='Foo')].id"
diff --git a/tests/rustdoc-json/fns/generics.rs b/tests/rustdoc-json/fns/generics.rs
index 5239a6f21f5..44dc6d854aa 100644
--- a/tests/rustdoc-json/fns/generics.rs
+++ b/tests/rustdoc-json/fns/generics.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @set wham_id = "$.index[*][?(@.name=='Wham')].id"
 pub trait Wham {}
 
diff --git a/tests/rustdoc-json/generic-associated-types/gats.rs b/tests/rustdoc-json/generic-associated-types/gats.rs
index 9cfe649243f..56d6e7a49db 100644
--- a/tests/rustdoc-json/generic-associated-types/gats.rs
+++ b/tests/rustdoc-json/generic-associated-types/gats.rs
@@ -1,14 +1,5 @@
 // ignore-tidy-linelength
 
-#![no_core]
-#![feature(lang_items, no_core, arbitrary_self_types)]
-
-#[lang = "sized"]
-pub trait Sized {}
-
-#[lang = "receiver"]
-pub trait Receiver {}
-
 pub trait Display {}
 
 pub trait LendingIterator {
diff --git a/tests/rustdoc-json/glob_import.rs b/tests/rustdoc-json/glob_import.rs
index f37ce0abb41..7de1ed78f2f 100644
--- a/tests/rustdoc-json/glob_import.rs
+++ b/tests/rustdoc-json/glob_import.rs
@@ -1,13 +1,10 @@
 // This is a regression test for <https://github.com/rust-lang/rust/issues/98003>.
 
-#![feature(no_core)]
 #![no_std]
-#![no_core]
 
 // @has "$.index[*][?(@.name=='glob')]"
 // @has "$.index[*][?(@.inner.import)].inner.import.name" \"*\"
 
-
 mod m1 {
     pub fn f() {}
 }
diff --git a/tests/rustdoc-json/impls/impl_item_visibility.rs b/tests/rustdoc-json/impls/impl_item_visibility.rs
index efa54d91dca..d3c15cd23e4 100644
--- a/tests/rustdoc-json/impls/impl_item_visibility.rs
+++ b/tests/rustdoc-json/impls/impl_item_visibility.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 pub struct Foo;
 
 /// impl Foo priv
@@ -9,18 +6,16 @@ impl Foo {
 }
 // @!has '$.index[*][?(@.docs=="impl Foo priv")]'
 
-
 /// impl Foo pub
 impl Foo {
     pub fn qux() {}
 }
 // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
 
-
 /// impl Foo hidden
 impl Foo {
     #[doc(hidden)]
-    pub fn __quazl(){}
+    pub fn __quazl() {}
 }
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
index 3c6fefc4ca2..fa3a36df856 100644
--- a/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
+++ b/tests/rustdoc-json/impls/impl_item_visibility_show_hidden.rs
@@ -1,6 +1,4 @@
 // compile-flags: --document-hidden-items
-#![feature(no_core)]
-#![no_core]
 
 pub struct Foo;
 
@@ -11,18 +9,16 @@ impl Foo {
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
 
-
 /// impl Foo pub
 impl Foo {
     pub fn qux() {}
 }
 // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
 
-
 /// impl Foo hidden
 impl Foo {
     #[doc(hidden)]
-    pub fn __quazl(){}
+    pub fn __quazl() {}
 }
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
index b98d1e4167c..7c68a2412f3 100644
--- a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
+++ b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs
@@ -1,6 +1,4 @@
 // compile-flags: --document-private-items
-#![feature(no_core)]
-#![no_core]
 
 pub struct Foo;
 
@@ -10,18 +8,16 @@ impl Foo {
 }
 // @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"'
 
-
 /// impl Foo pub
 impl Foo {
     pub fn qux() {}
 }
 // @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"'
 
-
 /// impl Foo hidden
 impl Foo {
     #[doc(hidden)]
-    pub fn __quazl(){}
+    pub fn __quazl() {}
 }
 // FIXME(#111564): Is this the right behaviour?
 // @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"'
diff --git a/tests/rustdoc-json/impls/import_from_private.rs b/tests/rustdoc-json/impls/import_from_private.rs
index d2b0665dcaf..3da03df2546 100644
--- a/tests/rustdoc-json/impls/import_from_private.rs
+++ b/tests/rustdoc-json/impls/import_from_private.rs
@@ -1,14 +1,12 @@
 // https://github.com/rust-lang/rust/issues/100252
 
-#![feature(no_core)]
-#![no_core]
-
 mod bar {
-    // @set baz = "$.index[*][?(@.inner.struct)].id"
+    // @set baz = "$.index[*][?(@.name == 'Baz')].id"
     pub struct Baz;
-    // @set impl = "$.index[*][?(@.inner.impl)].id"
+    // @set impl = "$.index[*][?(@.docs == 'impl')].id"
+    /// impl
     impl Baz {
-        // @set doit = "$.index[*][?(@.inner.function)].id"
+        // @set doit = "$.index[*][?(@.name == 'doit')].id"
         pub fn doit() {}
     }
 }
@@ -18,5 +16,5 @@ pub use bar::Baz;
 
 // @is "$.index[*].inner.module.items[*]" $import
 // @is "$.index[*].inner.import.id" $baz
-// @is "$.index[*].inner.struct.impls[*]" $impl
-// @is "$.index[*].inner.impl.items[*]" $doit
+// @has "$.index[*][?(@.name == 'Baz')].inner.struct.impls[*]" $impl
+// @is "$.index[*][?(@.docs=='impl')].inner.impl.items[*]" $doit
diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs
index d2ac316d47d..7857626d66e 100644
--- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs
+++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-2.rs
@@ -1,7 +1,5 @@
-#![feature(no_core)]
-#![no_core]
-
-// @count "$.index[*][?(@.inner.impl)]" 1
+// @has "$.index[*][?(@.docs=='Here')]"
+// @!has "$.index[*][?(@.docs=='Not Here')]"
 // @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
 // @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
 // @has "$.index[*][?(@.name=='PubTrait')]"
@@ -11,5 +9,7 @@ pub trait PubTrait {}
 pub struct HiddenPubStruct;
 pub struct NotHiddenPubStruct;
 
+/// Not Here
 impl PubTrait for HiddenPubStruct {}
+/// Here
 impl PubTrait for NotHiddenPubStruct {}
diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs
index fcd27ca4b7c..836f1fe87da 100644
--- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs
+++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id-3.rs
@@ -1,8 +1,5 @@
 // compile-flags: --document-hidden-items
 
-#![feature(no_core)]
-#![no_core]
-
 // @has "$.index[*][?(@.name == 'HiddenPubStruct')]"
 // @has "$.index[*][?(@.inner.impl)]"
 // @has "$.index[*][?(@.name=='PubTrait')]"
diff --git a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs
index 141c54a57dd..97db9c93a0f 100644
--- a/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs
+++ b/tests/rustdoc-json/impls/issue-112852-dangling-trait-impl-id.rs
@@ -1,21 +1,21 @@
-#![feature(no_core)]
-#![no_core]
-
-// @count "$.index[*][?(@.inner.impl)]" 1
-// @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
-// @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
 // @has "$.index[*][?(@.name=='PubTrait')]"
 pub trait PubTrait {}
 
 #[doc(hidden)]
 pub mod hidden {
+    // @!has "$.index[*][?(@.name == 'HiddenPubStruct')]"
     pub struct HiddenPubStruct;
 
+    // @!has "$.index[*][?(@.docs == 'Not Here')]"
+    /// Not Here
     impl crate::PubTrait for HiddenPubStruct {}
 }
 
 pub mod not_hidden {
+    // @has "$.index[*][?(@.name == 'NotHiddenPubStruct')]"
     pub struct NotHiddenPubStruct;
 
+    // @has "$.index[*][?(@.docs == 'Here')]"
+    /// Here
     impl crate::PubTrait for NotHiddenPubStruct {}
 }
diff --git a/tests/rustdoc-json/impls/local_for_local.rs b/tests/rustdoc-json/impls/local_for_local.rs
index 37a72000329..015e89c2281 100644
--- a/tests/rustdoc-json/impls/local_for_local.rs
+++ b/tests/rustdoc-json/impls/local_for_local.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 // @set struct = "$.index[*][?(@.name=='Struct')].id"
 pub struct Struct;
 // @set trait = "$.index[*][?(@.name=='Trait')].id"
@@ -9,7 +6,7 @@ pub trait Trait {}
 /// impl
 impl Trait for Struct {}
 
-// @is "$.index[*][?(@.name=='Struct')].inner.struct.impls[*]" $impl
+// @has "$.index[*][?(@.name=='Struct')].inner.struct.impls[*]" $impl
 // @is "$.index[*][?(@.name=='Trait')].inner.trait.implementations[*]" $impl
 // @is "$.index[*][?(@.docs=='impl')].inner.impl.trait.id" $trait
 // @is "$.index[*][?(@.docs=='impl')].inner.impl.for.resolved_path.id" $struct
diff --git a/tests/rustdoc-json/impls/local_for_local_primitive.rs b/tests/rustdoc-json/impls/local_for_local_primitive.rs
index 769dd3f0a2c..acc3a879fe1 100644
--- a/tests/rustdoc-json/impls/local_for_local_primitive.rs
+++ b/tests/rustdoc-json/impls/local_for_local_primitive.rs
@@ -1,6 +1,4 @@
-#![feature(no_core)]
 #![feature(rustc_attrs)]
-#![no_core]
 
 // @set Local = "$.index[*][?(@.name=='Local')].id"
 pub trait Local {}
diff --git a/tests/rustdoc-json/lifetime/longest.rs b/tests/rustdoc-json/lifetime/longest.rs
index dc28258a8b6..419b0b4fcab 100644
--- a/tests/rustdoc-json/lifetime/longest.rs
+++ b/tests/rustdoc-json/lifetime/longest.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].name"  \"\'a\"
 // @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind"  '{"lifetime": {"outlives": []}}'
 // @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind"  '{"lifetime": {"outlives": []}}'
@@ -26,5 +23,9 @@
 // @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\"
 
 pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str {
-    if l.len() > r.len() { l } else { r }
+    if l.len() > r.len() {
+        l
+    } else {
+        r
+    }
 }
diff --git a/tests/rustdoc-json/lifetime/outlives.rs b/tests/rustdoc-json/lifetime/outlives.rs
index 6e105b382b0..549e4c200dc 100644
--- a/tests/rustdoc-json/lifetime/outlives.rs
+++ b/tests/rustdoc-json/lifetime/outlives.rs
@@ -1,8 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 // @count "$.index[*][?(@.name=='foo')].inner.function.generics.params[*]" 3
 // @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates" []
 // @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].name" \"\'a\"
diff --git a/tests/rustdoc-json/methods/abi.rs b/tests/rustdoc-json/methods/abi.rs
index b8279298c1e..917e9e0790c 100644
--- a/tests/rustdoc-json/methods/abi.rs
+++ b/tests/rustdoc-json/methods/abi.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 
 #![feature(abi_vectorcall)]
-#![feature(no_core)]
-#![no_core]
 
 // @has "$.index[*][?(@.name=='Foo')]"
 pub struct Foo;
diff --git a/tests/rustdoc-json/non_lifetime_binders.rs b/tests/rustdoc-json/non_lifetime_binders.rs
index cabee0b1caa..d925fcd5221 100644
--- a/tests/rustdoc-json/non_lifetime_binders.rs
+++ b/tests/rustdoc-json/non_lifetime_binders.rs
@@ -3,18 +3,9 @@
 #![feature(non_lifetime_binders)]
 #![allow(incomplete_features)]
 
-#![no_core]
-#![feature(lang_items, no_core)]
-
-#[lang = "sized"]
-pub trait Sized {}
-
 pub trait Trait {}
 
-#[lang = "phantom_data"]
-struct PhantomData<T_>;
-
-pub struct Wrapper<T_>(PhantomData<T_>);
+pub struct Wrapper<T_>(std::marker::PhantomData<T_>);
 
 // @count "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[*]" 2
 // @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].name" \"\'a\"
diff --git a/tests/rustdoc-json/primitives/primitive_overloading.rs b/tests/rustdoc-json/primitives/primitive_overloading.rs
index 81e0acdc6e9..50e23fc06d3 100644
--- a/tests/rustdoc-json/primitives/primitive_overloading.rs
+++ b/tests/rustdoc-json/primitives/primitive_overloading.rs
@@ -3,14 +3,10 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/98006>.
 
 #![feature(rustc_attrs)]
-#![feature(no_core)]
-
-#![no_core]
 
 // @has "$.index[*][?(@.name=='usize')]"
 // @has "$.index[*][?(@.name=='prim')]"
 
 #[rustc_doc_primitive = "usize"]
 /// This is the built-in type `usize`.
-mod prim {
-}
+mod prim {}
diff --git a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs
index 37ca279b352..a8f5500d629 100644
--- a/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs
+++ b/tests/rustdoc-json/reexport/export_extern_crate_as_self.rs
@@ -1,8 +1,5 @@
 //! Regression test for <https://github.com/rust-lang/rust/issues/100531>
 
-#![feature(no_core)]
-#![no_core]
-
 #![crate_name = "export_extern_crate_as_self"]
 
 // ignore-tidy-linelength
diff --git a/tests/rustdoc-json/reexport/glob_collision.rs b/tests/rustdoc-json/reexport/glob_collision.rs
index dee35ba78dc..9a75f4c0cf3 100644
--- a/tests/rustdoc-json/reexport/glob_collision.rs
+++ b/tests/rustdoc-json/reexport/glob_collision.rs
@@ -1,8 +1,5 @@
 // Regression test for https://github.com/rust-lang/rust/issues/100973
 
-#![feature(no_core)]
-#![no_core]
-
 // @set m1 = "$.index[*][?(@.name == 'm1' && @.inner.module)].id"
 // @is "$.index[*][?(@.name == 'm1')].inner.module.items" []
 // @is "$.index[*][?(@.name == 'm1')].inner.module.is_stripped" true
diff --git a/tests/rustdoc-json/reexport/glob_extern.rs b/tests/rustdoc-json/reexport/glob_extern.rs
index 78edfaf0aa8..ed0c4a420d4 100644
--- a/tests/rustdoc-json/reexport/glob_extern.rs
+++ b/tests/rustdoc-json/reexport/glob_extern.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
 mod mod1 {
     extern "C" {
diff --git a/tests/rustdoc-json/reexport/glob_private.rs b/tests/rustdoc-json/reexport/glob_private.rs
index ae4e87d23bc..11ea5aa3522 100644
--- a/tests/rustdoc-json/reexport/glob_private.rs
+++ b/tests/rustdoc-json/reexport/glob_private.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @is "$.index[*][?(@.name=='mod1')].inner.module.is_stripped" "true"
 mod mod1 {
     // @is "$.index[*][?(@.name=='mod2')].inner.module.is_stripped" "true"
diff --git a/tests/rustdoc-json/reexport/in_root_and_mod.rs b/tests/rustdoc-json/reexport/in_root_and_mod.rs
index f81445bd48d..a4133e2f0c7 100644
--- a/tests/rustdoc-json/reexport/in_root_and_mod.rs
+++ b/tests/rustdoc-json/reexport/in_root_and_mod.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 // @!has "$.index[*][?(@.name=='foo')]"
 mod foo {
     // @has "$.index[*][?(@.name=='Foo')]"
diff --git a/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs b/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs
index c5c41b25f7e..37f7b26fc85 100644
--- a/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs
+++ b/tests/rustdoc-json/reexport/in_root_and_mod_pub.rs
@@ -1,6 +1,3 @@
-#![feature(no_core)]
-#![no_core]
-
 pub mod foo {
     // @set bar_id = "$.index[*][?(@.name=='Bar')].id"
     // @ismany "$.index[*][?(@.name=='foo')].inner.module.items[*]" $bar_id
diff --git a/tests/rustdoc-json/reexport/macro.rs b/tests/rustdoc-json/reexport/macro.rs
index ac0632b98a9..be09cb47629 100644
--- a/tests/rustdoc-json/reexport/macro.rs
+++ b/tests/rustdoc-json/reexport/macro.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @set repro_id = "$.index[*][?(@.name=='repro')].id"
 #[macro_export]
 macro_rules! repro {
diff --git a/tests/rustdoc-json/reexport/mod_not_included.rs b/tests/rustdoc-json/reexport/mod_not_included.rs
index 1c49f213d1a..bc072be81a3 100644
--- a/tests/rustdoc-json/reexport/mod_not_included.rs
+++ b/tests/rustdoc-json/reexport/mod_not_included.rs
@@ -1,8 +1,5 @@
 // Regression test for https://github.com/rust-lang/rust/issues/101103
 
-#![feature(no_core)]
-#![no_core]
-
 mod m1 {
     pub fn x() {}
 }
diff --git a/tests/rustdoc-json/reexport/private_twice_one_inline.rs b/tests/rustdoc-json/reexport/private_twice_one_inline.rs
index 8c8152bd16c..d7b76623557 100644
--- a/tests/rustdoc-json/reexport/private_twice_one_inline.rs
+++ b/tests/rustdoc-json/reexport/private_twice_one_inline.rs
@@ -4,12 +4,8 @@
 // Test for the ICE in https://github.com/rust-lang/rust/issues/83057
 // An external type re-exported with different attributes shouldn't cause an error
 
-#![no_core]
-#![feature(no_core)]
-
 extern crate pub_struct as foo;
 #[doc(inline)]
-
 // @set crate_use_id = "$.index[*][?(@.docs=='Hack A')].id"
 // @set foo_id = "$.index[*][?(@.docs=='Hack A')].inner.import.id"
 /// Hack A
diff --git a/tests/rustdoc-json/reexport/private_two_names.rs b/tests/rustdoc-json/reexport/private_two_names.rs
index cdcbf2a2bc8..e6f037eb4b3 100644
--- a/tests/rustdoc-json/reexport/private_two_names.rs
+++ b/tests/rustdoc-json/reexport/private_two_names.rs
@@ -3,9 +3,6 @@
 // Test for the ICE in https://github.com/rust-lang/rust/issues/83720
 // A pub-in-private type re-exported under two different names shouldn't cause an error
 
-#![no_core]
-#![feature(no_core)]
-
 // @!has "$.index[*][?(@.name=='style')]"
 mod style {
     // @set color_struct_id = "$.index[*][?(@.inner.struct && @.name=='Color')].id"
diff --git a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
index a2a25d08448..46c3da4c15b 100644
--- a/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
+++ b/tests/rustdoc-json/reexport/pub_use_doc_hidden.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/106379>
 
-#![feature(no_core)]
-#![no_core]
-
 mod repeat_n {
     #[doc(hidden)]
     pub struct RepeatN {}
diff --git a/tests/rustdoc-json/reexport/reexport_of_hidden.rs b/tests/rustdoc-json/reexport/reexport_of_hidden.rs
new file mode 100644
index 00000000000..1b6ff5fadca
--- /dev/null
+++ b/tests/rustdoc-json/reexport/reexport_of_hidden.rs
@@ -0,0 +1,10 @@
+// compile-flags: --document-hidden-items
+
+// @has "$.index[*].inner[?(@.import.name=='UsedHidden')]"
+// @has "$.index[*][?(@.name=='Hidden')]"
+pub mod submodule {
+    #[doc(hidden)]
+    pub struct Hidden {}
+}
+
+pub use submodule::Hidden as UsedHidden;
diff --git a/tests/rustdoc-json/reexport/rename_private.rs b/tests/rustdoc-json/reexport/rename_private.rs
index 9114460231d..3924282a49e 100644
--- a/tests/rustdoc-json/reexport/rename_private.rs
+++ b/tests/rustdoc-json/reexport/rename_private.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @!has "$.index[*][?(@.name=='inner')]"
 mod inner {
     // @has "$.index[*][?(@.name=='Public')]"
diff --git a/tests/rustdoc-json/reexport/rename_public.rs b/tests/rustdoc-json/reexport/rename_public.rs
index d0fd314bd8c..63693787448 100644
--- a/tests/rustdoc-json/reexport/rename_public.rs
+++ b/tests/rustdoc-json/reexport/rename_public.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @set inner_id = "$.index[*][?(@.name=='inner')].id"
 pub mod inner {
     // @set public_id = "$.index[*][?(@.name=='Public')].id"
diff --git a/tests/rustdoc-json/reexport/same_name_different_types.rs b/tests/rustdoc-json/reexport/same_name_different_types.rs
index 6a765b73301..42ba6c40019 100644
--- a/tests/rustdoc-json/reexport/same_name_different_types.rs
+++ b/tests/rustdoc-json/reexport/same_name_different_types.rs
@@ -1,8 +1,5 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/107677>.
 
-#![feature(no_core)]
-#![no_core]
-
 pub mod nested {
     // @set foo_struct = "$.index[*][?(@.docs == 'Foo the struct')].id"
 
diff --git a/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs b/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs
index a00547dc348..1e1710e1c08 100644
--- a/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs
+++ b/tests/rustdoc-json/reexport/same_type_reexported_more_than_once.rs
@@ -2,9 +2,7 @@
 
 // Regression test for <https://github.com/rust-lang/rust/issues/97432>.
 
-#![feature(no_core)]
 #![no_std]
-#![no_core]
 
 mod inner {
     // @set trait_id = "$.index[*][?(@.name=='Trait')].id"
diff --git a/tests/rustdoc-json/reexport/simple_private.rs b/tests/rustdoc-json/reexport/simple_private.rs
index 462efee51bf..2ca8c7fa6be 100644
--- a/tests/rustdoc-json/reexport/simple_private.rs
+++ b/tests/rustdoc-json/reexport/simple_private.rs
@@ -1,6 +1,4 @@
 // edition:2018
-#![no_core]
-#![feature(no_core)]
 
 // @!has "$.index[*][?(@.name=='inner')]"
 mod inner {
diff --git a/tests/rustdoc-json/reexport/simple_public.rs b/tests/rustdoc-json/reexport/simple_public.rs
index 1373f96f87f..04611eeb95c 100644
--- a/tests/rustdoc-json/reexport/simple_public.rs
+++ b/tests/rustdoc-json/reexport/simple_public.rs
@@ -1,8 +1,5 @@
 // edition:2018
 
-#![no_core]
-#![feature(no_core)]
-
 // @set inner_id = "$.index[*][?(@.name=='inner')].id"
 pub mod inner {
 
diff --git a/tests/rustdoc-json/return_private.rs b/tests/rustdoc-json/return_private.rs
index 0ce81b5e59f..a9301b3fe4f 100644
--- a/tests/rustdoc-json/return_private.rs
+++ b/tests/rustdoc-json/return_private.rs
@@ -1,9 +1,6 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/96161>.
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
 mod secret {
     pub struct Secret;
 }
diff --git a/tests/rustdoc-json/stripped_modules.rs b/tests/rustdoc-json/stripped_modules.rs
index d2664b49e9c..d5ab1173d92 100644
--- a/tests/rustdoc-json/stripped_modules.rs
+++ b/tests/rustdoc-json/stripped_modules.rs
@@ -1,6 +1,3 @@
-#![no_core]
-#![feature(no_core)]
-
 // @!has "$.index[*][?(@.name=='no_pub_inner')]"
 mod no_pub_inner {
     fn priv_inner() {}
diff --git a/tests/rustdoc-json/traits/implementors.rs b/tests/rustdoc-json/traits/implementors.rs
index 7d351ad61be..c27553c7544 100644
--- a/tests/rustdoc-json/traits/implementors.rs
+++ b/tests/rustdoc-json/traits/implementors.rs
@@ -1,19 +1,18 @@
-#![feature(no_core)]
-#![no_core]
-
-// @set wham = "$.index[*][?(@.name=='Wham')].id"
-// @count "$.index[*][?(@.name=='Wham')].inner.trait.implementations[*]" 1
-// @set gmWham = "$.index[*][?(@.name=='Wham')].inner.trait.implementations[0]"
 pub trait Wham {}
-
-// @count "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[*]" 1
-// @is "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[0]" $gmWham
-// @set gm = "$.index[*][?(@.name=='Wham')].id"
-
-// jsonpath_lib isnt expressive enough (for now) to get the "impl" item, so we
-// just check it isn't pointing to the type, but when you port to jsondocck-ng
-// check what the impl item is
-// @!is "$.index[*][?(@.name=='Wham')].inner.trait.implementations[0]" $gm
 pub struct GeorgeMichael {}
 
+/// Wham for George Michael
 impl Wham for GeorgeMichael {}
+
+// Find IDs.
+// @set wham = "$.index[*][?(@.name=='Wham')].id"
+// @set gmWham = "$.index[*][?(@.docs=='Wham for George Michael')].id"
+// @set gm = "$.index[*][?(@.name=='GeorgeMichael')].id"
+
+// Both struct and trait point to impl.
+// @has "$.index[*][?(@.name=='GeorgeMichael')].inner.struct.impls[*]" $gmWham
+// @is "$.index[*][?(@.name=='Wham')].inner.trait.implementations[*]" $gmWham
+
+// Impl points to both struct and trait.
+// @is "$.index[*][?(@.docs == 'Wham for George Michael')].inner.impl.trait.id" $wham
+// @is "$.index[*][?(@.docs == 'Wham for George Michael')].inner.impl.for.resolved_path.id" $gm
diff --git a/tests/rustdoc-json/traits/private_supertrait.rs b/tests/rustdoc-json/traits/private_supertrait.rs
index 49238e5e88b..67b5a858ab7 100644
--- a/tests/rustdoc-json/traits/private_supertrait.rs
+++ b/tests/rustdoc-json/traits/private_supertrait.rs
@@ -1,9 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![no_core]
-
-
 // @!has "$.index[*][?(@.name == 'sealed')]"
 mod sealed {
     // @set sealed_id = "$.index[*][?(@.name=='Sealed')].id"
diff --git a/tests/rustdoc-json/traits/supertrait.rs b/tests/rustdoc-json/traits/supertrait.rs
index 2123ac40427..bbae3557cf9 100644
--- a/tests/rustdoc-json/traits/supertrait.rs
+++ b/tests/rustdoc-json/traits/supertrait.rs
@@ -1,9 +1,5 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
-#![feature(lang_items)]
-#![no_core]
-
 // @set loud_id = "$.index[*][?(@.name=='Loud')].id"
 pub trait Loud {}
 
diff --git a/tests/rustdoc-json/type/inherent_associated_type.rs b/tests/rustdoc-json/type/inherent_associated_type.rs
index 64c6c53ce47..f8603147951 100644
--- a/tests/rustdoc-json/type/inherent_associated_type.rs
+++ b/tests/rustdoc-json/type/inherent_associated_type.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 #![feature(inherent_associated_types)]
-#![feature(no_core)]
 #![allow(incomplete_features)]
-#![no_core]
 
 // @set OwnerMetadata = '$.index[*][?(@.name=="OwnerMetadata")].id'
 pub struct OwnerMetadata;
diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs
index 13788df0fc9..0ddb3dc9215 100644
--- a/tests/rustdoc-ui/issues/issue-107918.rs
+++ b/tests/rustdoc-ui/issues/issue-107918.rs
@@ -1,7 +1,7 @@
 // aux-build:panic-handler.rs
 // compile-flags: --document-private-items
 // build-pass
-// ignore-windows
+// only-linux
 
 #![no_std]
 #![no_main]
diff --git a/tests/ui/async-await/no-async-const.rs b/tests/ui/async-await/no-async-const.rs
index 963460c1182..c9941d1c5a0 100644
--- a/tests/ui/async-await/no-async-const.rs
+++ b/tests/ui/async-await/no-async-const.rs
@@ -3,3 +3,4 @@
 
 pub async const fn x() {}
 //~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `const`
+//~| ERROR functions cannot be both `const` and `async`
diff --git a/tests/ui/async-await/no-async-const.stderr b/tests/ui/async-await/no-async-const.stderr
index a51dc88a4ed..524d778c09b 100644
--- a/tests/ui/async-await/no-async-const.stderr
+++ b/tests/ui/async-await/no-async-const.stderr
@@ -9,5 +9,14 @@ LL | pub async const fn x() {}
    |
    = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
 
-error: aborting due to previous error
+error: functions cannot be both `const` and `async`
+  --> $DIR/no-async-const.rs:4:5
+   |
+LL | pub async const fn x() {}
+   | ----^^^^^-^^^^^----------
+   |     |     |
+   |     |     `const` because of this
+   |     `async` because of this
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/no-unsafe-async.rs b/tests/ui/async-await/no-unsafe-async.rs
index f40154e16f3..7c6811d81ee 100644
--- a/tests/ui/async-await/no-unsafe-async.rs
+++ b/tests/ui/async-await/no-unsafe-async.rs
@@ -9,3 +9,5 @@ impl S {
 
 #[cfg(FALSE)]
 unsafe async fn f() {} //~ ERROR expected one of `extern` or `fn`, found keyword `async`
+
+fn main() {}
diff --git a/tests/ui/async-await/no-unsafe-async.stderr b/tests/ui/async-await/no-unsafe-async.stderr
index f23d17d6bfa..49b112f9313 100644
--- a/tests/ui/async-await/no-unsafe-async.stderr
+++ b/tests/ui/async-await/no-unsafe-async.stderr
@@ -1,16 +1,11 @@
 error: expected one of `extern` or `fn`, found keyword `async`
   --> $DIR/no-unsafe-async.rs:7:12
    |
-LL | impl S {
-   |        - while parsing this item list starting here
-LL |     #[cfg(FALSE)]
 LL |     unsafe async fn g() {}
    |     -------^^^^^
    |     |      |
    |     |      expected one of `extern` or `fn`
    |     help: `async` must come before `unsafe`: `async unsafe`
-LL | }
-   | - the item list ends here
    |
    = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
 
diff --git a/tests/ui/auto-traits/has-arguments.rs b/tests/ui/auto-traits/has-arguments.rs
new file mode 100644
index 00000000000..f579eb6772d
--- /dev/null
+++ b/tests/ui/auto-traits/has-arguments.rs
@@ -0,0 +1,10 @@
+#![feature(auto_traits)]
+
+auto trait Trait1<'outer> {}
+//~^ ERROR auto traits cannot have generic parameters
+
+fn f<'a>(x: impl Trait1<'a>) {}
+
+fn main() {
+    f("");
+}
diff --git a/tests/ui/auto-traits/has-arguments.stderr b/tests/ui/auto-traits/has-arguments.stderr
new file mode 100644
index 00000000000..3bba74badbc
--- /dev/null
+++ b/tests/ui/auto-traits/has-arguments.stderr
@@ -0,0 +1,11 @@
+error[E0567]: auto traits cannot have generic parameters
+  --> $DIR/has-arguments.rs:3:18
+   |
+LL | auto trait Trait1<'outer> {}
+   |            ------^^^^^^^^ help: remove the parameters
+   |            |
+   |            auto trait cannot have generic parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0567`.
diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs
index 914ebbe26a5..106485e04ee 100644
--- a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs
+++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.rs
@@ -26,7 +26,8 @@ pub fn edge_case_str(event: String) {
 pub fn edge_case_raw_ptr(event: *const i32) {
     let _ = || {
         match event {
-            NUMBER_POINTER => (),
+            NUMBER_POINTER => (), //~WARN behave unpredictably
+            //~| previously accepted
             _ => (),
         };
     };
diff --git a/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.stderr b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.stderr
new file mode 100644
index 00000000000..c83ba41976b
--- /dev/null
+++ b/tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.stderr
@@ -0,0 +1,12 @@
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/match-edge-cases_1.rs:29:13
+   |
+LL |             NUMBER_POINTER => (),
+   |             ^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+   = note: `#[warn(pointer_structural_match)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs
new file mode 100644
index 00000000000..2491071d1e1
--- /dev/null
+++ b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.rs
@@ -0,0 +1,32 @@
+#![deny(pointer_structural_match)]
+#![allow(dead_code)]
+
+const C: *const u8 = &0;
+// Make sure we also find pointers nested in other types.
+const C_INNER: (*const u8, u8) = (C, 0);
+
+fn foo(x: *const u8) {
+    match x {
+        C => {} //~ERROR: behave unpredictably
+        //~| previously accepted
+        _ => {}
+    }
+}
+
+fn foo2(x: *const u8) {
+    match (x, 1) {
+        C_INNER => {} //~ERROR: behave unpredictably
+        //~| previously accepted
+        _ => {}
+    }
+}
+
+const D: *const [u8; 4] = b"abcd";
+
+fn main() {
+    match D {
+        D => {} //~ERROR: behave unpredictably
+        //~| previously accepted
+        _ => {}
+    }
+}
diff --git a/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
new file mode 100644
index 00000000000..ab53346b5ee
--- /dev/null
+++ b/tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
@@ -0,0 +1,34 @@
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:10:9
+   |
+LL |         C => {}
+   |         ^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+note: the lint level is defined here
+  --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9
+   |
+LL | #![deny(pointer_structural_match)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:18:9
+   |
+LL |         C_INNER => {}
+   |         ^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:28:9
+   |
+LL |         D => {}
+   |         ^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/consts/const_in_pattern/issue-44333.rs b/tests/ui/consts/const_in_pattern/issue-44333.rs
index 96e8795e52d..aaf1edb6fe6 100644
--- a/tests/ui/consts/const_in_pattern/issue-44333.rs
+++ b/tests/ui/consts/const_in_pattern/issue-44333.rs
@@ -16,9 +16,9 @@ const BAR: Func = bar;
 
 fn main() {
     match test(std::env::consts::ARCH.len()) {
-        FOO => println!("foo"), //~ WARN pointers in patterns behave unpredictably
+        FOO => println!("foo"), //~ WARN behave unpredictably
         //~^ WARN will become a hard error
-        BAR => println!("bar"), //~ WARN pointers in patterns behave unpredictably
+        BAR => println!("bar"), //~ WARN behave unpredictably
         //~^ WARN will become a hard error
         _ => unreachable!(),
     }
diff --git a/tests/ui/consts/const_in_pattern/issue-44333.stderr b/tests/ui/consts/const_in_pattern/issue-44333.stderr
index 731ef509cca..441aeecbc6d 100644
--- a/tests/ui/consts/const_in_pattern/issue-44333.stderr
+++ b/tests/ui/consts/const_in_pattern/issue-44333.stderr
@@ -1,4 +1,4 @@
-warning: function pointers and unsized pointers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
   --> $DIR/issue-44333.rs:19:9
    |
 LL |         FOO => println!("foo"),
@@ -12,7 +12,7 @@ note: the lint level is defined here
 LL | #![warn(pointer_structural_match)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: function pointers and unsized pointers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
   --> $DIR/issue-44333.rs:21:9
    |
 LL |         BAR => println!("bar"),
diff --git a/tests/ui/consts/issue-34784.rs b/tests/ui/consts/issue-34784.rs
deleted file mode 100644
index 98d943470a7..00000000000
--- a/tests/ui/consts/issue-34784.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// run-pass
-
-#![warn(pointer_structural_match)]
-#![allow(dead_code)]
-const C: *const u8 = &0;
-
-fn foo(x: *const u8) {
-    match x {
-        C => {}
-        _ => {}
-    }
-}
-
-const D: *const [u8; 4] = b"abcd";
-
-fn main() {
-    match D {
-        D => {}
-        _ => {}
-    }
-}
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
new file mode 100644
index 00000000000..5227ca8ec17
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
@@ -0,0 +1,40 @@
+error[E0597]: `a` does not live long enough
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:10:18
+   |
+LL |     let b = |_| &a;
+   |             --- -^
+   |             |   ||
+   |             |   |borrowed value does not live long enough
+   |             |   returning this value requires that `a` is borrowed for `'static`
+   |             value captured here
+...
+LL | }
+   | - `a` dropped here while still borrowed
+   |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+   |
+LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
+   |                      ^^^
+
+error: implementation of `Fn` is not general enough
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
+   |
+LL |     bad(&b);
+   |     ^^^^^^^ implementation of `Fn` is not general enough
+   |
+   = note: closure with signature `fn(&'2 ()) -> &()` must implement `Fn<(&'1 (),)>`, for any lifetime `'1`...
+   = note: ...but it actually implements `Fn<(&'2 (),)>`, for some specific lifetime `'2`
+
+error: implementation of `FnOnce` is not general enough
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
+   |
+LL |     bad(&b);
+   |     ^^^^^^^ implementation of `FnOnce` is not general enough
+   |
+   = note: closure with signature `fn(&'2 ()) -> &()` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`...
+   = note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
new file mode 100644
index 00000000000..5227ca8ec17
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
@@ -0,0 +1,40 @@
+error[E0597]: `a` does not live long enough
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:10:18
+   |
+LL |     let b = |_| &a;
+   |             --- -^
+   |             |   ||
+   |             |   |borrowed value does not live long enough
+   |             |   returning this value requires that `a` is borrowed for `'static`
+   |             value captured here
+...
+LL | }
+   | - `a` dropped here while still borrowed
+   |
+note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+   |
+LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
+   |                      ^^^
+
+error: implementation of `Fn` is not general enough
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
+   |
+LL |     bad(&b);
+   |     ^^^^^^^ implementation of `Fn` is not general enough
+   |
+   = note: closure with signature `fn(&'2 ()) -> &()` must implement `Fn<(&'1 (),)>`, for any lifetime `'1`...
+   = note: ...but it actually implements `Fn<(&'2 (),)>`, for some specific lifetime `'2`
+
+error: implementation of `FnOnce` is not general enough
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
+   |
+LL |     bad(&b);
+   |     ^^^^^^^ implementation of `FnOnce` is not general enough
+   |
+   = note: closure with signature `fn(&'2 ()) -> &()` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`...
+   = note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs
new file mode 100644
index 00000000000..c165e7a1d1a
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.rs
@@ -0,0 +1,20 @@
+// This is a non-regression test for issue #117146, where NLL and `-Zpolonius=next` computed
+// different loan scopes when a region flowed into an SCC whose representative was an existential
+// region.
+
+// revisions: nll polonius
+// [polonius] compile-flags: -Zpolonius=next
+
+fn main() {
+    let a = ();
+    let b = |_| &a;
+    //[nll]~^ ERROR `a` does not live long enough
+    //[polonius]~^^ ERROR `a` does not live long enough
+    bad(&b);
+    //[nll]~^ ERROR implementation of `Fn`
+    //[nll]~| ERROR implementation of `FnOnce`
+    //[polonius]~^^^ ERROR implementation of `Fn`
+    //[polonius]~| ERROR implementation of `FnOnce`
+}
+
+fn bad<F: Fn(&()) -> &()>(_: F) {}
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs
index df0cd54399a..099178a7d50 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs
@@ -7,3 +7,8 @@ const async const fn test() {}
 //~| NOTE expected one of `extern`, `fn`, or `unsafe`
 //~| HELP `const` already used earlier, remove this one
 //~| NOTE `const` first seen here
+//~| ERROR functions cannot be both `const` and `async`
+//~| NOTE `const` because of this
+//~| NOTE `async` because of this
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr
index 977c6ebfef3..4c55179ce23 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.stderr
@@ -13,5 +13,14 @@ note: `const` first seen here
 LL | const async const fn test() {}
    | ^^^^^
 
-error: aborting due to previous error
+error: functions cannot be both `const` and `async`
+  --> $DIR/const-async-const.rs:5:1
+   |
+LL | const async const fn test() {}
+   | ^^^^^-^^^^^-------------------
+   | |     |
+   | |     `async` because of this
+   | `const` because of this
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs
new file mode 100644
index 00000000000..9d7fe43893e
--- /dev/null
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.rs
@@ -0,0 +1,22 @@
+// test for #115714
+
+struct Misplaced;
+
+impl Misplaced {
+    unsafe const fn from_u32(val: u32) {}
+    //~^ ERROR expected one of `extern` or `fn`
+    fn oof(self){}
+}
+
+struct Duplicated;
+
+impl Duplicated {
+    unsafe unsafe fn from_u32(val: u32) {}
+    //~^ ERROR expected one of `extern` or `fn`
+    fn oof(self){}
+}
+
+fn main() {
+    Misplaced.oof();
+    Duplicated.oof();
+}
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr
new file mode 100644
index 00000000000..3f504a9ebfc
--- /dev/null
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/recovery.stderr
@@ -0,0 +1,28 @@
+error: expected one of `extern` or `fn`, found keyword `const`
+  --> $DIR/recovery.rs:6:12
+   |
+LL |     unsafe const fn from_u32(val: u32) {}
+   |     -------^^^^^
+   |     |      |
+   |     |      expected one of `extern` or `fn`
+   |     help: `const` must come before `unsafe`: `const unsafe`
+   |
+   = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
+
+error: expected one of `extern` or `fn`, found keyword `unsafe`
+  --> $DIR/recovery.rs:14:12
+   |
+LL |     unsafe unsafe fn from_u32(val: u32) {}
+   |            ^^^^^^
+   |            |
+   |            expected one of `extern` or `fn`
+   |            help: `unsafe` already used earlier, remove this one
+   |
+note: `unsafe` first seen here
+  --> $DIR/recovery.rs:14:5
+   |
+LL |     unsafe unsafe fn from_u32(val: u32) {}
+   |     ^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs
index bbebc99e94b..47942662685 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs
@@ -12,3 +12,8 @@ async unsafe const fn test() {}
 //~| HELP `const` must come before `async unsafe`
 //~| SUGGESTION const async unsafe
 //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
+//~| ERROR functions cannot be both `const` and `async`
+//~| NOTE `const` because of this
+//~| NOTE `async` because of this
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr
index f455caba158..489e8eefb05 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.stderr
@@ -9,5 +9,14 @@ LL | async unsafe const fn test() {}
    |
    = note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
 
-error: aborting due to previous error
+error: functions cannot be both `const` and `async`
+  --> $DIR/several-kw-jump.rs:9:1
+   |
+LL | async unsafe const fn test() {}
+   | ^^^^^--------^^^^^-------------
+   | |            |
+   | |            `const` because of this
+   | `async` because of this
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs
index 4ff4cf5c8ca..867f71c1204 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs
@@ -12,3 +12,5 @@ unsafe async fn test() {}
 //~| HELP `async` must come before `unsafe`
 //~| SUGGESTION async unsafe
 //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs
index 2f5fbc513ee..9a7f28210f9 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs
@@ -12,3 +12,5 @@ unsafe const fn test() {}
 //~| HELP `const` must come before `unsafe`
 //~| SUGGESTION const unsafe
 //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs
index df2412e3e9b..8305ff4f623 100644
--- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs
+++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs
@@ -12,3 +12,5 @@ extern unsafe fn test() {}
 //~| HELP `unsafe` must come before `extern`
 //~| SUGGESTION unsafe extern
 //~| NOTE keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
+
+fn main() {}
diff --git a/tests/ui/pattern/usefulness/consts-opaque.rs b/tests/ui/pattern/usefulness/consts-opaque.rs
index 6dc1425cf03..27e305a3972 100644
--- a/tests/ui/pattern/usefulness/consts-opaque.rs
+++ b/tests/ui/pattern/usefulness/consts-opaque.rs
@@ -95,8 +95,10 @@ fn main() {
     const QUUX: Quux = quux;
 
     match QUUX {
-        QUUX => {}
-        QUUX => {}
+        QUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
+        QUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
         _ => {}
     }
 
@@ -105,14 +107,17 @@ fn main() {
     const WRAPQUUX: Wrap<Quux> = Wrap(quux);
 
     match WRAPQUUX {
-        WRAPQUUX => {}
-        WRAPQUUX => {}
+        WRAPQUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
+        WRAPQUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     }
 
     match WRAPQUUX {
         Wrap(_) => {}
-        WRAPQUUX => {}
+        WRAPQUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
     }
 
     match WRAPQUUX {
@@ -121,7 +126,8 @@ fn main() {
 
     match WRAPQUUX {
         //~^ ERROR: non-exhaustive patterns: `Wrap(_)` not covered
-        WRAPQUUX => {}
+        WRAPQUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
     }
 
     #[derive(PartialEq, Eq)]
@@ -132,9 +138,11 @@ fn main() {
     const WHOKNOWSQUUX: WhoKnows<Quux> = WhoKnows::Yay(quux);
 
     match WHOKNOWSQUUX {
-        WHOKNOWSQUUX => {}
+        WHOKNOWSQUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
         WhoKnows::Yay(_) => {}
-        WHOKNOWSQUUX => {}
+        WHOKNOWSQUUX => {} //~WARN behave unpredictably
+        //~| previously accepted
         WhoKnows::Nope => {}
     }
 }
diff --git a/tests/ui/pattern/usefulness/consts-opaque.stderr b/tests/ui/pattern/usefulness/consts-opaque.stderr
index 51f2f276bbe..09f72ba927e 100644
--- a/tests/ui/pattern/usefulness/consts-opaque.stderr
+++ b/tests/ui/pattern/usefulness/consts-opaque.stderr
@@ -91,24 +91,96 @@ LL |         BAZ => {}
    = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
 
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:98:9
+   |
+LL |         QUUX => {}
+   |         ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+   = note: `#[warn(pointer_structural_match)]` on by default
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:100:9
+   |
+LL |         QUUX => {}
+   |         ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:110:9
+   |
+LL |         WRAPQUUX => {}
+   |         ^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:112:9
+   |
+LL |         WRAPQUUX => {}
+   |         ^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:119:9
+   |
+LL |         WRAPQUUX => {}
+   |         ^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:129:9
+   |
+LL |         WRAPQUUX => {}
+   |         ^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:141:9
+   |
+LL |         WHOKNOWSQUUX => {}
+   |         ^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/consts-opaque.rs:144:9
+   |
+LL |         WHOKNOWSQUUX => {}
+   |         ^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
 error[E0004]: non-exhaustive patterns: `Wrap(_)` not covered
-  --> $DIR/consts-opaque.rs:122:11
+  --> $DIR/consts-opaque.rs:127:11
    |
 LL |     match WRAPQUUX {
    |           ^^^^^^^^ pattern `Wrap(_)` not covered
    |
 note: `Wrap<fn(usize, usize) -> usize>` defined here
-  --> $DIR/consts-opaque.rs:104:12
+  --> $DIR/consts-opaque.rs:106:12
    |
 LL |     struct Wrap<T>(T);
    |            ^^^^
    = note: the matched value is of type `Wrap<fn(usize, usize) -> usize>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
-LL ~         WRAPQUUX => {},
-LL +         Wrap(_) => todo!()
-   |
+LL |         WRAPQUUX => {}, Wrap(_) => todo!()
+   |                       ++++++++++++++++++++
 
-error: aborting due to 10 previous errors; 1 warning emitted
+error: aborting due to 10 previous errors; 9 warnings emitted
 
 For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs
index 2b3fbd2a4d2..e591b2a93e1 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.rs
@@ -40,7 +40,8 @@ fn main() {
     const CFN1: Wrap<fn()> = Wrap(trivial);
     let input: Wrap<fn()> = Wrap(trivial);
     match Wrap(input) {
-        Wrap(CFN1) => count += 1,
+        Wrap(CFN1) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -48,7 +49,8 @@ fn main() {
     const CFN2: Wrap<fn(SM)> = Wrap(sm_to);
     let input: Wrap<fn(SM)> = Wrap(sm_to);
     match Wrap(input) {
-        Wrap(CFN2) => count += 1,
+        Wrap(CFN2) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -56,7 +58,8 @@ fn main() {
     const CFN3: Wrap<fn() -> SM> = Wrap(to_sm);
     let input: Wrap<fn() -> SM> = Wrap(to_sm);
     match Wrap(input) {
-        Wrap(CFN3) => count += 1,
+        Wrap(CFN3) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -64,7 +67,8 @@ fn main() {
     const CFN4: Wrap<fn(NotSM)> = Wrap(not_sm_to);
     let input: Wrap<fn(NotSM)> = Wrap(not_sm_to);
     match Wrap(input) {
-        Wrap(CFN4) => count += 1,
+        Wrap(CFN4) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -72,7 +76,8 @@ fn main() {
     const CFN5: Wrap<fn() -> NotSM> = Wrap(to_not_sm);
     let input: Wrap<fn() -> NotSM> = Wrap(to_not_sm);
     match Wrap(input) {
-        Wrap(CFN5) => count += 1,
+        Wrap(CFN5) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -80,7 +85,8 @@ fn main() {
     const CFN6: Wrap<fn(&SM)> = Wrap(r_sm_to);
     let input: Wrap<fn(&SM)> = Wrap(r_sm_to);
     match Wrap(input) {
-        Wrap(CFN6) => count += 1,
+        Wrap(CFN6) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -88,7 +94,8 @@ fn main() {
     const CFN7: Wrap<fn(&()) -> &SM> = Wrap(r_to_r_sm);
     let input: Wrap<fn(&()) -> &SM> = Wrap(r_to_r_sm);
     match Wrap(input) {
-        Wrap(CFN7) => count += 1,
+        Wrap(CFN7) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -96,7 +103,8 @@ fn main() {
     const CFN8: Wrap<fn(&NotSM)> = Wrap(r_not_sm_to);
     let input: Wrap<fn(&NotSM)> = Wrap(r_not_sm_to);
     match Wrap(input) {
-        Wrap(CFN8) => count += 1,
+        Wrap(CFN8) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -104,7 +112,8 @@ fn main() {
     const CFN9: Wrap<fn(&()) -> &NotSM> = Wrap(r_to_r_not_sm);
     let input: Wrap<fn(&()) -> &NotSM> = Wrap(r_to_r_not_sm);
     match Wrap(input) {
-        Wrap(CFN9) => count += 1,
+        Wrap(CFN9) => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Wrap(_) => {}
     };
 
@@ -126,7 +135,8 @@ fn main() {
 
     let input = Foo { alpha: not_sm_to, beta: to_not_sm, gamma: sm_to, delta: to_sm };
     match input {
-        CFOO => count += 1,
+        CFOO => count += 1, //~WARN behave unpredictably
+        //~| previously accepted
         Foo { .. } => {}
     };
 
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.stderr
new file mode 100644
index 00000000000..080bf5885ba
--- /dev/null
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/fn-ptr-is-structurally-matchable.stderr
@@ -0,0 +1,93 @@
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:43:14
+   |
+LL |         Wrap(CFN1) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+   = note: `#[warn(pointer_structural_match)]` on by default
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:52:14
+   |
+LL |         Wrap(CFN2) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:61:14
+   |
+LL |         Wrap(CFN3) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:70:14
+   |
+LL |         Wrap(CFN4) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:79:14
+   |
+LL |         Wrap(CFN5) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:88:14
+   |
+LL |         Wrap(CFN6) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:97:14
+   |
+LL |         Wrap(CFN7) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:106:14
+   |
+LL |         Wrap(CFN8) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:115:14
+   |
+LL |         Wrap(CFN9) => count += 1,
+   |              ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/fn-ptr-is-structurally-matchable.rs:138:9
+   |
+LL |         CFOO => count += 1,
+   |         ^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: 10 warnings emitted
+
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs
index 567685950e9..b05b8c8da1f 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.rs
@@ -26,6 +26,7 @@ fn my_fn(_args: &[A]) {
 }
 
 const TEST: Fn = my_fn;
+const TEST2: (Fn, u8) = (TEST, 0);
 
 struct B(Fn);
 
@@ -33,8 +34,14 @@ fn main() {
   let s = B(my_fn);
   match s {
     B(TEST) => println!("matched"),
-     //~^ WARN pointers in patterns behave unpredictably
+    //~^ WARN behave unpredictably
     //~| WARN this was previously accepted by the compiler but is being phased out
     _ => panic!("didn't match")
   };
+  match (s.0, 0) {
+    TEST2 => println!("matched"),
+    //~^ WARN behave unpredictably
+    //~| WARN this was previously accepted by the compiler but is being phased out
+    _ => panic!("didn't match")
+  }
 }
diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr
index d6afc0255ec..4fdfce60bb8 100644
--- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr
+++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/issue-63479-match-fnptr.stderr
@@ -1,5 +1,5 @@
-warning: function pointers and unsized pointers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
-  --> $DIR/issue-63479-match-fnptr.rs:35:7
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/issue-63479-match-fnptr.rs:36:7
    |
 LL |     B(TEST) => println!("matched"),
    |       ^^^^
@@ -12,5 +12,14 @@ note: the lint level is defined here
 LL | #![warn(pointer_structural_match)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^
 
-warning: 1 warning emitted
+warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
+  --> $DIR/issue-63479-match-fnptr.rs:42:5
+   |
+LL |     TEST2 => println!("matched"),
+   |     ^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/70861>
+
+warning: 2 warnings emitted