about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2023-12-14 05:02:50 +0000
committerThe Miri Conjob Bot <miri@cron.bot>2023-12-14 05:02:50 +0000
commit7d4f92a309b67a04bcb5729f0420b21812ea8aef (patch)
treec45eac208e30cda04a260493b0b9645faf52d73f /tests
parent205fbf42569b3cd17e2cfe1f88f479deba5a9d3a (diff)
parente6d1b0ec9859e6f5c29aaa3b6525fb625bf354ad (diff)
downloadrust-7d4f92a309b67a04bcb5729f0420b21812ea8aef.tar.gz
rust-7d4f92a309b67a04bcb5729f0420b21812ea8aef.zip
Merge from rustc
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly/dwarf4.rs24
-rw-r--r--tests/assembly/dwarf5.rs1
-rw-r--r--tests/assembly/stack-probes.rs (renamed from tests/assembly/x86-stack-probes.rs)12
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs2
-rw-r--r--tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs2
-rw-r--r--tests/codegen/stack-probes-inline.rs4
-rw-r--r--tests/incremental/thinlto/cgu_invalidated_via_import.rs2
-rw-r--r--tests/incremental/thinlto/cgu_keeps_identical_fn.rs2
-rw-r--r--tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs2
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir7
-rw-r--r--tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir3
-rw-r--r--tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff1
-rw-r--r--tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff1
-rw-r--r--tests/rustdoc-js/assoc-type.js6
-rw-r--r--tests/rustdoc-js/big-result.js39
-rw-r--r--tests/rustdoc-js/big-result.rs61
-rw-r--r--tests/rustdoc-js/full-path-function.js4
-rw-r--r--tests/rustdoc-js/generics.js1
-rw-r--r--tests/rustdoc-js/impl-trait.js2
-rw-r--r--tests/rustdoc-js/type-parameters.js19
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.stderr2
-rw-r--r--tests/rustdoc-ui/doctest/check-attr-test.stderr36
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.stderr2
-rw-r--r--tests/rustdoc-ui/lints/check-attr.rs17
-rw-r--r--tests/rustdoc-ui/lints/check-attr.stderr80
-rw-r--r--tests/rustdoc-ui/lints/check-fail.stderr6
-rw-r--r--tests/ui/abi/stack-probes-lto.rs4
-rw-r--r--tests/ui/abi/stack-probes.rs4
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr7
-rw-r--r--tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr7
-rw-r--r--tests/ui/async-await/future-sizes/async-awaiting-fut.stdout6
-rw-r--r--tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr8
-rw-r--r--tests/ui/attributes/issue-90873.rs4
-rw-r--r--tests/ui/attributes/issue-90873.stderr9
-rw-r--r--tests/ui/attributes/key-value-expansion-on-mac.rs4
-rw-r--r--tests/ui/attributes/key-value-expansion-on-mac.stderr2
-rw-r--r--tests/ui/attributes/key-value-expansion.rs6
-rw-r--r--tests/ui/attributes/key-value-expansion.stderr6
-rw-r--r--tests/ui/attributes/unused-item-in-attr.rs2
-rw-r--r--tests/ui/attributes/unused-item-in-attr.stderr4
-rw-r--r--tests/ui/c-variadic/variadic-ffi-6.stderr11
-rw-r--r--tests/ui/check-cfg/allow-same-level.stderr2
-rw-r--r--tests/ui/check-cfg/cargo-feature.none.stderr31
-rw-r--r--tests/ui/check-cfg/cargo-feature.rs17
-rw-r--r--tests/ui/check-cfg/cargo-feature.some.stderr35
-rw-r--r--tests/ui/check-cfg/cargo-feature.stderr11
-rw-r--r--tests/ui/check-cfg/compact-names.stderr2
-rw-r--r--tests/ui/check-cfg/compact-values.stderr2
-rw-r--r--tests/ui/check-cfg/concat-values.stderr4
-rw-r--r--tests/ui/check-cfg/diagnotics.cargo.stderr71
-rw-r--r--tests/ui/check-cfg/diagnotics.rs3
-rw-r--r--tests/ui/check-cfg/diagnotics.rustc.stderr74
-rw-r--r--tests/ui/check-cfg/diagnotics.stderr61
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr10
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr33
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.feature.stderr6
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.full.stderr6
-rw-r--r--tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr11
-rw-r--r--tests/ui/check-cfg/exhaustive-names.stderr2
-rw-r--r--tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr2
-rw-r--r--tests/ui/check-cfg/exhaustive-values.without_names.stderr2
-rw-r--r--tests/ui/check-cfg/mix.cfg.stderr184
-rw-r--r--tests/ui/check-cfg/mix.stderr65
-rw-r--r--tests/ui/check-cfg/no-expected-values.empty.stderr4
-rw-r--r--tests/ui/check-cfg/no-expected-values.mixed.stderr4
-rw-r--r--tests/ui/check-cfg/no-expected-values.simple.stderr4
-rw-r--r--tests/ui/check-cfg/order-independant.values_after.stderr2
-rw-r--r--tests/ui/check-cfg/order-independant.values_before.stderr2
-rw-r--r--tests/ui/check-cfg/stmt-no-ice.stderr2
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.stderr2
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr21
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.stderr4
-rw-r--r--tests/ui/check-cfg/well-known-names.stderr10
-rw-r--r--tests/ui/check-cfg/well-known-values.stderr50
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs25
-rw-r--r--tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr64
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs43
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr9
-rw-r--r--tests/ui/consts/const-eval/issue-91827-extern-types.rs59
-rw-r--r--tests/ui/consts/issue-90878-2.rs2
-rw-r--r--tests/ui/consts/issue-90878-2.stderr2
-rw-r--r--tests/ui/coroutine/async-gen-deduce-yield.rs14
-rw-r--r--tests/ui/coroutine/uninhabited-field.rs37
-rw-r--r--tests/ui/destructuring-assignment/bad-expr-lhs.rs2
-rw-r--r--tests/ui/destructuring-assignment/bad-expr-lhs.stderr10
-rw-r--r--tests/ui/destructuring-assignment/non-exhaustive-destructure.rs4
-rw-r--r--tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr17
-rw-r--r--tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs6
-rw-r--r--tests/ui/diagnostic-width/long-E0308.stderr10
-rw-r--r--tests/ui/extern/extern-types-field-offset.rs33
-rw-r--r--tests/ui/extern/extern-types-field-offset.run.stderr4
-rw-r--r--tests/ui/extern/extern-types-size_of_val.align.run.stderr4
-rw-r--r--tests/ui/extern/extern-types-size_of_val.rs14
-rw-r--r--tests/ui/extern/extern-types-size_of_val.size.run.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr32
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr14
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.rs15
-rw-r--r--tests/ui/feature-gates/feature-gate-trivial_bounds.stderr2
-rw-r--r--tests/ui/fmt/send-sync.stderr10
-rw-r--r--tests/ui/foreign-fn-return-lifetime.fixed8
-rw-r--r--tests/ui/foreign-fn-return-lifetime.rs2
-rw-r--r--tests/ui/foreign-fn-return-lifetime.stderr9
-rw-r--r--tests/ui/function-pointer/unsized-ret.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-70304.stderr2
-rw-r--r--tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr4
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr2
-rw-r--r--tests/ui/inference/issue-103587.stderr6
-rw-r--r--tests/ui/issues/issue-13407.rs4
-rw-r--r--tests/ui/issues/issue-13407.stderr15
-rw-r--r--tests/ui/issues/issue-13497.stderr6
-rw-r--r--tests/ui/issues/issue-21763.stderr2
-rw-r--r--tests/ui/kindck/kindck-send-object1.stderr2
-rw-r--r--tests/ui/lifetimes/issue-26638.stderr16
-rw-r--r--tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr29
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs60
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs28
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs2
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr4
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs14
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs14
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr10
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs8
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr28
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs34
-rw-r--r--tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr206
-rw-r--r--tests/ui/malformed/malformed-interpolated.rs4
-rw-r--r--tests/ui/malformed/malformed-interpolated.stderr4
-rw-r--r--tests/ui/parser/bad-lit-suffixes.rs5
-rw-r--r--tests/ui/parser/bad-lit-suffixes.stderr27
-rw-r--r--tests/ui/parser/issues/issue-104620.rs2
-rw-r--r--tests/ui/parser/issues/issue-104620.stderr6
-rw-r--r--tests/ui/print_type_sizes/coroutine_discr_placement.stdout6
-rw-r--r--tests/ui/self/elision/nested-item.stderr11
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr66
-rw-r--r--tests/ui/suggestions/impl-trait-missing-lifetime.stderr22
-rw-r--r--tests/ui/suggestions/missing-lifetime-specifier.stderr10
-rw-r--r--tests/ui/suggestions/return-elided-lifetime.stderr22
-rw-r--r--tests/ui/traits/negative-impls/negated-auto-traits-error.stderr8
-rw-r--r--tests/ui/traits/new-solver/alias-bound-unsound.rs1
-rw-r--r--tests/ui/traits/new-solver/alias-bound-unsound.stderr11
-rw-r--r--tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs2
-rw-r--r--tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr13
-rw-r--r--tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs2
-rw-r--r--tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr8
-rw-r--r--tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs2
-rw-r--r--tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr8
-rw-r--r--tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr2
147 files changed, 1551 insertions, 805 deletions
diff --git a/tests/assembly/dwarf4.rs b/tests/assembly/dwarf4.rs
new file mode 100644
index 00000000000..6e1584458b6
--- /dev/null
+++ b/tests/assembly/dwarf4.rs
@@ -0,0 +1,24 @@
+// Makes sure that `-Z dwarf-version=4` causes `rustc` to emit DWARF version 4.
+// assembly-output: emit-asm
+// compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=4 -Copt-level=0
+// needs-llvm-components: x86
+
+#![feature(no_core, lang_items)]
+#![crate_type = "rlib"]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+
+pub fn wibble() {}
+
+pub struct X;
+
+// CHECK: .section .debug_info
+// CHECK-NOT: .short 2
+// CHECK-NOT: .short 5
+// CHECK: .short 4
+// CHECK-NOT: .section .debug_pubnames
+// CHECK-NOT: .section .debug_pubtypes
diff --git a/tests/assembly/dwarf5.rs b/tests/assembly/dwarf5.rs
index 253baafb887..46d4e84b41b 100644
--- a/tests/assembly/dwarf5.rs
+++ b/tests/assembly/dwarf5.rs
@@ -18,3 +18,4 @@ pub fn wibble() {}
 // CHECK-NOT: .short 2
 // CHECK-NOT: .short 4
 // CHECK: .short 5
+// CHECK: .section .debug_names
diff --git a/tests/assembly/x86-stack-probes.rs b/tests/assembly/stack-probes.rs
index 64a4efc0e18..6466df3ff7d 100644
--- a/tests/assembly/x86-stack-probes.rs
+++ b/tests/assembly/stack-probes.rs
@@ -1,10 +1,12 @@
-// revisions: x86_64 i686
+// revisions: x86_64 i686 aarch64
 // assembly-output: emit-asm
-//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
+//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
 //[x86_64] needs-llvm-components: x86
-//[i686] compile-flags: --target i686-unknown-linux-gnu
+//[i686] compile-flags: --target i686-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
 //[i686] needs-llvm-components: x86
-// compile-flags: -C llvm-args=-x86-asm-syntax=intel
+//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//[aarch64] needs-llvm-components: aarch64
+//[aarch64] min-llvm-version: 18
 
 #![feature(no_core, lang_items)]
 #![crate_type = "lib"]
@@ -28,6 +30,7 @@ pub fn small_stack_probe(x: u8, f: fn(&mut [u8; 8192])) {
     // CHECK-NOT: __rust_probestack
     // x86_64: sub rsp, 4096
     // i686: sub esp, 4096
+    // aarch64: sub sp, sp, #1, lsl #12
     f(&mut [x; 8192]);
 }
 
@@ -37,5 +40,6 @@ pub fn big_stack_probe(x: u8, f: fn(&[u8; 65536])) {
     // CHECK-NOT: __rust_probestack
     // x86_64: sub rsp, 4096
     // i686: sub esp, 4096
+    // aarch64: sub sp, sp, #1, lsl #12
     f(&mut [x; 65536]);
 }
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
index 7b1fb320894..e573b7d21bd 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-load.rs
@@ -21,7 +21,7 @@ extern "platform-intrinsic" {
 #[no_mangle]
 pub unsafe fn load_f32x2(mask: Vec2<i32>, pointer: *const f32,
                          values: Vec2<f32>) -> Vec2<f32> {
-    // CHECK: call <2 x float> @llvm.masked.load.v2f32.p0(ptr {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x float> {{.*}})
+    // CHECK: call <2 x float> @llvm.masked.load.v2f32.p0(ptr {{.*}}, i32 4, <2 x i1> {{.*}}, <2 x float> {{.*}})
     simd_masked_load(mask, pointer, values)
 }
 
diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
index d8a37020f23..91656622216 100644
--- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
+++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-masked-store.rs
@@ -20,7 +20,7 @@ extern "platform-intrinsic" {
 // CHECK-LABEL: @store_f32x2
 #[no_mangle]
 pub unsafe fn store_f32x2(mask: Vec2<i32>, pointer: *mut f32, values: Vec2<f32>) {
-    // CHECK: call void @llvm.masked.store.v2f32.p0(<2 x float> {{.*}}, ptr {{.*}}, i32 {{.*}}, <2 x i1> {{.*}})
+    // CHECK: call void @llvm.masked.store.v2f32.p0(<2 x float> {{.*}}, ptr {{.*}}, i32 4, <2 x i1> {{.*}})
     simd_masked_store(mask, pointer, values)
 }
 
diff --git a/tests/codegen/stack-probes-inline.rs b/tests/codegen/stack-probes-inline.rs
index 058c363969f..34027e91850 100644
--- a/tests/codegen/stack-probes-inline.rs
+++ b/tests/codegen/stack-probes-inline.rs
@@ -2,7 +2,9 @@
 // or `StackProbeType::InlineOrCall` when running on newer LLVM.
 
 // compile-flags: -C no-prepopulate-passes
-// revisions: powerpc powerpc64 powerpc64le s390x i686 x86_64
+// revisions: aarch64 powerpc powerpc64 powerpc64le s390x i686 x86_64
+//[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
+//[aarch64] needs-llvm-components: aarch64
 //[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
 //[powerpc] needs-llvm-components: powerpc
 //[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
diff --git a/tests/incremental/thinlto/cgu_invalidated_via_import.rs b/tests/incremental/thinlto/cgu_invalidated_via_import.rs
index 5fe435d796f..e0cd385eff3 100644
--- a/tests/incremental/thinlto/cgu_invalidated_via_import.rs
+++ b/tests/incremental/thinlto/cgu_invalidated_via_import.rs
@@ -4,7 +4,7 @@
 
 // revisions: cfail1 cfail2 cfail3
 // compile-flags: -Z query-dep-graph -O
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![crate_type="rlib"]
diff --git a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs
index 368a726ea90..781aae578d4 100644
--- a/tests/incremental/thinlto/cgu_keeps_identical_fn.rs
+++ b/tests/incremental/thinlto/cgu_keeps_identical_fn.rs
@@ -5,7 +5,7 @@
 
 // revisions: cfail1 cfail2 cfail3
 // compile-flags: -Z query-dep-graph -O
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![crate_type = "rlib"]
diff --git a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs
index 045f2011958..8aa036ec978 100644
--- a/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs
+++ b/tests/incremental/thinlto/independent_cgus_dont_affect_each_other.rs
@@ -3,7 +3,7 @@
 
 // revisions: cfail1 cfail2 cfail3
 // compile-flags: -Z query-dep-graph -O
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![crate_type="rlib"]
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
index 111dd8e97f9..59e27512464 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir
@@ -178,6 +178,10 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>,
         StorageLive(_20);
         _20 = ();
         _0 = Poll::<()>::Pending;
+        StorageDead(_3);
+        StorageDead(_4);
+        StorageDead(_19);
+        StorageDead(_20);
         discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 3;
         return;
     }
@@ -276,6 +280,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>,
         StorageLive(_36);
         _36 = ();
         _0 = Poll::<()>::Pending;
+        StorageDead(_21);
+        StorageDead(_35);
+        StorageDead(_36);
         discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 4;
         return;
     }
diff --git a/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir b/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
index 17b99c87c39..165aa3a05cb 100644
--- a/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
+++ b/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
@@ -55,6 +55,9 @@ fn main::{closure#0}(_1: Pin<&mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24
         StorageLive(_7);
         _7 = ();
         _0 = CoroutineState::<(), ()>::Yielded(move _7);
+        StorageDead(_4);
+        StorageDead(_6);
+        StorageDead(_7);
         discriminant((*(_1.0: &mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24}))) = 3;
         return;
     }
diff --git a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
index 42dd7ba55cf..68c612314f6 100644
--- a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
@@ -89,6 +89,7 @@
 + 
 +     bb6: {
 +         _1 = CoroutineState::<i32, bool>::Yielded(move _8);
++         StorageDead(_8);
 +         discriminant((*_6)) = 3;
 +         goto -> bb2;
 +     }
diff --git a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
index 7b8958c13fc..1bf14e8c3b3 100644
--- a/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
@@ -103,6 +103,7 @@
 + 
 +     bb8: {
 +         _1 = CoroutineState::<i32, bool>::Yielded(move _8);
++         StorageDead(_8);
 +         discriminant((*_6)) = 3;
 +         goto -> bb4;
 +     }
diff --git a/tests/rustdoc-js/assoc-type.js b/tests/rustdoc-js/assoc-type.js
index 47776656e32..eec4e7a8258 100644
--- a/tests/rustdoc-js/assoc-type.js
+++ b/tests/rustdoc-js/assoc-type.js
@@ -7,16 +7,16 @@ const EXPECTED = [
         'query': 'iterator<something> -> u32',
         'correction': null,
         'others': [
-            { 'path': 'assoc_type', 'name': 'my_fn' },
             { 'path': 'assoc_type::my', 'name': 'other_fn' },
+            { 'path': 'assoc_type', 'name': 'my_fn' },
         ],
     },
     {
         'query': 'iterator<something>',
         'correction': null,
         'in_args': [
-            { 'path': 'assoc_type', 'name': 'my_fn' },
             { 'path': 'assoc_type::my', 'name': 'other_fn' },
+            { 'path': 'assoc_type', 'name': 'my_fn' },
         ],
     },
     {
@@ -26,8 +26,8 @@ const EXPECTED = [
             { 'path': 'assoc_type', 'name': 'Something' },
         ],
         'in_args': [
-            { 'path': 'assoc_type', 'name': 'my_fn' },
             { 'path': 'assoc_type::my', 'name': 'other_fn' },
+            { 'path': 'assoc_type', 'name': 'my_fn' },
         ],
     },
     // if I write an explicit binding, only it shows up
diff --git a/tests/rustdoc-js/big-result.js b/tests/rustdoc-js/big-result.js
new file mode 100644
index 00000000000..07961d196f4
--- /dev/null
+++ b/tests/rustdoc-js/big-result.js
@@ -0,0 +1,39 @@
+// exact-check
+
+const EXPECTED = [
+    {
+        'query': 'First',
+        'in_args': (function() {
+            // Generate the list of 200 items that should match.
+            const results = [];
+            function generate(lx, ly) {
+                for (const x of lx) {
+                    for (const y of ly) {
+                        results.push({
+                            'path': `big_result::${y}`,
+                            'name': x,
+                        });
+                    }
+                }
+            }
+            // Fewest parameters that still match go on top.
+            generate(
+                ['u', 'v', 'w', 'x', 'y'],
+                ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+            );
+            generate(
+                ['p', 'q', 'r', 's', 't'],
+                ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+            );
+            generate(
+                ['k', 'l', 'm', 'n', 'o'],
+                ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+            );
+            generate(
+                ['f', 'g', 'h', 'i', 'j'],
+                ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+            );
+            return results;
+        })(),
+    },
+];
diff --git a/tests/rustdoc-js/big-result.rs b/tests/rustdoc-js/big-result.rs
new file mode 100644
index 00000000000..4dfecd6aaad
--- /dev/null
+++ b/tests/rustdoc-js/big-result.rs
@@ -0,0 +1,61 @@
+#![feature(concat_idents)]
+#![allow(nonstandard_style)]
+/// Generate 250 items that all match the query, starting with the longest.
+/// Those long items should be dropped from the result set, and the short ones
+/// should be shown instead.
+macro_rules! generate {
+    ([$($x:ident),+], $y:tt, $z:tt) => {
+        $(
+            generate!(@ $x, $y, $z);
+        )+
+    };
+    (@ $x:ident , [$($y:ident),+], $z:tt) => {
+        pub struct $x;
+        $(
+            generate!(@@ $x, $y, $z);
+        )+
+    };
+    (@@ $x:ident , $y:ident, [$($z:ident: $zt:ident),+]) => {
+        impl $y {
+            pub fn $x($($z: $zt,)+) {}
+        }
+    }
+}
+
+pub struct First;
+pub struct Second;
+pub struct Third;
+pub struct Fourth;
+pub struct Fifth;
+
+generate!(
+    [a, b, c, d, e],
+    [a, b, c, d, e, f, g, h, i, j],
+    [a: First, b: Second, c: Third, d: Fourth, e: Fifth]
+);
+
+generate!(
+    [f, g, h, i, j],
+    [a, b, c, d, e, f, g, h, i, j],
+    [a: First, b: Second, c: Third, d: Fourth]
+);
+
+generate!(
+    [k, l, m, n, o],
+    [a, b, c, d, e, f, g, h, i, j],
+    [a: First, b: Second, c: Third]
+);
+
+generate!(
+    // reverse it, just to make sure they're alphabetized
+    // in the result set when all else is equal
+    [t, s, r, q, p],
+    [a, b, c, d, e, f, g, h, i, j],
+    [a: First, b: Second]
+);
+
+generate!(
+    [u, v, w, x, y],
+    [a, b, c, d, e, f, g, h, i, j],
+    [a: First]
+);
diff --git a/tests/rustdoc-js/full-path-function.js b/tests/rustdoc-js/full-path-function.js
index 48be51b156f..0464f792217 100644
--- a/tests/rustdoc-js/full-path-function.js
+++ b/tests/rustdoc-js/full-path-function.js
@@ -4,16 +4,16 @@ const EXPECTED = [
     {
         'query': 'sac -> usize',
         'others': [
-            { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
             { 'path': 'full_path_function::b::Sac', 'name': 'len' },
             { 'path': 'full_path_function::sac::Sac', 'name': 'len' },
+            { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
         ],
     },
     {
         'query': 'b::sac -> usize',
         'others': [
-            { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
             { 'path': 'full_path_function::b::Sac', 'name': 'len' },
+            { 'path': 'full_path_function::b::Sac', 'name': 'bar' },
         ],
     },
     {
diff --git a/tests/rustdoc-js/generics.js b/tests/rustdoc-js/generics.js
index ebc92ccfc05..b3ca0af3056 100644
--- a/tests/rustdoc-js/generics.js
+++ b/tests/rustdoc-js/generics.js
@@ -1,4 +1,5 @@
 // exact-check
+// ignore-order
 
 const EXPECTED = [
     {
diff --git a/tests/rustdoc-js/impl-trait.js b/tests/rustdoc-js/impl-trait.js
index 00d67d639bd..8bb3f2d3e99 100644
--- a/tests/rustdoc-js/impl-trait.js
+++ b/tests/rustdoc-js/impl-trait.js
@@ -39,8 +39,8 @@ const EXPECTED = [
             { 'path': 'impl_trait', 'name': 'Aaaaaaa' },
         ],
         'in_args': [
-            { 'path': 'impl_trait::Ccccccc', 'name': 'eeeeeee' },
             { 'path': 'impl_trait::Ccccccc', 'name': 'fffffff' },
+            { 'path': 'impl_trait::Ccccccc', 'name': 'eeeeeee' },
         ],
         'returned': [
             { 'path': 'impl_trait', 'name': 'bbbbbbb' },
diff --git a/tests/rustdoc-js/type-parameters.js b/tests/rustdoc-js/type-parameters.js
index e695f189bb6..e045409e507 100644
--- a/tests/rustdoc-js/type-parameters.js
+++ b/tests/rustdoc-js/type-parameters.js
@@ -1,20 +1,19 @@
 // exact-check
-// ignore-order
 
 const EXPECTED = [
     {
         query: '-> trait:Some',
         others: [
-            { path: 'foo', name: 'alef' },
             { path: 'foo', name: 'alpha' },
+            { path: 'foo', name: 'alef' },
         ],
     },
     {
         query: '-> generic:T',
         others: [
+            { path: 'foo', name: 'beta' },
             { path: 'foo', name: 'bet' },
             { path: 'foo', name: 'alef' },
-            { path: 'foo', name: 'beta' },
         ],
     },
     {
@@ -44,38 +43,40 @@ const EXPECTED = [
     {
         query: 'Other, Other',
         others: [
-            { path: 'foo', name: 'other' },
             { path: 'foo', name: 'alternate' },
+            { path: 'foo', name: 'other' },
         ],
     },
     {
         query: 'generic:T',
         in_args: [
-            { path: 'foo', name: 'bet' },
             { path: 'foo', name: 'beta' },
-            { path: 'foo', name: 'other' },
+            { path: 'foo', name: 'bet' },
             { path: 'foo', name: 'alternate' },
+            { path: 'foo', name: 'other' },
         ],
     },
     {
         query: 'generic:Other',
         in_args: [
-            { path: 'foo', name: 'bet' },
             { path: 'foo', name: 'beta' },
-            { path: 'foo', name: 'other' },
+            { path: 'foo', name: 'bet' },
             { path: 'foo', name: 'alternate' },
+            { path: 'foo', name: 'other' },
         ],
     },
     {
         query: 'trait:Other',
         in_args: [
-            { path: 'foo', name: 'other' },
             { path: 'foo', name: 'alternate' },
+            { path: 'foo', name: 'other' },
         ],
     },
     {
         query: 'Other',
         in_args: [
+            // because function is called "other", it's sorted first
+            // even though it has higher type distance
             { path: 'foo', name: 'other' },
             { path: 'foo', name: 'alternate' },
         ],
diff --git a/tests/rustdoc-ui/check-cfg/check-cfg.stderr b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
index d010c1f7ec6..3bca5dd0834 100644
--- a/tests/rustdoc-ui/check-cfg/check-cfg.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
@@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `uniz`
 LL | #[cfg(uniz)]
    |       ^^^^ help: there is a config with a similar name: `unix`
    |
+   = help: to expect this configuration use `--check-cfg=cfg(uniz)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/rustdoc-ui/doctest/check-attr-test.stderr b/tests/rustdoc-ui/doctest/check-attr-test.stderr
index 01beba1ffc4..10f763a6f9d 100644
--- a/tests/rustdoc-ui/doctest/check-attr-test.stderr
+++ b/tests/rustdoc-ui/doctest/check-attr-test.stderr
@@ -1,4 +1,4 @@
-error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
+error: unknown attribute `compile-fail`
  --> $DIR/check-attr-test.rs:5:1
   |
 5 | / /// foo
@@ -8,6 +8,7 @@ error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
 9 | | /// ```
   | |_______^
   |
+  = help: there is an attribute with a similar name: `compile_fail`
   = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
 note: the lint level is defined here
  --> $DIR/check-attr-test.rs:3:9
@@ -15,7 +16,7 @@ note: the lint level is defined here
 3 | #![deny(rustdoc::invalid_codeblock_attributes)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: unknown attribute `compilefail`. Did you mean `compile_fail`?
+error: unknown attribute `compilefail`
  --> $DIR/check-attr-test.rs:5:1
   |
 5 | / /// foo
@@ -25,9 +26,10 @@ error: unknown attribute `compilefail`. Did you mean `compile_fail`?
 9 | | /// ```
   | |_______^
   |
+  = help: there is an attribute with a similar name: `compile_fail`
   = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
 
-error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
+error: unknown attribute `comPile_fail`
  --> $DIR/check-attr-test.rs:5:1
   |
 5 | / /// foo
@@ -37,9 +39,10 @@ error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
 9 | | /// ```
   | |_______^
   |
+  = help: there is an attribute with a similar name: `compile_fail`
   = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
 
-error: unknown attribute `should-panic`. Did you mean `should_panic`?
+error: unknown attribute `should-panic`
   --> $DIR/check-attr-test.rs:12:1
    |
 12 | / /// bar
@@ -49,9 +52,10 @@ error: unknown attribute `should-panic`. Did you mean `should_panic`?
 16 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `should_panic`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
 
-error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
+error: unknown attribute `shouldpanic`
   --> $DIR/check-attr-test.rs:12:1
    |
 12 | / /// bar
@@ -61,9 +65,10 @@ error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
 16 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `should_panic`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
 
-error: unknown attribute `shOuld_panic`. Did you mean `should_panic`?
+error: unknown attribute `shOuld_panic`
   --> $DIR/check-attr-test.rs:12:1
    |
 12 | / /// bar
@@ -73,9 +78,10 @@ error: unknown attribute `shOuld_panic`. Did you mean `should_panic`?
 16 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `should_panic`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
 
-error: unknown attribute `no-run`. Did you mean `no_run`?
+error: unknown attribute `no-run`
   --> $DIR/check-attr-test.rs:19:1
    |
 19 | / /// foobar
@@ -85,9 +91,10 @@ error: unknown attribute `no-run`. Did you mean `no_run`?
 23 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `no_run`
    = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
 
-error: unknown attribute `norun`. Did you mean `no_run`?
+error: unknown attribute `norun`
   --> $DIR/check-attr-test.rs:19:1
    |
 19 | / /// foobar
@@ -97,9 +104,10 @@ error: unknown attribute `norun`. Did you mean `no_run`?
 23 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `no_run`
    = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
 
-error: unknown attribute `nO_run`. Did you mean `no_run`?
+error: unknown attribute `nO_run`
   --> $DIR/check-attr-test.rs:19:1
    |
 19 | / /// foobar
@@ -109,9 +117,10 @@ error: unknown attribute `nO_run`. Did you mean `no_run`?
 23 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `no_run`
    = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
 
-error: unknown attribute `test-harness`. Did you mean `test_harness`?
+error: unknown attribute `test-harness`
   --> $DIR/check-attr-test.rs:26:1
    |
 26 | / /// b
@@ -121,9 +130,10 @@ error: unknown attribute `test-harness`. Did you mean `test_harness`?
 30 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
   --> $DIR/check-attr-test.rs:26:1
    |
 26 | / /// b
@@ -133,9 +143,10 @@ error: unknown attribute `testharness`. Did you mean `test_harness`?
 30 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
-error: unknown attribute `tesT_harness`. Did you mean `test_harness`?
+error: unknown attribute `tesT_harness`
   --> $DIR/check-attr-test.rs:26:1
    |
 26 | / /// b
@@ -145,6 +156,7 @@ error: unknown attribute `tesT_harness`. Did you mean `test_harness`?
 30 | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
 error: aborting due to 12 previous errors
diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.stderr b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
index 0bfd569e381..5524f582d56 100644
--- a/tests/rustdoc-ui/doctest/check-cfg-test.stderr
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(feature = "invalid")]
    |       ^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `test`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("invalid"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/rustdoc-ui/lints/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs
index 0b3f7bedda5..3c06e6c076b 100644
--- a/tests/rustdoc-ui/lints/check-attr.rs
+++ b/tests/rustdoc-ui/lints/check-attr.rs
@@ -39,3 +39,20 @@ pub fn foobar() {}
 /// boo
 /// ```
 pub fn b() {}
+
+/// b
+//~^ ERROR
+///
+/// ```rust2018
+/// boo
+/// ```
+pub fn c() {}
+
+/// b
+//~^ ERROR
+//~| ERROR
+///
+/// ```rust2018 shouldpanic
+/// boo
+/// ```
+pub fn d() {}
diff --git a/tests/rustdoc-ui/lints/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr
index f66e63ab727..d640125ab51 100644
--- a/tests/rustdoc-ui/lints/check-attr.stderr
+++ b/tests/rustdoc-ui/lints/check-attr.stderr
@@ -1,4 +1,4 @@
-error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
+error: unknown attribute `compile-fail`
   --> $DIR/check-attr.rs:3:1
    |
 LL | / /// foo
@@ -10,6 +10,7 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `compile_fail`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
 note: the lint level is defined here
   --> $DIR/check-attr.rs:1:9
@@ -17,7 +18,7 @@ note: the lint level is defined here
 LL | #![deny(rustdoc::invalid_codeblock_attributes)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: unknown attribute `compilefail`. Did you mean `compile_fail`?
+error: unknown attribute `compilefail`
   --> $DIR/check-attr.rs:3:1
    |
 LL | / /// foo
@@ -29,9 +30,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `compile_fail`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
 
-error: unknown attribute `comPile_fail`. Did you mean `compile_fail`?
+error: unknown attribute `comPile_fail`
   --> $DIR/check-attr.rs:3:1
    |
 LL | / /// foo
@@ -43,9 +45,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `compile_fail`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
 
-error: unknown attribute `should-panic`. Did you mean `should_panic`?
+error: unknown attribute `should-panic`
   --> $DIR/check-attr.rs:13:1
    |
 LL | / /// bar
@@ -57,9 +60,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `should_panic`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
 
-error: unknown attribute `shouldpanic`. Did you mean `should_panic`?
+error: unknown attribute `shouldpanic`
   --> $DIR/check-attr.rs:13:1
    |
 LL | / /// bar
@@ -71,9 +75,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `should_panic`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
 
-error: unknown attribute `sHould_panic`. Did you mean `should_panic`?
+error: unknown attribute `sHould_panic`
   --> $DIR/check-attr.rs:13:1
    |
 LL | / /// bar
@@ -85,9 +90,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `should_panic`
    = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
 
-error: unknown attribute `no-run`. Did you mean `no_run`?
+error: unknown attribute `no-run`
   --> $DIR/check-attr.rs:23:1
    |
 LL | / /// foobar
@@ -99,9 +105,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `no_run`
    = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
 
-error: unknown attribute `norun`. Did you mean `no_run`?
+error: unknown attribute `norun`
   --> $DIR/check-attr.rs:23:1
    |
 LL | / /// foobar
@@ -113,9 +120,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `no_run`
    = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
 
-error: unknown attribute `no_Run`. Did you mean `no_run`?
+error: unknown attribute `no_Run`
   --> $DIR/check-attr.rs:23:1
    |
 LL | / /// foobar
@@ -127,9 +135,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `no_run`
    = help: the code block will either not be tested if not marked as a rust one or will be run (which you might not want)
 
-error: unknown attribute `test-harness`. Did you mean `test_harness`?
+error: unknown attribute `test-harness`
   --> $DIR/check-attr.rs:33:1
    |
 LL | / /// b
@@ -141,9 +150,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
   --> $DIR/check-attr.rs:33:1
    |
 LL | / /// b
@@ -155,9 +165,10 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
-error: unknown attribute `teSt_harness`. Did you mean `test_harness`?
+error: unknown attribute `teSt_harness`
   --> $DIR/check-attr.rs:33:1
    |
 LL | / /// b
@@ -169,7 +180,50 @@ LL | | /// boo
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
-error: aborting due to 12 previous errors
+error: unknown attribute `rust2018`
+  --> $DIR/check-attr.rs:43:1
+   |
+LL | / /// b
+LL | |
+LL | | ///
+LL | | /// ```rust2018
+LL | | /// boo
+LL | | /// ```
+   | |_______^
+   |
+   = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `rust2018`
+  --> $DIR/check-attr.rs:51:1
+   |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+   | |_______^
+   |
+   = help: there is an attribute with a similar name: `edition2018`
+
+error: unknown attribute `shouldpanic`
+  --> $DIR/check-attr.rs:51:1
+   |
+LL | / /// b
+LL | |
+LL | |
+LL | | ///
+LL | | /// ```rust2018 shouldpanic
+LL | | /// boo
+LL | | /// ```
+   | |_______^
+   |
+   = help: there is an attribute with a similar name: `should_panic`
+   = help: the code block will either not be tested if not marked as a rust one or won't fail if it doesn't panic when running
+
+error: aborting due to 15 previous errors
 
diff --git a/tests/rustdoc-ui/lints/check-fail.stderr b/tests/rustdoc-ui/lints/check-fail.stderr
index f05e457af64..99b01bac598 100644
--- a/tests/rustdoc-ui/lints/check-fail.stderr
+++ b/tests/rustdoc-ui/lints/check-fail.stderr
@@ -22,7 +22,7 @@ note: the lint level is defined here
 LL | #![deny(rustdoc::missing_doc_code_examples)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
   --> $DIR/check-fail.rs:8:1
    |
 LL | / //! ```rust,testharness
@@ -31,6 +31,7 @@ LL | | //! let x = 12;
 LL | | //! ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 note: the lint level is defined here
   --> $DIR/check-fail.rs:6:9
@@ -39,7 +40,7 @@ LL | #![deny(rustdoc::all)]
    |         ^^^^^^^^^^^^
    = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]`
 
-error: unknown attribute `testharness`. Did you mean `test_harness`?
+error: unknown attribute `testharness`
   --> $DIR/check-fail.rs:17:1
    |
 LL | / /// hello
@@ -50,6 +51,7 @@ LL | | /// let x = 12;
 LL | | /// ```
    | |_______^
    |
+   = help: there is an attribute with a similar name: `test_harness`
    = help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs
index 7282d09706c..fb478671754 100644
--- a/tests/ui/abi/stack-probes-lto.rs
+++ b/tests/ui/abi/stack-probes-lto.rs
@@ -1,5 +1,7 @@
-// revisions: x32 x64
+// revisions: aarch64 x32 x64
 // run-pass
+//[aarch64] only-aarch64
+//[aarch64] min-llvm-version: 18
 //[x32] only-x86
 //[x64] only-x86_64
 // ignore-sgx no processes
diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs
index 4b8a79a4b68..e5c7a1a6804 100644
--- a/tests/ui/abi/stack-probes.rs
+++ b/tests/ui/abi/stack-probes.rs
@@ -1,5 +1,7 @@
-// revisions: x32 x64
+// revisions: aarch64 x32 x64
 // run-pass
+//[aarch64] only-aarch64
+//[aarch64] min-llvm-version: 18
 //[x32] only-x86
 //[x64] only-x86_64
 // ignore-emscripten no processes
diff --git a/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr b/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
index 8ccfb212216..24fd38f31ad 100644
--- a/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-binding-only.elision.stderr
@@ -5,10 +5,15 @@ LL | fn elision<T: Fn() -> &i32>() {
    |                       ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn elision<T: Fn() -> &'static i32>() {
    |                        +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL - fn elision<T: Fn() -> &i32>() {
+LL + fn elision<T: Fn() -> i32>() {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr b/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
index 0593a62a750..d24378487e7 100644
--- a/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
+++ b/tests/ui/associated-types/bound-lifetime-in-return-only.elision.stderr
@@ -5,10 +5,15 @@ LL | fn elision(_: fn() -> &i32) {
    |                       ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn elision(_: fn() -> &'static i32) {
    |                        +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL - fn elision(_: fn() -> &i32) {
+LL + fn elision(_: fn() -> i32) {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
index b0447a58261..47b39e5246d 100644
--- a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
+++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
@@ -52,10 +52,16 @@ print-type-size     variant `Panicked`: 1024 bytes
 print-type-size         upvar `.arg`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<bool>`: 1 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 1 bytes
+print-type-size type: `std::mem::ManuallyDrop<{async fn body@$DIR/async-awaiting-fut.rs:6:17: 6:19}>`: 1 bytes, alignment: 1 bytes
+print-type-size     field `.value`: 1 bytes
 print-type-size type: `std::mem::MaybeUninit<bool>`: 1 bytes, alignment: 1 bytes
 print-type-size     variant `MaybeUninit`: 1 bytes
 print-type-size         field `.uninit`: 0 bytes
 print-type-size         field `.value`: 1 bytes
+print-type-size type: `std::mem::MaybeUninit<{async fn body@$DIR/async-awaiting-fut.rs:6:17: 6:19}>`: 1 bytes, alignment: 1 bytes
+print-type-size     variant `MaybeUninit`: 1 bytes
+print-type-size         field `.uninit`: 0 bytes
+print-type-size         field `.value`: 1 bytes
 print-type-size type: `std::task::Poll<()>`: 1 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Ready`: 0 bytes
diff --git a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
index 95731b67ccf..8e573b512ad 100644
--- a/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
+++ b/tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
@@ -1,7 +1,9 @@
-error[E0391]: cycle detected when computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`
+error[E0391]: cycle detected when computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`
    |
-   = note: ...which requires computing layout of `<<A as First>::Second as Second>::{opaque#0}`...
-   = note: ...which again requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`, completing the cycle
+   = note: ...which requires computing layout of `core::mem::manually_drop::ManuallyDrop<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`...
+   = note: ...which requires computing layout of `{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}`...
+   = note: ...which requires computing layout of `core::mem::maybe_uninit::MaybeUninit<<<A as First>::Second as Second>::{opaque#0}>`...
+   = note: ...which again requires computing layout of `core::mem::maybe_uninit::MaybeUninit<{async fn body@$DIR/indirect-recursion-issue-112047.rs:33:27: 35:6}>`, completing the cycle
    = note: cycle used when computing layout of `{async block@$DIR/indirect-recursion-issue-112047.rs:6:13: 8:6}`
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
diff --git a/tests/ui/attributes/issue-90873.rs b/tests/ui/attributes/issue-90873.rs
index 1411f61744d..53339ce7e28 100644
--- a/tests/ui/attributes/issue-90873.rs
+++ b/tests/ui/attributes/issue-90873.rs
@@ -1,9 +1,9 @@
 #![u=||{static d=||1;}]
-//~^ unexpected expression
+//~^ attribute value must be a literal
 //~| cannot find attribute `u` in this scope
 //~| missing type for `static` item
 
 #![a={impl std::ops::Neg for i8 {}}]
-//~^ ERROR unexpected expression
+//~^ ERROR attribute value must be a literal
 //~| ERROR cannot find attribute `a` in this scope
 //~| ERROR `main` function not found in crate `issue_90873`
diff --git a/tests/ui/attributes/issue-90873.stderr b/tests/ui/attributes/issue-90873.stderr
index 894ec8341f8..5a8bbaf8ec1 100644
--- a/tests/ui/attributes/issue-90873.stderr
+++ b/tests/ui/attributes/issue-90873.stderr
@@ -1,15 +1,10 @@
-error: unexpected expression: `||
-           {
-               static d: _ = || 1;
-           }`
+error: attribute value must be a literal
   --> $DIR/issue-90873.rs:1:6
    |
 LL | #![u=||{static d=||1;}]
    |      ^^^^^^^^^^^^^^^^^
 
-error: unexpected expression: `{
-           impl std::ops::Neg for i8 {}
-       }`
+error: attribute value must be a literal
   --> $DIR/issue-90873.rs:6:6
    |
 LL | #![a={impl std::ops::Neg for i8 {}}]
diff --git a/tests/ui/attributes/key-value-expansion-on-mac.rs b/tests/ui/attributes/key-value-expansion-on-mac.rs
index c1d68d8cda9..ea7cf7c4f64 100644
--- a/tests/ui/attributes/key-value-expansion-on-mac.rs
+++ b/tests/ui/attributes/key-value-expansion-on-mac.rs
@@ -7,8 +7,8 @@ macro_rules! bar {
 
 // FIXME?: `bar` here expands before `stringify` has a chance to expand.
 // `#[rustc_dummy = ...]` is validated and dropped during expansion of `bar`,
-// the "unexpected expression" errors comes from the validation.
-#[rustc_dummy = stringify!(b)] //~ ERROR unexpected expression: `stringify!(b)`
+// the "attribute value must be a literal" error comes from the validation.
+#[rustc_dummy = stringify!(b)] //~ ERROR attribute value must be a literal
 bar!();
 
 fn main() {}
diff --git a/tests/ui/attributes/key-value-expansion-on-mac.stderr b/tests/ui/attributes/key-value-expansion-on-mac.stderr
index 7d817da1362..260462cfeef 100644
--- a/tests/ui/attributes/key-value-expansion-on-mac.stderr
+++ b/tests/ui/attributes/key-value-expansion-on-mac.stderr
@@ -1,4 +1,4 @@
-error: unexpected expression: `stringify!(b)`
+error: attribute value must be a literal
   --> $DIR/key-value-expansion-on-mac.rs:11:17
    |
 LL | #[rustc_dummy = stringify!(b)]
diff --git a/tests/ui/attributes/key-value-expansion.rs b/tests/ui/attributes/key-value-expansion.rs
index 83d601e5e3a..3065c12749c 100644
--- a/tests/ui/attributes/key-value-expansion.rs
+++ b/tests/ui/attributes/key-value-expansion.rs
@@ -18,13 +18,13 @@ macro_rules! bug {
 
 // Any expressions containing macro call `X` that's more complex than `X` itself.
 // Parentheses will work.
-bug!((column!())); //~ ERROR unexpected expression: `(7u32)`
+bug!((column!())); //~ ERROR attribute value must be a literal
 
 // Original test case.
 
 macro_rules! bug {
     () => {
-        bug!("bug" + stringify!(found)); //~ ERROR unexpected expression: `"bug" + "found"`
+        bug!("bug" + stringify!(found)); //~ ERROR attribute value must be a literal
     };
     ($test:expr) => {
         #[doc = $test]
@@ -46,7 +46,7 @@ macro_rules! doc_comment {
 macro_rules! some_macro {
     ($t1: ty) => {
         doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}
-        //~^ ERROR unexpected expression: `{
+        //~^ ERROR attribute value must be a literal
     };
 }
 
diff --git a/tests/ui/attributes/key-value-expansion.stderr b/tests/ui/attributes/key-value-expansion.stderr
index aaa8b169583..54d79c5bebb 100644
--- a/tests/ui/attributes/key-value-expansion.stderr
+++ b/tests/ui/attributes/key-value-expansion.stderr
@@ -1,10 +1,10 @@
-error: unexpected expression: `(7u32)`
+error: attribute value must be a literal
   --> $DIR/key-value-expansion.rs:21:6
    |
 LL | bug!((column!()));
    |      ^^^^^^^^^^^
 
-error: unexpected expression: `"bug" + "found"`
+error: attribute value must be a literal
   --> $DIR/key-value-expansion.rs:27:14
    |
 LL |         bug!("bug" + stringify!(found));
@@ -15,7 +15,7 @@ LL | bug!();
    |
    = note: this error originates in the macro `bug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: unexpected expression: `{ let res = ::alloc::fmt::format(format_args!("{0}", "u8")); res }.as_str()`
+error: attribute value must be a literal
   --> $DIR/key-value-expansion.rs:48:23
    |
 LL |         doc_comment! {format!("{coor}", coor = stringify!($t1)).as_str()}
diff --git a/tests/ui/attributes/unused-item-in-attr.rs b/tests/ui/attributes/unused-item-in-attr.rs
index 70dcd5413f1..fda0a5d6a3f 100644
--- a/tests/ui/attributes/unused-item-in-attr.rs
+++ b/tests/ui/attributes/unused-item-in-attr.rs
@@ -1,5 +1,5 @@
 #[w = { extern crate alloc; }]
-//~^ ERROR unexpected expression: `{
+//~^ ERROR attribute value must be a literal
 //~| ERROR cannot find attribute `w` in this scope
 fn f() {}
 
diff --git a/tests/ui/attributes/unused-item-in-attr.stderr b/tests/ui/attributes/unused-item-in-attr.stderr
index 92a8f585821..84130965d31 100644
--- a/tests/ui/attributes/unused-item-in-attr.stderr
+++ b/tests/ui/attributes/unused-item-in-attr.stderr
@@ -1,6 +1,4 @@
-error: unexpected expression: `{
-           extern crate alloc;
-       }`
+error: attribute value must be a literal
   --> $DIR/unused-item-in-attr.rs:1:7
    |
 LL | #[w = { extern crate alloc; }]
diff --git a/tests/ui/c-variadic/variadic-ffi-6.stderr b/tests/ui/c-variadic/variadic-ffi-6.stderr
index 1ceff570478..344bfed4b42 100644
--- a/tests/ui/c-variadic/variadic-ffi-6.stderr
+++ b/tests/ui/c-variadic/variadic-ffi-6.stderr
@@ -5,10 +5,19 @@ LL | ) -> &usize {
    |      ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | ) -> &'static usize {
    |       +++++++
+help: instead, you are more likely to want to change one of the arguments to be borrowed...
+   |
+LL |     x: &usize,
+   |        +
+help: ...or alternatively, you might want to return an owned value
+   |
+LL - ) -> &usize {
+LL + ) -> usize {
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/check-cfg/allow-same-level.stderr b/tests/ui/check-cfg/allow-same-level.stderr
index 652efc3f591..7f0faa0700d 100644
--- a/tests/ui/check-cfg/allow-same-level.stderr
+++ b/tests/ui/check-cfg/allow-same-level.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(FALSE)]
    |       ^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(FALSE)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/cargo-feature.none.stderr b/tests/ui/check-cfg/cargo-feature.none.stderr
new file mode 100644
index 00000000000..44c8f7e3072
--- /dev/null
+++ b/tests/ui/check-cfg/cargo-feature.none.stderr
@@ -0,0 +1,31 @@
+warning: unexpected `cfg` condition name: `feature`
+  --> $DIR/cargo-feature.rs:13:7
+   |
+LL | #[cfg(feature = "serde")]
+   |       ^^^^^^^^^^^^^^^^^
+   |
+   = help: consider defining some features in `Cargo.toml`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `tokio_unstable`
+  --> $DIR/cargo-feature.rs:18:7
+   |
+LL | #[cfg(tokio_unstable)]
+   |       ^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(tokio_unstable)");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `CONFIG_NVME`
+  --> $DIR/cargo-feature.rs:22:7
+   |
+LL | #[cfg(CONFIG_NVME = "m")]
+   |       ^^^^^^^^^^^^^^^^^
+   |
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(CONFIG_NVME, values(\"m\"))");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/cargo-feature.rs b/tests/ui/check-cfg/cargo-feature.rs
index ea48c6ea201..fe343d0a678 100644
--- a/tests/ui/check-cfg/cargo-feature.rs
+++ b/tests/ui/check-cfg/cargo-feature.rs
@@ -3,12 +3,25 @@
 // list of all the expected names
 //
 // check-pass
+// revisions: some none
 // rustc-env:CARGO=/usr/bin/cargo
 // compile-flags: --check-cfg=cfg() -Z unstable-options
-// error-pattern:Cargo.toml
+// [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
+// [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))
+// [none]error-pattern:Cargo.toml
 
 #[cfg(feature = "serde")]
-//~^ WARNING unexpected `cfg` condition name
+//[none]~^ WARNING unexpected `cfg` condition name
+//[some]~^^ WARNING unexpected `cfg` condition value
 fn ser() {}
 
+#[cfg(tokio_unstable)]
+//~^ WARNING unexpected `cfg` condition name
+fn tokio() {}
+
+#[cfg(CONFIG_NVME = "m")]
+//[none]~^ WARNING unexpected `cfg` condition name
+//[some]~^^ WARNING unexpected `cfg` condition value
+fn tokio() {}
+
 fn main() {}
diff --git a/tests/ui/check-cfg/cargo-feature.some.stderr b/tests/ui/check-cfg/cargo-feature.some.stderr
new file mode 100644
index 00000000000..92d63d01534
--- /dev/null
+++ b/tests/ui/check-cfg/cargo-feature.some.stderr
@@ -0,0 +1,35 @@
+warning: unexpected `cfg` condition value: `serde`
+  --> $DIR/cargo-feature.rs:13:7
+   |
+LL | #[cfg(feature = "serde")]
+   |       ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `bitcode`
+   = help: consider adding `serde` as a feature in `Cargo.toml`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `tokio_unstable`
+  --> $DIR/cargo-feature.rs:18:7
+   |
+LL | #[cfg(tokio_unstable)]
+   |       ^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `CONFIG_NVME`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(tokio_unstable)");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition value: `m`
+  --> $DIR/cargo-feature.rs:22:7
+   |
+LL | #[cfg(CONFIG_NVME = "m")]
+   |       ^^^^^^^^^^^^^^---
+   |                     |
+   |                     help: there is a expected value with a similar name: `"y"`
+   |
+   = note: expected values for `CONFIG_NVME` are: `y`
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(CONFIG_NVME, values(\"m\"))");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/cargo-feature.stderr b/tests/ui/check-cfg/cargo-feature.stderr
deleted file mode 100644
index 619410a28f3..00000000000
--- a/tests/ui/check-cfg/cargo-feature.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: unexpected `cfg` condition name: `feature`
-  --> $DIR/cargo-feature.rs:10:7
-   |
-LL | #[cfg(feature = "serde")]
-   |       ^^^^^^^^^^^^^^^^^
-   |
-   = help: consider defining some features in `Cargo.toml`
-   = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/check-cfg/compact-names.stderr b/tests/ui/check-cfg/compact-names.stderr
index d3bfb9f7100..dfa26f5dde0 100644
--- a/tests/ui/check-cfg/compact-names.stderr
+++ b/tests/ui/check-cfg/compact-names.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(target(os = "linux", architecture = "arm"))]
    |                            ^^^^^^^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/compact-values.stderr b/tests/ui/check-cfg/compact-values.stderr
index 819b789c3e5..10276af4d8f 100644
--- a/tests/ui/check-cfg/compact-values.stderr
+++ b/tests/ui/check-cfg/compact-values.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(target(os = "linux", pointer_width = "X"))]
    |                            ^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_pointer_width` are: `16`, `32`, `64`
+   = help: to expect this configuration use `--check-cfg=cfg(target_pointer_width, values("X"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/concat-values.stderr b/tests/ui/check-cfg/concat-values.stderr
index da2bd7d6ad9..dec43f5bda3 100644
--- a/tests/ui/check-cfg/concat-values.stderr
+++ b/tests/ui/check-cfg/concat-values.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(my_cfg)]
    |       ^^^^^^
    |
    = note: expected values for `my_cfg` are: `bar`, `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(my_cfg)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `unk`
@@ -14,6 +16,8 @@ LL | #[cfg(my_cfg = "unk")]
    |       ^^^^^^^^^^^^^^
    |
    = note: expected values for `my_cfg` are: `bar`, `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(my_cfg, values("unk"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/check-cfg/diagnotics.cargo.stderr b/tests/ui/check-cfg/diagnotics.cargo.stderr
new file mode 100644
index 00000000000..05c52bf59fa
--- /dev/null
+++ b/tests/ui/check-cfg/diagnotics.cargo.stderr
@@ -0,0 +1,71 @@
+warning: unexpected `cfg` condition name: `featur`
+  --> $DIR/diagnotics.rs:7:7
+   |
+LL | #[cfg(featur)]
+   |       ^^^^^^ help: there is a config with a similar name: `feature`
+   |
+   = help: expected values for `feature` are: `foo`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `featur`
+  --> $DIR/diagnotics.rs:11:7
+   |
+LL | #[cfg(featur = "foo")]
+   |       ^^^^^^^^^^^^^^
+   |
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+help: there is a config with a similar name and value
+   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~
+
+warning: unexpected `cfg` condition name: `featur`
+  --> $DIR/diagnotics.rs:15:7
+   |
+LL | #[cfg(featur = "fo")]
+   |       ^^^^^^^^^^^^^
+   |
+   = help: expected values for `feature` are: `foo`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+help: there is a config with a similar name and different values
+   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~~~~~~~~~
+
+warning: unexpected `cfg` condition name: `no_value`
+  --> $DIR/diagnotics.rs:22:7
+   |
+LL | #[cfg(no_value)]
+   |       ^^^^^^^^ help: there is a config with a similar name: `no_values`
+   |
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_value)");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `no_value`
+  --> $DIR/diagnotics.rs:26:7
+   |
+LL | #[cfg(no_value = "foo")]
+   |       ^^^^^^^^^^^^^^^^
+   |
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_value, values(\"foo\"))");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+help: there is a config with a similar name and no value
+   |
+LL | #[cfg(no_values)]
+   |       ~~~~~~~~~
+
+warning: unexpected `cfg` condition value: `bar`
+  --> $DIR/diagnotics.rs:30:7
+   |
+LL | #[cfg(no_values = "bar")]
+   |       ^^^^^^^^^--------
+   |                |
+   |                help: remove the value
+   |
+   = note: no expected value for `no_values`
+   = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(no_values, values(\"bar\"))");` to the top of a `build.rs`
+   = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs
index 45875bddc17..33073f05f69 100644
--- a/tests/ui/check-cfg/diagnotics.rs
+++ b/tests/ui/check-cfg/diagnotics.rs
@@ -1,4 +1,7 @@
 // check-pass
+// revisions: cargo rustc
+// [rustc]unset-rustc-env:CARGO
+// [cargo]rustc-env:CARGO=/usr/bin/cargo
 // compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options
 
 #[cfg(featur)]
diff --git a/tests/ui/check-cfg/diagnotics.rustc.stderr b/tests/ui/check-cfg/diagnotics.rustc.stderr
new file mode 100644
index 00000000000..2b1129a3920
--- /dev/null
+++ b/tests/ui/check-cfg/diagnotics.rustc.stderr
@@ -0,0 +1,74 @@
+warning: unexpected `cfg` condition name: `featur`
+  --> $DIR/diagnotics.rs:7:7
+   |
+LL | #[cfg(featur)]
+   |       ^^^^^^ help: there is a config with a similar name: `feature`
+   |
+   = help: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(featur)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name: `featur`
+  --> $DIR/diagnotics.rs:11:7
+   |
+LL | #[cfg(featur = "foo")]
+   |       ^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(featur, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+help: there is a config with a similar name and value
+   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~
+
+warning: unexpected `cfg` condition name: `featur`
+  --> $DIR/diagnotics.rs:15:7
+   |
+LL | #[cfg(featur = "fo")]
+   |       ^^^^^^^^^^^^^
+   |
+   = help: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(featur, values("fo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+help: there is a config with a similar name and different values
+   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~~~~~~~~~
+
+warning: unexpected `cfg` condition name: `no_value`
+  --> $DIR/diagnotics.rs:22:7
+   |
+LL | #[cfg(no_value)]
+   |       ^^^^^^^^ help: there is a config with a similar name: `no_values`
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(no_value)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: unexpected `cfg` condition name: `no_value`
+  --> $DIR/diagnotics.rs:26:7
+   |
+LL | #[cfg(no_value = "foo")]
+   |       ^^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(no_value, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+help: there is a config with a similar name and no value
+   |
+LL | #[cfg(no_values)]
+   |       ~~~~~~~~~
+
+warning: unexpected `cfg` condition value: `bar`
+  --> $DIR/diagnotics.rs:30:7
+   |
+LL | #[cfg(no_values = "bar")]
+   |       ^^^^^^^^^--------
+   |                |
+   |                help: remove the value
+   |
+   = note: no expected value for `no_values`
+   = help: to expect this configuration use `--check-cfg=cfg(no_values, values("bar"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/check-cfg/diagnotics.stderr b/tests/ui/check-cfg/diagnotics.stderr
deleted file mode 100644
index 31c0db03a7e..00000000000
--- a/tests/ui/check-cfg/diagnotics.stderr
+++ /dev/null
@@ -1,61 +0,0 @@
-warning: unexpected `cfg` condition name: `featur`
-  --> $DIR/diagnotics.rs:4:7
-   |
-LL | #[cfg(featur)]
-   |       ^^^^^^ help: there is a config with a similar name: `feature`
-   |
-   = help: expected values for `feature` are: `foo`
-   = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition name: `featur`
-  --> $DIR/diagnotics.rs:8:7
-   |
-LL | #[cfg(featur = "foo")]
-   |       ^^^^^^^^^^^^^^
-   |
-help: there is a config with a similar name and value
-   |
-LL | #[cfg(feature = "foo")]
-   |       ~~~~~~~
-
-warning: unexpected `cfg` condition name: `featur`
-  --> $DIR/diagnotics.rs:12:7
-   |
-LL | #[cfg(featur = "fo")]
-   |       ^^^^^^^^^^^^^
-   |
-   = help: expected values for `feature` are: `foo`
-help: there is a config with a similar name and different values
-   |
-LL | #[cfg(feature = "foo")]
-   |       ~~~~~~~~~~~~~~~
-
-warning: unexpected `cfg` condition name: `no_value`
-  --> $DIR/diagnotics.rs:19:7
-   |
-LL | #[cfg(no_value)]
-   |       ^^^^^^^^ help: there is a config with a similar name: `no_values`
-
-warning: unexpected `cfg` condition name: `no_value`
-  --> $DIR/diagnotics.rs:23:7
-   |
-LL | #[cfg(no_value = "foo")]
-   |       ^^^^^^^^^^^^^^^^
-   |
-help: there is a config with a similar name and no value
-   |
-LL | #[cfg(no_values)]
-   |       ~~~~~~~~~
-
-warning: unexpected `cfg` condition value: `bar`
-  --> $DIR/diagnotics.rs:27:7
-   |
-LL | #[cfg(no_values = "bar")]
-   |       ^^^^^^^^^--------
-   |                |
-   |                help: remove the value
-   |
-   = note: no expected value for `no_values`
-
-warning: 6 warnings emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
index 9501c134bac..27af8212026 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `value`
@@ -16,18 +18,26 @@ LL | #[cfg(test = "value")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `feature`
   --> $DIR/exhaustive-names-values.rs:18:7
    |
 LL | #[cfg(feature = "unk")]
    |       ^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `feature`
   --> $DIR/exhaustive-names-values.rs:25:7
    |
 LL | #[cfg(feature = "std")]
    |       ^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("std"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 4 warnings emitted
 
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr
deleted file mode 100644
index e37a222f52a..00000000000
--- a/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr
+++ /dev/null
@@ -1,33 +0,0 @@
-warning: unexpected `cfg` condition name: `unknown_key`
-  --> $DIR/exhaustive-names-values.rs:11:7
-   |
-LL | #[cfg(unknown_key = "value")]
-   |       ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
-   = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `value`
-  --> $DIR/exhaustive-names-values.rs:15:7
-   |
-LL | #[cfg(test = "value")]
-   |       ^^^^----------
-   |           |
-   |           help: remove the value
-   |
-   = note: no expected value for `test`
-
-warning: unexpected `cfg` condition name: `feature`
-  --> $DIR/exhaustive-names-values.rs:19:7
-   |
-LL | #[cfg(feature = "unk")]
-   |       ^^^^^^^^^^^^^^^
-
-warning: unexpected `cfg` condition name: `feature`
-  --> $DIR/exhaustive-names-values.rs:26:7
-   |
-LL | #[cfg(feature = "std")]
-   |       ^^^^^^^^^^^^^^^
-
-warning: 4 warnings emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
index ea204eaff1b..a5aa80ef8e5 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `value`
@@ -16,6 +18,8 @@ LL | #[cfg(test = "value")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `unk`
   --> $DIR/exhaustive-names-values.rs:18:7
@@ -24,6 +28,8 @@ LL | #[cfg(feature = "unk")]
    |       ^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `std`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 3 warnings emitted
 
diff --git a/tests/ui/check-cfg/exhaustive-names-values.full.stderr b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
index ea204eaff1b..a5aa80ef8e5 100644
--- a/tests/ui/check-cfg/exhaustive-names-values.full.stderr
+++ b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `value`
@@ -16,6 +18,8 @@ LL | #[cfg(test = "value")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `unk`
   --> $DIR/exhaustive-names-values.rs:18:7
@@ -24,6 +28,8 @@ LL | #[cfg(feature = "unk")]
    |       ^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `std`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 3 warnings emitted
 
diff --git a/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr b/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr
deleted file mode 100644
index b5c8cad275f..00000000000
--- a/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: unexpected `cfg` condition name: `unknown_key`
-  --> $DIR/exhaustive-names.rs:8:7
-   |
-LL | #[cfg(unknown_key = "value")]
-   |       ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
-   = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/check-cfg/exhaustive-names.stderr b/tests/ui/check-cfg/exhaustive-names.stderr
index c5f6d537c5e..cfac28cd9b9 100644
--- a/tests/ui/check-cfg/exhaustive-names.stderr
+++ b/tests/ui/check-cfg/exhaustive-names.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(unknown_key = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
index 745646bda1c..0a7bd81b8aa 100644
--- a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
+++ b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
@@ -7,6 +7,8 @@ LL | #[cfg(test = "value")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/exhaustive-values.without_names.stderr b/tests/ui/check-cfg/exhaustive-values.without_names.stderr
index 745646bda1c..0a7bd81b8aa 100644
--- a/tests/ui/check-cfg/exhaustive-values.without_names.stderr
+++ b/tests/ui/check-cfg/exhaustive-values.without_names.stderr
@@ -7,6 +7,8 @@ LL | #[cfg(test = "value")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("value"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/mix.cfg.stderr b/tests/ui/check-cfg/mix.cfg.stderr
deleted file mode 100644
index 046d40f36b0..00000000000
--- a/tests/ui/check-cfg/mix.cfg.stderr
+++ /dev/null
@@ -1,184 +0,0 @@
-warning: unexpected `cfg` condition name: `widnows`
-  --> $DIR/mix.rs:15:7
-   |
-LL | #[cfg(widnows)]
-   |       ^^^^^^^ help: there is a config with a similar name: `windows`
-   |
-   = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: (none)
-  --> $DIR/mix.rs:19:7
-   |
-LL | #[cfg(feature)]
-   |       ^^^^^^^- help: specify a config value: `= "foo"`
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `bar`
-  --> $DIR/mix.rs:26:7
-   |
-LL | #[cfg(feature = "bar")]
-   |       ^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:30:7
-   |
-LL | #[cfg(feature = "zebra")]
-   |       ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `uu`
-  --> $DIR/mix.rs:34:12
-   |
-LL | #[cfg_attr(uu, test)]
-   |            ^^
-   |
-   = help: expected names are: `cfg`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `names_values`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
-
-warning: unexpected `cfg` condition name: `widnows`
-  --> $DIR/mix.rs:43:10
-   |
-LL |     cfg!(widnows);
-   |          ^^^^^^^ help: there is a config with a similar name: `windows`
-
-warning: unexpected `cfg` condition value: `bar`
-  --> $DIR/mix.rs:46:10
-   |
-LL |     cfg!(feature = "bar");
-   |          ^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:48:10
-   |
-LL |     cfg!(feature = "zebra");
-   |          ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:50:10
-   |
-LL |     cfg!(xxx = "foo");
-   |          ^^^^^^^^^^^
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:52:10
-   |
-LL |     cfg!(xxx);
-   |          ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:54:14
-   |
-LL |     cfg!(any(xxx, windows));
-   |              ^^^
-
-warning: unexpected `cfg` condition value: `bad`
-  --> $DIR/mix.rs:56:14
-   |
-LL |     cfg!(any(feature = "bad", windows));
-   |              ^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:58:23
-   |
-LL |     cfg!(any(windows, xxx));
-   |                       ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:60:20
-   |
-LL |     cfg!(all(unix, xxx));
-   |                    ^^^
-
-warning: unexpected `cfg` condition name: `aa`
-  --> $DIR/mix.rs:62:14
-   |
-LL |     cfg!(all(aa, bb));
-   |              ^^
-
-warning: unexpected `cfg` condition name: `bb`
-  --> $DIR/mix.rs:62:18
-   |
-LL |     cfg!(all(aa, bb));
-   |                  ^^
-
-warning: unexpected `cfg` condition name: `aa`
-  --> $DIR/mix.rs:65:14
-   |
-LL |     cfg!(any(aa, bb));
-   |              ^^
-
-warning: unexpected `cfg` condition name: `bb`
-  --> $DIR/mix.rs:65:18
-   |
-LL |     cfg!(any(aa, bb));
-   |                  ^^
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:68:20
-   |
-LL |     cfg!(any(unix, feature = "zebra"));
-   |                    ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:70:14
-   |
-LL |     cfg!(any(xxx, feature = "zebra"));
-   |              ^^^
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:70:19
-   |
-LL |     cfg!(any(xxx, feature = "zebra"));
-   |                   ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:73:14
-   |
-LL |     cfg!(any(xxx, unix, xxx));
-   |              ^^^
-
-warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:73:25
-   |
-LL |     cfg!(any(xxx, unix, xxx));
-   |                         ^^^
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:76:14
-   |
-LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
-   |              ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:76:33
-   |
-LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
-   |                                 ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:76:52
-   |
-LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
-   |                                                    ^^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `foo`
-
-warning: 26 warnings emitted
-
diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.stderr
index 25b8f95ae2f..39660a2fd6e 100644
--- a/tests/ui/check-cfg/mix.stderr
+++ b/tests/ui/check-cfg/mix.stderr
@@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `widnows`
 LL | #[cfg(widnows)]
    |       ^^^^^^^ help: there is a config with a similar name: `windows`
    |
+   = help: to expect this configuration use `--check-cfg=cfg(widnows)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: (none)
@@ -13,6 +15,8 @@ LL | #[cfg(feature)]
    |       ^^^^^^^- help: specify a config value: `= "foo"`
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `bar`
   --> $DIR/mix.rs:23:7
@@ -21,6 +25,8 @@ LL | #[cfg(feature = "bar")]
    |       ^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:27:7
@@ -29,6 +35,8 @@ LL | #[cfg(feature = "zebra")]
    |       ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `uu`
   --> $DIR/mix.rs:31:12
@@ -37,12 +45,17 @@ LL | #[cfg_attr(uu, test)]
    |            ^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(uu)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `widnows`
   --> $DIR/mix.rs:40:10
    |
 LL |     cfg!(widnows);
    |          ^^^^^^^ help: there is a config with a similar name: `windows`
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(widnows)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `bar`
   --> $DIR/mix.rs:43:10
@@ -51,6 +64,8 @@ LL |     cfg!(feature = "bar");
    |          ^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:45:10
@@ -59,24 +74,35 @@ LL |     cfg!(feature = "zebra");
    |          ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:47:10
    |
 LL |     cfg!(xxx = "foo");
    |          ^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:49:10
    |
 LL |     cfg!(xxx);
    |          ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:51:14
    |
 LL |     cfg!(any(xxx, windows));
    |              ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `bad`
   --> $DIR/mix.rs:53:14
@@ -85,42 +111,62 @@ LL |     cfg!(any(feature = "bad", windows));
    |              ^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("bad"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:55:23
    |
 LL |     cfg!(any(windows, xxx));
    |                       ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:57:20
    |
 LL |     cfg!(all(unix, xxx));
    |                    ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `aa`
   --> $DIR/mix.rs:59:14
    |
 LL |     cfg!(all(aa, bb));
    |              ^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(aa)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `bb`
   --> $DIR/mix.rs:59:18
    |
 LL |     cfg!(all(aa, bb));
    |                  ^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(bb)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `aa`
   --> $DIR/mix.rs:62:14
    |
 LL |     cfg!(any(aa, bb));
    |              ^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(aa)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `bb`
   --> $DIR/mix.rs:62:18
    |
 LL |     cfg!(any(aa, bb));
    |                  ^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(bb)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:65:20
@@ -129,12 +175,17 @@ LL |     cfg!(any(unix, feature = "zebra"));
    |                    ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:67:14
    |
 LL |     cfg!(any(xxx, feature = "zebra"));
    |              ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:67:19
@@ -143,18 +194,26 @@ LL |     cfg!(any(xxx, feature = "zebra"));
    |                   ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:70:14
    |
 LL |     cfg!(any(xxx, unix, xxx));
    |              ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `xxx`
   --> $DIR/mix.rs:70:25
    |
 LL |     cfg!(any(xxx, unix, xxx));
    |                         ^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(xxx)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:73:14
@@ -163,6 +222,8 @@ LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |              ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:73:33
@@ -171,6 +232,8 @@ LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |                                 ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `zebra`
   --> $DIR/mix.rs:73:52
@@ -179,6 +242,8 @@ LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |                                                    ^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `foo`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 26 warnings emitted
 
diff --git a/tests/ui/check-cfg/no-expected-values.empty.stderr b/tests/ui/check-cfg/no-expected-values.empty.stderr
index 0969d61dd40..ae55c95c0b1 100644
--- a/tests/ui/check-cfg/no-expected-values.empty.stderr
+++ b/tests/ui/check-cfg/no-expected-values.empty.stderr
@@ -7,6 +7,8 @@ LL | #[cfg(feature = "foo")]
    |              help: remove the value
    |
    = note: no expected value for `feature`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `foo`
@@ -18,6 +20,8 @@ LL | #[cfg(test = "foo")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/check-cfg/no-expected-values.mixed.stderr b/tests/ui/check-cfg/no-expected-values.mixed.stderr
index 0969d61dd40..ae55c95c0b1 100644
--- a/tests/ui/check-cfg/no-expected-values.mixed.stderr
+++ b/tests/ui/check-cfg/no-expected-values.mixed.stderr
@@ -7,6 +7,8 @@ LL | #[cfg(feature = "foo")]
    |              help: remove the value
    |
    = note: no expected value for `feature`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `foo`
@@ -18,6 +20,8 @@ LL | #[cfg(test = "foo")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/check-cfg/no-expected-values.simple.stderr b/tests/ui/check-cfg/no-expected-values.simple.stderr
index 0969d61dd40..ae55c95c0b1 100644
--- a/tests/ui/check-cfg/no-expected-values.simple.stderr
+++ b/tests/ui/check-cfg/no-expected-values.simple.stderr
@@ -7,6 +7,8 @@ LL | #[cfg(feature = "foo")]
    |              help: remove the value
    |
    = note: no expected value for `feature`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `foo`
@@ -18,6 +20,8 @@ LL | #[cfg(test = "foo")]
    |           help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/check-cfg/order-independant.values_after.stderr b/tests/ui/check-cfg/order-independant.values_after.stderr
index ed162fb5489..d1de26ba303 100644
--- a/tests/ui/check-cfg/order-independant.values_after.stderr
+++ b/tests/ui/check-cfg/order-independant.values_after.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(a = "unk")]
    |       ^^^^^^^^^
    |
    = note: expected values for `a` are: (none), `b`
+   = help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/order-independant.values_before.stderr b/tests/ui/check-cfg/order-independant.values_before.stderr
index ed162fb5489..d1de26ba303 100644
--- a/tests/ui/check-cfg/order-independant.values_before.stderr
+++ b/tests/ui/check-cfg/order-independant.values_before.stderr
@@ -5,6 +5,8 @@ LL | #[cfg(a = "unk")]
    |       ^^^^^^^^^
    |
    = note: expected values for `a` are: (none), `b`
+   = help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/stmt-no-ice.stderr b/tests/ui/check-cfg/stmt-no-ice.stderr
index c2483fe4a06..112367606dc 100644
--- a/tests/ui/check-cfg/stmt-no-ice.stderr
+++ b/tests/ui/check-cfg/stmt-no-ice.stderr
@@ -5,6 +5,8 @@ LL |     #[cfg(crossbeam_loom)]
    |           ^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.stderr b/tests/ui/check-cfg/unexpected-cfg-name.stderr
index 0874ccfc461..8748b324fb6 100644
--- a/tests/ui/check-cfg/unexpected-cfg-name.stderr
+++ b/tests/ui/check-cfg/unexpected-cfg-name.stderr
@@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `widnows`
 LL | #[cfg(widnows)]
    |       ^^^^^^^ help: there is a config with a similar name: `windows`
    |
+   = help: to expect this configuration use `--check-cfg=cfg(widnows)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr b/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr
deleted file mode 100644
index 2855aa75966..00000000000
--- a/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-warning: unexpected `cfg` condition value: `sedre`
-  --> $DIR/unexpected-cfg-value.rs:9:7
-   |
-LL | #[cfg(feature = "sedre")]
-   |       ^^^^^^^^^^-------
-   |                 |
-   |                 help: there is a expected value with a similar name: `"serde"`
-   |
-   = note: expected values for `feature` are: `full`, `serde`
-   = note: `#[warn(unexpected_cfgs)]` on by default
-
-warning: unexpected `cfg` condition value: `rand`
-  --> $DIR/unexpected-cfg-value.rs:16:7
-   |
-LL | #[cfg(feature = "rand")]
-   |       ^^^^^^^^^^^^^^^^
-   |
-   = note: expected values for `feature` are: `full`, `serde`
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.stderr b/tests/ui/check-cfg/unexpected-cfg-value.stderr
index 31c473a08cb..e5435d37670 100644
--- a/tests/ui/check-cfg/unexpected-cfg-value.stderr
+++ b/tests/ui/check-cfg/unexpected-cfg-value.stderr
@@ -7,6 +7,8 @@ LL | #[cfg(feature = "sedre")]
    |                 help: there is a expected value with a similar name: `"serde"`
    |
    = note: expected values for `feature` are: `full`, `serde`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("sedre"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `rand`
@@ -16,6 +18,8 @@ LL | #[cfg(feature = "rand")]
    |       ^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `full`, `serde`
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("rand"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/check-cfg/well-known-names.stderr b/tests/ui/check-cfg/well-known-names.stderr
index 6040663074d..763ba4646c3 100644
--- a/tests/ui/check-cfg/well-known-names.stderr
+++ b/tests/ui/check-cfg/well-known-names.stderr
@@ -4,6 +4,8 @@ warning: unexpected `cfg` condition name: `target_oz`
 LL | #[cfg(target_oz = "linux")]
    |       ^^^^^^^^^^^^^^^^^^^
    |
+   = help: to expect this configuration use `--check-cfg=cfg(target_oz, values("linux"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 help: there is a config with a similar name and value
    |
@@ -17,18 +19,26 @@ LL | #[cfg(features = "foo")]
    |       ^^^^^^^^^^^^^^^^
    |
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(features, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `feature`
   --> $DIR/well-known-names.rs:17:7
    |
 LL | #[cfg(feature = "foo")]
    |       ^^^^^^^^^^^^^^^
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition name: `uniw`
   --> $DIR/well-known-names.rs:21:7
    |
 LL | #[cfg(uniw)]
    |       ^^^^ help: there is a config with a similar name: `unix`
+   |
+   = help: to expect this configuration use `--check-cfg=cfg(uniw)`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 4 warnings emitted
 
diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
index a6b9c75a142..1e92639fd11 100644
--- a/tests/ui/check-cfg/well-known-values.stderr
+++ b/tests/ui/check-cfg/well-known-values.stderr
@@ -7,6 +7,8 @@ LL |     debug_assertions = "_UNEXPECTED_VALUE",
    |                     help: remove the value
    |
    = note: no expected value for `debug_assertions`
+   = help: to expect this configuration use `--check-cfg=cfg(debug_assertions, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
@@ -18,6 +20,8 @@ LL |     doc = "_UNEXPECTED_VALUE",
    |        help: remove the value
    |
    = note: no expected value for `doc`
+   = help: to expect this configuration use `--check-cfg=cfg(doc, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:30:5
@@ -28,6 +32,8 @@ LL |     doctest = "_UNEXPECTED_VALUE",
    |            help: remove the value
    |
    = note: no expected value for `doctest`
+   = help: to expect this configuration use `--check-cfg=cfg(doctest, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:32:5
@@ -38,6 +44,8 @@ LL |     miri = "_UNEXPECTED_VALUE",
    |         help: remove the value
    |
    = note: no expected value for `miri`
+   = help: to expect this configuration use `--check-cfg=cfg(miri, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:34:5
@@ -48,6 +56,8 @@ LL |     overflow_checks = "_UNEXPECTED_VALUE",
    |                    help: remove the value
    |
    = note: no expected value for `overflow_checks`
+   = help: to expect this configuration use `--check-cfg=cfg(overflow_checks, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:36:5
@@ -56,6 +66,8 @@ LL |     panic = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `panic` are: `abort`, `unwind`
+   = help: to expect this configuration use `--check-cfg=cfg(panic, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:38:5
@@ -66,6 +78,8 @@ LL |     proc_macro = "_UNEXPECTED_VALUE",
    |               help: remove the value
    |
    = note: no expected value for `proc_macro`
+   = help: to expect this configuration use `--check-cfg=cfg(proc_macro, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:40:5
@@ -74,6 +88,8 @@ LL |     relocation_model = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `relocation_model` are: `dynamic-no-pic`, `pic`, `pie`, `ropi`, `ropi-rwpi`, `rwpi`, `static`
+   = help: to expect this configuration use `--check-cfg=cfg(relocation_model, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:42:5
@@ -82,6 +98,8 @@ LL |     sanitize = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `sanitize` are: `address`, `cfi`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread`
+   = help: to expect this configuration use `--check-cfg=cfg(sanitize, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:44:5
@@ -90,6 +108,8 @@ LL |     target_abi = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `elf`, `fortanix`, `ilp32`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, `x32`
+   = help: to expect this configuration use `--check-cfg=cfg(target_abi, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:46:5
@@ -98,6 +118,8 @@ LL |     target_arch = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_arch` are: `aarch64`, `arm`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64`
+   = help: to expect this configuration use `--check-cfg=cfg(target_arch, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:48:5
@@ -106,6 +128,8 @@ LL |     target_endian = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_endian` are: `big`, `little`
+   = help: to expect this configuration use `--check-cfg=cfg(target_endian, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:50:5
@@ -114,6 +138,8 @@ LL |     target_env = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_env` are: ``, `eabihf`, `gnu`, `gnueabihf`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `ohos`, `psx`, `relibc`, `sgx`, `uclibc`
+   = help: to expect this configuration use `--check-cfg=cfg(target_env, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:52:5
@@ -122,6 +148,8 @@ LL |     target_family = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_family` are: `unix`, `wasm`, `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(target_family, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:55:5
@@ -130,6 +158,8 @@ LL |     target_has_atomic = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
+   = help: to expect this configuration use `--check-cfg=cfg(target_has_atomic, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:57:5
@@ -138,6 +168,8 @@ LL |     target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_has_atomic_equal_alignment` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
+   = help: to expect this configuration use `--check-cfg=cfg(target_has_atomic_equal_alignment, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:59:5
@@ -146,6 +178,8 @@ LL |     target_has_atomic_load_store = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_has_atomic_load_store` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
+   = help: to expect this configuration use `--check-cfg=cfg(target_has_atomic_load_store, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:61:5
@@ -154,6 +188,8 @@ LL |     target_os = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
+   = help: to expect this configuration use `--check-cfg=cfg(target_os, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:63:5
@@ -162,6 +198,8 @@ LL |     target_pointer_width = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_pointer_width` are: `16`, `32`, `64`
+   = help: to expect this configuration use `--check-cfg=cfg(target_pointer_width, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:65:5
@@ -172,6 +210,8 @@ LL |     target_thread_local = "_UNEXPECTED_VALUE",
    |                        help: remove the value
    |
    = note: no expected value for `target_thread_local`
+   = help: to expect this configuration use `--check-cfg=cfg(target_thread_local, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:67:5
@@ -180,6 +220,8 @@ LL |     target_vendor = "_UNEXPECTED_VALUE",
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, `wrs`
+   = help: to expect this configuration use `--check-cfg=cfg(target_vendor, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:69:5
@@ -190,6 +232,8 @@ LL |     test = "_UNEXPECTED_VALUE",
    |         help: remove the value
    |
    = note: no expected value for `test`
+   = help: to expect this configuration use `--check-cfg=cfg(test, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:71:5
@@ -200,6 +244,8 @@ LL |     unix = "_UNEXPECTED_VALUE",
    |         help: remove the value
    |
    = note: no expected value for `unix`
+   = help: to expect this configuration use `--check-cfg=cfg(unix, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
   --> $DIR/well-known-values.rs:73:5
@@ -210,6 +256,8 @@ LL |     windows = "_UNEXPECTED_VALUE",
    |            help: remove the value
    |
    = note: no expected value for `windows`
+   = help: to expect this configuration use `--check-cfg=cfg(windows, values("_UNEXPECTED_VALUE"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: unexpected `cfg` condition value: `linuz`
   --> $DIR/well-known-values.rs:79:7
@@ -220,6 +268,8 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
    |                   help: there is a expected value with a similar name: `"linux"`
    |
    = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
+   = help: to expect this configuration use `--check-cfg=cfg(target_os, values("linuz"))`
+   = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration
 
 warning: 25 warnings emitted
 
diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs
new file mode 100644
index 00000000000..6256000b491
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.rs
@@ -0,0 +1,25 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+fn foo<const N: usize>(
+    _: [u8; {
+        {
+            N
+        }
+    }],
+) {
+}
+
+fn ice<const L: usize>()
+where
+    [(); (L - 1) + 1 + L]:,
+{
+    foo::<_, L>([(); L + 1 + L]);
+    //~^ ERROR: mismatched types
+    //~^^ ERROR: unconstrained generic constant
+    //~^^^ ERROR: function takes 1 generic argument but 2 generic arguments were supplied
+    //~^^^^ ERROR: unconstrained generic constant
+    //~^^^^^ ERROR: unconstrained generic constant `{const expr}`
+}
+
+fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
new file mode 100644
index 00000000000..6001d824787
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr
@@ -0,0 +1,64 @@
+error[E0107]: function takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/issue_114151.rs:17:5
+   |
+LL |     foo::<_, L>([(); L + 1 + L]);
+   |     ^^^      - help: remove this generic argument
+   |     |
+   |     expected 1 generic argument
+   |
+note: function defined here, with 1 generic parameter: `N`
+  --> $DIR/issue_114151.rs:4:4
+   |
+LL | fn foo<const N: usize>(
+   |    ^^^ --------------
+
+error[E0308]: mismatched types
+  --> $DIR/issue_114151.rs:17:18
+   |
+LL |     foo::<_, L>([(); L + 1 + L]);
+   |                  ^^ expected `u8`, found `()`
+
+error: unconstrained generic constant
+  --> $DIR/issue_114151.rs:17:22
+   |
+LL |     foo::<_, L>([(); L + 1 + L]);
+   |                      ^^^^^^^^^
+   |
+   = help: try adding a `where` bound using this expression: `where [(); L + 1 + L]:`
+
+error: unconstrained generic constant
+  --> $DIR/issue_114151.rs:17:17
+   |
+LL |     foo::<_, L>([(); L + 1 + L]);
+   |     ----------- ^^^^^^^^^^^^^^^
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = help: try adding a `where` bound using this expression: `where [(); {
+                   {
+                       N
+                   }
+               }]:`
+note: required by a bound in `foo`
+  --> $DIR/issue_114151.rs:5:13
+   |
+LL |   fn foo<const N: usize>(
+   |      --- required by a bound in this function
+LL |       _: [u8; {
+   |  _____________^
+LL | |         {
+LL | |             N
+LL | |         }
+LL | |     }],
+   | |_____^ required by this bound in `foo`
+
+error: unconstrained generic constant `{const expr}`
+  --> $DIR/issue_114151.rs:17:5
+   |
+LL |     foo::<_, L>([(); L + 1 + L]);
+   |     ^^^^^^^^^^^
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0107, E0308.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
new file mode 100644
index 00000000000..c6960fa7259
--- /dev/null
+++ b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.rs
@@ -0,0 +1,43 @@
+// Test that we can handle unsized types with an extern type tail part.
+// Regression test for issue #91827.
+
+#![feature(extern_types)]
+
+use std::ptr::addr_of;
+
+extern "C" {
+    type Opaque;
+}
+
+struct Newtype(Opaque);
+
+struct S {
+    i: i32,
+    j: i32,
+    a: Newtype,
+}
+
+const NEWTYPE: () = unsafe {
+    let buf = [0i32; 4];
+    let x: &Newtype = &*(&buf as *const _ as *const Newtype);
+
+    // Projecting to the newtype works, because it is always at offset 0.
+    let field = &x.0;
+};
+
+const OFFSET: () = unsafe {
+    let buf = [0i32; 4];
+    let x: &S = &*(&buf as *const _ as *const S);
+
+    // Accessing sized fields is perfectly fine, even at non-zero offsets.
+    let field = &x.i;
+    let field = &x.j;
+
+    // This needs to compute the field offset, but we don't know the type's alignment, so this
+    // fails.
+    let field = &x.a;
+    //~^ ERROR: evaluation of constant value failed
+    //~| does not have a known offset
+};
+
+fn main() {}
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
new file mode 100644
index 00000000000..99f37fedd3d
--- /dev/null
+++ b/tests/ui/consts/const-eval/issue-91827-extern-types-field-offset.stderr
@@ -0,0 +1,9 @@
+error[E0080]: evaluation of constant value failed
+  --> $DIR/issue-91827-extern-types-field-offset.rs:38:17
+   |
+LL |     let field = &x.a;
+   |                 ^^^^ `extern type` does not have a known offset
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-91827-extern-types.rs b/tests/ui/consts/const-eval/issue-91827-extern-types.rs
deleted file mode 100644
index c9aaa6e5587..00000000000
--- a/tests/ui/consts/const-eval/issue-91827-extern-types.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-// run-pass
-//
-// Test that we can handle unsized types with an extern type tail part.
-// Regression test for issue #91827.
-
-#![feature(extern_types)]
-
-use std::ptr::addr_of;
-
-extern "C" {
-    type Opaque;
-}
-
-unsafe impl Sync for Opaque {}
-
-#[repr(C)]
-pub struct List<T> {
-    len: usize,
-    data: [T; 0],
-    tail: Opaque,
-}
-
-#[repr(C)]
-pub struct ListImpl<T, const N: usize> {
-    len: usize,
-    data: [T; N],
-}
-
-impl<T> List<T> {
-    const fn as_slice(&self) -> &[T] {
-        unsafe {
-            let ptr = addr_of!(self.tail) as *const T;
-            std::slice::from_raw_parts(ptr, self.len)
-        }
-    }
-}
-
-impl<T, const N: usize> ListImpl<T, N> {
-    const fn as_list(&self) -> &List<T> {
-        unsafe { std::mem::transmute(self) }
-    }
-}
-
-pub static A: ListImpl<u128, 3> = ListImpl {
-    len: 3,
-    data: [5, 6, 7],
-};
-pub static A_REF: &'static List<u128> = A.as_list();
-pub static A_TAIL_OFFSET: isize = tail_offset(A.as_list());
-
-const fn tail_offset<T>(list: &List<T>) -> isize {
-    unsafe { (addr_of!(list.tail) as *const u8).offset_from(list as *const List<T> as *const u8) }
-}
-
-fn main() {
-    assert_eq!(A_REF.as_slice(), &[5, 6, 7]);
-    // Check that interpreter and code generation agree about the position of the tail field.
-    assert_eq!(A_TAIL_OFFSET, tail_offset(A_REF));
-}
diff --git a/tests/ui/consts/issue-90878-2.rs b/tests/ui/consts/issue-90878-2.rs
index e5bcecce6ee..0e61c65305f 100644
--- a/tests/ui/consts/issue-90878-2.rs
+++ b/tests/ui/consts/issue-90878-2.rs
@@ -1,4 +1,4 @@
- #![l=|x|[b;x ]] //~ ERROR unexpected expression: `|x| [b; x]`
+ #![l=|x|[b;x ]] //~ ERROR attribute value must be a literal
 //~^ ERROR cannot find attribute `l` in this scope
 
 // notice the space at the start,
diff --git a/tests/ui/consts/issue-90878-2.stderr b/tests/ui/consts/issue-90878-2.stderr
index 71b8d21fb4d..0b332840042 100644
--- a/tests/ui/consts/issue-90878-2.stderr
+++ b/tests/ui/consts/issue-90878-2.stderr
@@ -1,4 +1,4 @@
-error: unexpected expression: `|x| [b; x]`
+error: attribute value must be a literal
   --> $DIR/issue-90878-2.rs:1:7
    |
 LL |  #![l=|x|[b;x ]]
diff --git a/tests/ui/coroutine/async-gen-deduce-yield.rs b/tests/ui/coroutine/async-gen-deduce-yield.rs
new file mode 100644
index 00000000000..9ccc8ee41f6
--- /dev/null
+++ b/tests/ui/coroutine/async-gen-deduce-yield.rs
@@ -0,0 +1,14 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// check-pass
+
+#![feature(async_iterator, gen_blocks)]
+
+use std::async_iter::AsyncIterator;
+
+fn deduce() -> impl AsyncIterator<Item = ()> {
+    async gen {
+        yield Default::default();
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/uninhabited-field.rs b/tests/ui/coroutine/uninhabited-field.rs
new file mode 100644
index 00000000000..d9570c2fed8
--- /dev/null
+++ b/tests/ui/coroutine/uninhabited-field.rs
@@ -0,0 +1,37 @@
+// Test that uninhabited saved local doesn't make the entire variant uninhabited.
+// run-pass
+#![allow(unused)]
+#![feature(assert_matches)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
+#![feature(never_type)]
+use std::assert_matches::assert_matches;
+use std::ops::Coroutine;
+use std::ops::CoroutineState;
+use std::pin::Pin;
+
+fn conjure<T>() -> T { loop {} }
+
+fn run<T>(x: bool, y: bool) {
+    let mut c = || {
+        if x {
+            let a : T;
+            if y {
+                a = conjure::<T>();
+            }
+            yield ();
+        } else {
+            let a : T;
+            if y {
+                a = conjure::<T>();
+            }
+            yield ();
+        }
+    };
+    assert_matches!(Pin::new(&mut c).resume(()), CoroutineState::Yielded(()));
+    assert_matches!(Pin::new(&mut c).resume(()), CoroutineState::Complete(()));
+}
+
+fn main() {
+    run::<!>(false, false);
+}
diff --git a/tests/ui/destructuring-assignment/bad-expr-lhs.rs b/tests/ui/destructuring-assignment/bad-expr-lhs.rs
index 53794783a3c..90e1ac19943 100644
--- a/tests/ui/destructuring-assignment/bad-expr-lhs.rs
+++ b/tests/ui/destructuring-assignment/bad-expr-lhs.rs
@@ -4,6 +4,4 @@ fn main() {
     (1, 2) = (3, 4);
     //~^ ERROR invalid left-hand side of assignment
     //~| ERROR invalid left-hand side of assignment
-
-    None = Some(3); //~ ERROR invalid left-hand side of assignment
 }
diff --git a/tests/ui/destructuring-assignment/bad-expr-lhs.stderr b/tests/ui/destructuring-assignment/bad-expr-lhs.stderr
index d2986747480..2916d6d9f11 100644
--- a/tests/ui/destructuring-assignment/bad-expr-lhs.stderr
+++ b/tests/ui/destructuring-assignment/bad-expr-lhs.stderr
@@ -30,15 +30,7 @@ LL |     (1, 2) = (3, 4);
    |         |
    |         cannot assign to this expression
 
-error[E0070]: invalid left-hand side of assignment
-  --> $DIR/bad-expr-lhs.rs:8:10
-   |
-LL |     None = Some(3);
-   |     ---- ^
-   |     |
-   |     cannot assign to this expression
-
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0067, E0070.
 For more information about an error, try `rustc --explain E0067`.
diff --git a/tests/ui/destructuring-assignment/non-exhaustive-destructure.rs b/tests/ui/destructuring-assignment/non-exhaustive-destructure.rs
new file mode 100644
index 00000000000..39939f2bad6
--- /dev/null
+++ b/tests/ui/destructuring-assignment/non-exhaustive-destructure.rs
@@ -0,0 +1,4 @@
+fn main() {
+    None = Some(3);
+    //~^ ERROR refutable pattern in local binding
+}
diff --git a/tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr b/tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr
new file mode 100644
index 00000000000..b9ceaa4af7b
--- /dev/null
+++ b/tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr
@@ -0,0 +1,17 @@
+error[E0005]: refutable pattern in local binding
+  --> $DIR/non-exhaustive-destructure.rs:2:5
+   |
+LL |     None = Some(3);
+   |     ^^^^ pattern `Some(_)` not covered
+   |
+   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
+   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+   = note: the matched value is of type `Option<i32>`
+help: you might want to use `if let` to ignore the variant that isn't matched
+   |
+LL |     if None = Some(3) { todo!() };
+   |     ++                +++++++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0005`.
diff --git a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs
index 8da7f90c524..f82e029983b 100644
--- a/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs
+++ b/tests/ui/destructuring-assignment/struct-or-enum-variant-path.rs
@@ -11,17 +11,22 @@ type A = E;
 fn main() {
     let mut a;
 
+    S = S;
     (S, a) = (S, ());
 
+    E::V = E::V;
     (E::V, a) = (E::V, ());
 
+    <E>::V = E::V;
     (<E>::V, a) = (E::V, ());
+    A::V = A::V;
     (A::V, a) = (E::V, ());
 }
 
 impl S {
     fn check() {
         let a;
+        Self = S;
         (Self, a) = (S, ());
     }
 }
@@ -29,6 +34,7 @@ impl S {
 impl E {
     fn check() {
         let a;
+        Self::V = E::V;
         (Self::V, a) = (E::V, ());
     }
 }
diff --git a/tests/ui/diagnostic-width/long-E0308.stderr b/tests/ui/diagnostic-width/long-E0308.stderr
index 20b018b9f77..1e5966a1c5d 100644
--- a/tests/ui/diagnostic-width/long-E0308.stderr
+++ b/tests/ui/diagnostic-width/long-E0308.stderr
@@ -19,9 +19,8 @@ LL |  |     ))))))))))))))))))))))))))))));
    |  |__________________________________^ expected `Atype<Btype<..., ...>, ...>`, found `Result<Result<..., ...>, ...>`
    |
    = note: expected struct `Atype<Btype<..., ...>, ...>`
-           the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
                 found enum `Result<Result<..., ...>, ...>`
-           the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
+   = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
 
 error[E0308]: mismatched types
   --> $DIR/long-E0308.rs:57:26
@@ -35,9 +34,8 @@ LL | |     ))))))))))))))))))))))));
    | |____________________________^ expected `Option<Result<..., ...>>`, found `Result<Result<..., ...>, ...>`
    |
    = note: expected enum `Option<Result<..., ...>>`
-           the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
               found enum `Result<Result<..., ...>, ...>`
-           the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
+   = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
 
 error[E0308]: mismatched types
   --> $DIR/long-E0308.rs:88:9
@@ -55,8 +53,8 @@ LL | |     > = ();
    |       expected due to this
    |
    = note: expected struct `Atype<Btype<..., ...>, ...>`
-           the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
            found unit type `()`
+   = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
 
 error[E0308]: mismatched types
   --> $DIR/long-E0308.rs:91:17
@@ -73,7 +71,7 @@ LL | |     ))))))))))))))))))))))));
    |
    = note: expected unit type `()`
                    found enum `Result<Result<..., ...>, ...>`
-           the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
+   = note: the full type name has been written to '$TEST_BUILD_DIR/diagnostic-width/long-E0308/long-E0308.long-type-hash.txt'
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/extern/extern-types-field-offset.rs b/tests/ui/extern/extern-types-field-offset.rs
new file mode 100644
index 00000000000..bfbc1e9bffa
--- /dev/null
+++ b/tests/ui/extern/extern-types-field-offset.rs
@@ -0,0 +1,33 @@
+// run-fail
+// check-run-results
+// exec-env:RUST_BACKTRACE=0
+// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
+#![feature(extern_types)]
+
+extern "C" {
+    type Opaque;
+}
+
+struct Newtype(Opaque);
+
+struct S {
+    i: i32,
+    j: i32,
+    a: Newtype,
+}
+
+fn main() {
+    let buf = [0i32; 4];
+
+    let x: &Newtype = unsafe { &*(&buf as *const _ as *const Newtype) };
+    // Projecting to the newtype works, because it is always at offset 0.
+    let field = &x.0;
+
+    let x: &S = unsafe { &*(&buf as *const _ as *const S) };
+    // Accessing sized fields is perfectly fine, even at non-zero offsets.
+    let field = &x.i;
+    let field = &x.j;
+    // This needs to compute the field offset, but we don't know the type's alignment,
+    // so this panics.
+    let field = &x.a;
+}
diff --git a/tests/ui/extern/extern-types-field-offset.run.stderr b/tests/ui/extern/extern-types-field-offset.run.stderr
new file mode 100644
index 00000000000..1b04b860db5
--- /dev/null
+++ b/tests/ui/extern/extern-types-field-offset.run.stderr
@@ -0,0 +1,4 @@
+thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+attempted to compute the size or alignment of extern type `Opaque`
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-types-size_of_val.align.run.stderr b/tests/ui/extern/extern-types-size_of_val.align.run.stderr
new file mode 100644
index 00000000000..20c4d8785e8
--- /dev/null
+++ b/tests/ui/extern/extern-types-size_of_val.align.run.stderr
@@ -0,0 +1,4 @@
+thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+attempted to compute the size or alignment of extern type `A`
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/extern/extern-types-size_of_val.rs b/tests/ui/extern/extern-types-size_of_val.rs
index 3b02ea28eaa..4c4de873b7f 100644
--- a/tests/ui/extern/extern-types-size_of_val.rs
+++ b/tests/ui/extern/extern-types-size_of_val.rs
@@ -1,4 +1,8 @@
-// run-pass
+// run-fail
+// check-run-results
+// exec-env:RUST_BACKTRACE=0
+// normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
+// revisions: size align
 #![feature(extern_types)]
 
 use std::mem::{align_of_val, size_of_val};
@@ -10,6 +14,10 @@ extern "C" {
 fn main() {
     let x: &A = unsafe { &*(1usize as *const A) };
 
-    assert_eq!(size_of_val(x), 0);
-    assert_eq!(align_of_val(x), 1);
+    // These don't have a dynamic size, so this should panic.
+    if cfg!(size) {
+        assert_eq!(size_of_val(x), 0);
+    } else {
+        assert_eq!(align_of_val(x), 1);
+    }
 }
diff --git a/tests/ui/extern/extern-types-size_of_val.size.run.stderr b/tests/ui/extern/extern-types-size_of_val.size.run.stderr
new file mode 100644
index 00000000000..20c4d8785e8
--- /dev/null
+++ b/tests/ui/extern/extern-types-size_of_val.size.run.stderr
@@ -0,0 +1,4 @@
+thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+attempted to compute the size or alignment of extern type `A`
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+thread caused non-unwinding panic. aborting.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
index 1462c41e957..c582ca7ba3d 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
@@ -2,16 +2,34 @@ error[E0658]: gen blocks are experimental
   --> $DIR/feature-gate-gen_blocks.rs:5:5
    |
 LL |     gen {};
-   |     ^^^^^
+   |     ^^^
    |
    = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
    = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
 
 error[E0658]: gen blocks are experimental
-  --> $DIR/feature-gate-gen_blocks.rs:13:5
+  --> $DIR/feature-gate-gen_blocks.rs:12:5
+   |
+LL |     async gen {};
+   |     ^^^^^^^^^
+   |
+   = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+   = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error[E0658]: gen blocks are experimental
+  --> $DIR/feature-gate-gen_blocks.rs:22:5
    |
 LL |     gen {};
-   |     ^^^^^
+   |     ^^^
+   |
+   = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+   = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error[E0658]: gen blocks are experimental
+  --> $DIR/feature-gate-gen_blocks.rs:25:5
+   |
+LL |     async gen {};
+   |     ^^^^^^^^^
    |
    = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
    = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
@@ -22,7 +40,13 @@ error[E0282]: type annotations needed
 LL |     gen {};
    |         ^^ cannot infer type
 
-error: aborting due to 3 previous errors
+error[E0282]: type annotations needed
+  --> $DIR/feature-gate-gen_blocks.rs:12:15
+   |
+LL |     async gen {};
+   |               ^^ cannot infer type
+
+error: aborting due to 6 previous errors
 
 Some errors have detailed explanations: E0282, E0658.
 For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
index 56f8309a69f..b4b37f0e638 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
@@ -1,9 +1,21 @@
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
+  --> $DIR/feature-gate-gen_blocks.rs:12:11
+   |
+LL |     async gen {};
+   |           ^^^ expected one of 8 possible tokens
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
+  --> $DIR/feature-gate-gen_blocks.rs:25:11
+   |
+LL |     async gen {};
+   |           ^^^ expected one of 8 possible tokens
+
 error[E0422]: cannot find struct, variant or union type `gen` in this scope
   --> $DIR/feature-gate-gen_blocks.rs:5:5
    |
 LL |     gen {};
    |     ^^^ not found in this scope
 
-error: aborting due to 1 previous error
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.rs b/tests/ui/feature-gates/feature-gate-gen_blocks.rs
index e2e1574a36a..ff9a0b139c0 100644
--- a/tests/ui/feature-gates/feature-gate-gen_blocks.rs
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.rs
@@ -1,15 +1,28 @@
 // revisions: e2024 none
 //[e2024] compile-flags: --edition 2024 -Zunstable-options
 
-fn main() {
+fn test_gen() {
     gen {};
     //[none]~^ ERROR: cannot find struct, variant or union type `gen`
     //[e2024]~^^ ERROR: gen blocks are experimental
     //[e2024]~| ERROR: type annotations needed
 }
 
+fn test_async_gen() {
+    async gen {};
+    //[none]~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
+    //[e2024]~^^ ERROR: gen blocks are experimental
+    //[e2024]~| ERROR: type annotations needed
+}
+
+fn main() {}
+
 #[cfg(FALSE)]
 fn foo() {
     gen {};
     //[e2024]~^ ERROR: gen blocks are experimental
+
+    async gen {};
+    //[e2024]~^ ERROR: gen blocks are experimental
+    //[none]~^^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
 }
diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
index d2ad372dfbc..1b87ebd9f20 100644
--- a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
+++ b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
@@ -95,7 +95,7 @@ LL | fn unsized_local() where Dst<dyn A>: Sized {
    |                          ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
-note: required because it appears within the type `Dst<dyn A>`
+note: required because it appears within the type `Dst<(dyn A + 'static)>`
   --> $DIR/feature-gate-trivial_bounds.rs:48:8
    |
 LL | struct Dst<X: ?Sized> {
diff --git a/tests/ui/fmt/send-sync.stderr b/tests/ui/fmt/send-sync.stderr
index e3ebe6cdcb8..6c9c7941eb3 100644
--- a/tests/ui/fmt/send-sync.stderr
+++ b/tests/ui/fmt/send-sync.stderr
@@ -8,9 +8,9 @@ LL |     send(format_args!("{:?}", c));
    |
    = help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
    = note: required because it appears within the type `&core::fmt::rt::Opaque`
-note: required because it appears within the type `Argument<'_>`
+note: required because it appears within the type `core::fmt::rt::Argument<'_>`
   --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
-   = note: required because it appears within the type `[Argument<'_>]`
+   = note: required because it appears within the type `[core::fmt::rt::Argument<'_>]`
    = note: required for `&[core::fmt::rt::Argument<'_>]` to implement `Send`
 note: required because it appears within the type `Arguments<'_>`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
@@ -30,10 +30,10 @@ LL |     sync(format_args!("{:?}", c));
    |
    = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
    = note: required because it appears within the type `&core::fmt::rt::Opaque`
-note: required because it appears within the type `Argument<'_>`
+note: required because it appears within the type `core::fmt::rt::Argument<'_>`
   --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
-   = note: required because it appears within the type `[Argument<'_>]`
-   = note: required because it appears within the type `&[Argument<'_>]`
+   = note: required because it appears within the type `[core::fmt::rt::Argument<'_>]`
+   = note: required because it appears within the type `&[core::fmt::rt::Argument<'_>]`
 note: required because it appears within the type `Arguments<'_>`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
 note: required by a bound in `sync`
diff --git a/tests/ui/foreign-fn-return-lifetime.fixed b/tests/ui/foreign-fn-return-lifetime.fixed
deleted file mode 100644
index 143d6343d26..00000000000
--- a/tests/ui/foreign-fn-return-lifetime.fixed
+++ /dev/null
@@ -1,8 +0,0 @@
-// run-rustfix
-
-extern "C" {
-    pub fn g(_: &u8) -> &u8; // OK
-    pub fn f() -> &'static u8; //~ ERROR missing lifetime specifier
-}
-
-fn main() {}
diff --git a/tests/ui/foreign-fn-return-lifetime.rs b/tests/ui/foreign-fn-return-lifetime.rs
index 76fe50a340a..35595bab36d 100644
--- a/tests/ui/foreign-fn-return-lifetime.rs
+++ b/tests/ui/foreign-fn-return-lifetime.rs
@@ -1,5 +1,3 @@
-// run-rustfix
-
 extern "C" {
     pub fn g(_: &u8) -> &u8; // OK
     pub fn f() -> &u8; //~ ERROR missing lifetime specifier
diff --git a/tests/ui/foreign-fn-return-lifetime.stderr b/tests/ui/foreign-fn-return-lifetime.stderr
index 43edcbde35c..e24c0f23c35 100644
--- a/tests/ui/foreign-fn-return-lifetime.stderr
+++ b/tests/ui/foreign-fn-return-lifetime.stderr
@@ -1,14 +1,19 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/foreign-fn-return-lifetime.rs:5:19
+  --> $DIR/foreign-fn-return-lifetime.rs:3:19
    |
 LL |     pub fn f() -> &u8;
    |                   ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     pub fn f() -> &'static u8;
    |                    +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL -     pub fn f() -> &u8;
+LL +     pub fn f() -> u8;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/function-pointer/unsized-ret.stderr b/tests/ui/function-pointer/unsized-ret.stderr
index dcfec53eeb9..66116273ff4 100644
--- a/tests/ui/function-pointer/unsized-ret.stderr
+++ b/tests/ui/function-pointer/unsized-ret.stderr
@@ -19,7 +19,7 @@ LL |     foo::<for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&()
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`
-   = note: required because it appears within the type `fn(&()) -> dyn Display`
+   = note: required because it appears within the type `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`
 note: required by a bound in `foo`
   --> $DIR/unsized-ret.rs:5:11
    |
diff --git a/tests/ui/generic-associated-types/issue-70304.stderr b/tests/ui/generic-associated-types/issue-70304.stderr
index 99339e96859..9b02c1b0768 100644
--- a/tests/ui/generic-associated-types/issue-70304.stderr
+++ b/tests/ui/generic-associated-types/issue-70304.stderr
@@ -11,7 +11,7 @@ LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> {
    |                                                             ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'static>> {
    |                                                             ~~~~~~~
diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
index ed9261d0de5..4a52f82540d 100644
--- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
+++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr
@@ -16,7 +16,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
    |             doesn't have a size known at compile-time
    |
    = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
-   = note: required because it appears within the type `(usize, dyn Trait)`
+   = note: required because it appears within the type `(usize, (dyn Trait + 'static))`
    = note: the return type of a function must have a statically known size
 
 error[E0308]: mismatched types
@@ -37,7 +37,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
    |             doesn't have a size known at compile-time
    |
    = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
-   = note: required because it appears within the type `(usize, dyn Trait)`
+   = note: required because it appears within the type `(usize, (dyn Trait + 'static))`
    = note: the return type of a function must have a statically known size
 
 error[E0746]: return type cannot have an unboxed trait object
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
index 443ffeb55cd..a5982a5542a 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds.stderr
@@ -5,7 +5,7 @@ LL | fn d() -> impl Fn() -> (impl Debug + '_) {
    |                                      ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL | fn d() -> impl Fn() -> (impl Debug + 'static) {
    |                                      ~~~~~~~
diff --git a/tests/ui/inference/issue-103587.stderr b/tests/ui/inference/issue-103587.stderr
index b373fbfbb94..589cb7ea7b1 100644
--- a/tests/ui/inference/issue-103587.stderr
+++ b/tests/ui/inference/issue-103587.stderr
@@ -26,14 +26,10 @@ error[E0308]: mismatched types
 LL |     if None = x { }
    |        ^^^^^^^^ expected `bool`, found `()`
    |
-help: you might have meant to use pattern matching
+help: consider adding `let`
    |
 LL |     if let None = x { }
    |        +++
-help: you might have meant to compare for equality
-   |
-LL |     if None == x { }
-   |              +
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/issues/issue-13407.rs b/tests/ui/issues/issue-13407.rs
index 7ea81ffb59e..7794be37b85 100644
--- a/tests/ui/issues/issue-13407.rs
+++ b/tests/ui/issues/issue-13407.rs
@@ -4,6 +4,6 @@ mod A {
 
 fn main() {
     A::C = 1;
-    //~^ ERROR: invalid left-hand side of assignment
-    //~| ERROR: struct `C` is private
+    //~^ ERROR: mismatched types
+    //~| ERROR: unit struct `C` is private
 }
diff --git a/tests/ui/issues/issue-13407.stderr b/tests/ui/issues/issue-13407.stderr
index 54b6c640d9d..ac2eb6581fe 100644
--- a/tests/ui/issues/issue-13407.stderr
+++ b/tests/ui/issues/issue-13407.stderr
@@ -10,15 +10,18 @@ note: the unit struct `C` is defined here
 LL |     struct C;
    |     ^^^^^^^^^
 
-error[E0070]: invalid left-hand side of assignment
-  --> $DIR/issue-13407.rs:6:10
+error[E0308]: mismatched types
+  --> $DIR/issue-13407.rs:6:5
    |
+LL |     struct C;
+   |     -------- unit struct defined here
+...
 LL |     A::C = 1;
-   |     ---- ^
+   |     ^^^^   - this expression has type `{integer}`
    |     |
-   |     cannot assign to this expression
+   |     expected integer, found `C`
 
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0070, E0603.
-For more information about an error, try `rustc --explain E0070`.
+Some errors have detailed explanations: E0308, E0603.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-13497.stderr b/tests/ui/issues/issue-13497.stderr
index 236e6b48607..fb3de637a79 100644
--- a/tests/ui/issues/issue-13497.stderr
+++ b/tests/ui/issues/issue-13497.stderr
@@ -5,10 +5,14 @@ LL |     &str
    |     ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     &'static str
    |      +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL |     String
+   |     ~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/issues/issue-21763.stderr b/tests/ui/issues/issue-21763.stderr
index 3d623985cbb..135b705eeef 100644
--- a/tests/ui/issues/issue-21763.stderr
+++ b/tests/ui/issues/issue-21763.stderr
@@ -7,7 +7,7 @@ LL |     foo::<HashMap<Rc<()>, Rc<()>>>();
    = help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>`
    = note: required because it appears within the type `(Rc<()>, Rc<()>)`
    = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
-note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>`
+note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>`
   --> $HASHBROWN_SRC_LOCATION
 note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>`
   --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
diff --git a/tests/ui/kindck/kindck-send-object1.stderr b/tests/ui/kindck/kindck-send-object1.stderr
index 269193f73b4..c0d516e3f62 100644
--- a/tests/ui/kindck/kindck-send-object1.stderr
+++ b/tests/ui/kindck/kindck-send-object1.stderr
@@ -20,7 +20,7 @@ LL |     assert_send::<Box<dyn Dummy + 'a>>();
    |
    = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)`
    = note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send`
-note: required because it appears within the type `Box<dyn Dummy>`
+note: required because it appears within the type `Box<(dyn Dummy + 'a)>`
   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `assert_send`
   --> $DIR/kindck-send-object1.rs:5:18
diff --git a/tests/ui/lifetimes/issue-26638.stderr b/tests/ui/lifetimes/issue-26638.stderr
index e61158a5d4d..ee958686259 100644
--- a/tests/ui/lifetimes/issue-26638.stderr
+++ b/tests/ui/lifetimes/issue-26638.stderr
@@ -17,10 +17,18 @@ LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
    |                                        ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &'static str { iter() }
    |                                         +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+   |
+LL | fn parse_type_2(iter: &fn(&u8)->&u8) -> &str { iter() }
+   |                       +
+help: ...or alternatively, you might want to return an owned value
+   |
+LL | fn parse_type_2(iter: fn(&u8)->&u8) -> String { iter() }
+   |                                        ~~~~~~
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-26638.rs:10:22
@@ -29,10 +37,14 @@ LL | fn parse_type_3() -> &str { unimplemented!() }
    |                      ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn parse_type_3() -> &'static str { unimplemented!() }
    |                       +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL | fn parse_type_3() -> String { unimplemented!() }
+   |                      ~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/issue-26638.rs:1:69
diff --git a/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
index 5eee953ef18..23ef36888f0 100644
--- a/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
+++ b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
@@ -5,10 +5,15 @@ LL | fn f() -> &isize {
    |           ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn f() -> &'static isize {
    |            +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL - fn f() -> &isize {
+LL + fn f() -> isize {
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:7:33
@@ -41,10 +46,19 @@ LL | fn i(_x: isize) -> &isize {
    |                    ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn i(_x: isize) -> &'static isize {
    |                     +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+   |
+LL | fn i(_x: &isize) -> &isize {
+   |          +
+help: ...or alternatively, you might want to return an owned value
+   |
+LL - fn i(_x: isize) -> &isize {
+LL + fn i(_x: isize) -> isize {
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:34:24
@@ -53,10 +67,19 @@ LL | fn j(_x: StaticStr) -> &isize {
    |                        ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn j(_x: StaticStr) -> &'static isize {
    |                         +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+   |
+LL | fn j(_x: &StaticStr) -> &isize {
+   |          +
+help: ...or alternatively, you might want to return an owned value
+   |
+LL - fn j(_x: StaticStr) -> &isize {
+LL + fn j(_x: StaticStr) -> isize {
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:40:49
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs
index ab8d95a41d0..1b8ce10ccce 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/count-and-length-are-distinct.rs
@@ -10,11 +10,11 @@ fn main() {
                 $(
                     // inner-most repetition
                     $(
-                        ${ignore(l)} ${index()}, ${length()},
+                        ${ignore($l)} ${index()}, ${length()},
                     )*
-                    ${count(l)}, ${index()}, ${length()},
+                    ${count($l)}, ${index()}, ${length()},
                 )*
-                ${count(l)},
+                ${count($l)},
             ]
         };
     }
@@ -72,30 +72,30 @@ fn main() {
             &[
                 $( $( $(
                     &[
-                        ${ignore(i)} ${count(i, 0)},
+                        ${ignore($i)} ${count($i, 0)},
                     ][..],
                 )* )* )*
 
                 $( $(
                     &[
-                        ${ignore(i)} ${count(i, 0)},
-                        ${ignore(i)} ${count(i, 1)},
+                        ${ignore($i)} ${count($i, 0)},
+                        ${ignore($i)} ${count($i, 1)},
                     ][..],
                 )* )*
 
                 $(
                     &[
-                        ${ignore(i)} ${count(i, 0)},
-                        ${ignore(i)} ${count(i, 1)},
-                        ${ignore(i)} ${count(i, 2)},
+                        ${ignore($i)} ${count($i, 0)},
+                        ${ignore($i)} ${count($i, 1)},
+                        ${ignore($i)} ${count($i, 2)},
                     ][..],
                 )*
 
                 &[
-                    ${count(i, 0)},
-                    ${count(i, 1)},
-                    ${count(i, 2)},
-                    ${count(i, 3)},
+                    ${count($i, 0)},
+                    ${count($i, 1)},
+                    ${count($i, 2)},
+                    ${count($i, 3)},
                 ][..]
             ][..]
         }
@@ -133,23 +133,23 @@ fn main() {
             &[7][..],
 
             // (a b c) (d e f)
-            &[2, 6][..],
+            &[6, 2][..],
             // (g h) (i j k l m)
-            &[2, 7][..],
+            &[7, 2][..],
             // (n)
             &[1, 1][..],
             // (o) (p q) (r s)
-            &[3, 5][..],
+            &[5, 3][..],
             // (t u v w x y z)
-            &[1, 7][..],
+            &[7, 1][..],
 
             // [ (a b c) (d e f) ]
             // [ (g h) (i j k l m) ]
             // [ (n) ]
-            &[3, 5, 14][..],
+            &[14, 5, 3][..],
             // [ (o) (p q) (r s) ]
             // [ (t u v w x y z) ]
-            &[2, 4, 12][..],
+            &[12, 4, 2][..],
 
             // {
             //     [ (a b c) (d e f) ]
@@ -160,7 +160,7 @@ fn main() {
             //     [ (o) (p q) (r s) ]
             //     [ (t u v w x y z) ]
             // }
-            &[2, 5, 9, 26][..]
+            &[26, 9, 5, 2][..]
         ][..]
     );
 
@@ -170,31 +170,31 @@ fn main() {
             &[
                 $( $( $( $(
                     &[
-                        ${ignore(i)} ${length(3)},
-                        ${ignore(i)} ${length(2)},
-                        ${ignore(i)} ${length(1)},
-                        ${ignore(i)} ${length(0)},
+                        ${ignore($i)} ${length(3)},
+                        ${ignore($i)} ${length(2)},
+                        ${ignore($i)} ${length(1)},
+                        ${ignore($i)} ${length(0)},
                     ][..],
                 )* )* )* )*
 
                 $( $( $(
                     &[
-                        ${ignore(i)} ${length(2)},
-                        ${ignore(i)} ${length(1)},
-                        ${ignore(i)} ${length(0)},
+                        ${ignore($i)} ${length(2)},
+                        ${ignore($i)} ${length(1)},
+                        ${ignore($i)} ${length(0)},
                     ][..],
                 )* )* )*
 
                 $( $(
                     &[
-                        ${ignore(i)} ${length(1)},
-                        ${ignore(i)} ${length(0)},
+                        ${ignore($i)} ${length(1)},
+                        ${ignore($i)} ${length(0)},
                     ][..],
                 )* )*
 
                 $(
                     &[
-                        ${ignore(i)} ${length(0)},
+                        ${ignore($i)} ${length(0)},
                     ][..],
                 )*
             ][..]
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs
index d05cd1b31bc..950e70153ba 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/feature-gate-macro_metavar_expr.rs
@@ -5,14 +5,14 @@
 /// Count the number of idents in a macro repetition.
 macro_rules! count_idents {
     ( $( $i:ident ),* ) => {
-        ${count(i)}
+        ${count($i)}
     };
 }
 
 /// Count the number of idents in a 2-dimensional macro repetition.
 macro_rules! count_idents_2 {
     ( $( [ $( $i:ident ),* ] ),* ) => {
-        ${count(i)}
+        ${count($i)}
     };
 }
 
@@ -21,17 +21,17 @@ macro_rules! count_depth_limits {
     ( $( { $( [ $( $outer:ident : ( $( $inner:ident )* ) )* ] )* } )* ) => {
         (
             (
-                ${count(inner)},
-                ${count(inner, 0)},
-                ${count(inner, 1)},
-                ${count(inner, 2)},
-                ${count(inner, 3)},
+                ${count($inner)},
+                ${count($inner, 0)},
+                ${count($inner, 1)},
+                ${count($inner, 2)},
+                ${count($inner, 3)},
             ),
             (
-                ${count(outer)},
-                ${count(outer, 0)},
-                ${count(outer, 1)},
-                ${count(outer, 2)},
+                ${count($outer)},
+                ${count($outer, 0)},
+                ${count($outer, 1)},
+                ${count($outer, 2)},
             ),
         )
     };
@@ -43,7 +43,7 @@ macro_rules! count_depth_limits {
 /// repetition binding.
 macro_rules! enumerate_literals {
     ( $( ($l:stmt) ),* ) => {
-        [$( ${ignore(l)} (${index()}, ${length()}) ),*]
+        [$( ${ignore($l)} (${index()}, ${length()}) ),*]
     };
 }
 
@@ -77,7 +77,7 @@ macro_rules! make_count_adders {
         $(
             macro_rules! $i {
                 ( $$( $$j:ident ),* ) => {
-                    $b + $${count(j)}
+                    $b + $${count($j)}
                 };
             }
         )*
@@ -122,7 +122,7 @@ fn main() {
                 [ T: (t u v w x y z) ]
             }
         },
-        ((26, 2, 5, 9, 26), (9, 2, 5, 9))
+        ((26, 26, 9, 5, 2), (9, 9, 5, 2))
     );
     assert_eq!(enumerate_literals![("foo"), ("bar")], [(0, 2), (1, 2)]);
     assert_eq!(
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs
index 9cc572c23a1..3000bfed6a8 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.rs
@@ -1,7 +1,7 @@
 #![feature(macro_metavar_expr)]
 
 macro_rules! foo {
-    ( $( $($t:ident),* );* ) => { ${count(t,)} }
+    ( $( $($t:ident),* );* ) => { ${count($t,)} }
     //~^ ERROR `count` followed by a comma must have an associated
     //~| ERROR expected expression, found `$`
 }
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr
index e9317a5c347..fd53c1686cf 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/issue-111904.stderr
@@ -1,13 +1,13 @@
 error: `count` followed by a comma must have an associated index indicating its depth
   --> $DIR/issue-111904.rs:4:37
    |
-LL |     ( $( $($t:ident),* );* ) => { ${count(t,)} }
+LL |     ( $( $($t:ident),* );* ) => { ${count($t,)} }
    |                                     ^^^^^
 
 error: expected expression, found `$`
   --> $DIR/issue-111904.rs:4:35
    |
-LL |     ( $( $($t:ident),* );* ) => { ${count(t,)} }
+LL |     ( $( $($t:ident),* );* ) => { ${count($t,)} }
    |                                   ^ expected expression
 ...
 LL |     foo!(a, a; b, b);
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs
index b954967c4fe..04924f0efa6 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/macro-expansion.rs
@@ -13,17 +13,17 @@ macro_rules! example {
     ( $( [ $( ( $( $x:ident )* ) )* ] )* ) => {
         Example {
             _indexes: &[],
-            _counts: &[${count(x, 0)}, ${count(x, 1)}, ${count(x, 2)}],
+            _counts: &[${count($x, 0)}, ${count($x, 1)}, ${count($x, 2)}],
             _nested: vec![
             $(
                 Example {
                     _indexes: &[(${index()}, ${length()})],
-                    _counts: &[${count(x, 0)}, ${count(x, 1)}],
+                    _counts: &[${count($x, 0)}, ${count($x, 1)}],
                     _nested: vec![
                     $(
                         Example {
                             _indexes: &[(${index(1)}, ${length(1)}), (${index()}, ${length()})],
-                            _counts: &[${count(x)}],
+                            _counts: &[${count($x)}],
                             _nested: vec![
                             $(
                                 Example {
@@ -34,7 +34,7 @@ macro_rules! example {
                                     ],
                                     _counts: &[],
                                     _nested: vec![],
-                                    ${ignore(x)}
+                                    ${ignore($x)}
                                 }
                             ),*
                             ]
@@ -49,9 +49,9 @@ macro_rules! example {
 }
 
 static EXPECTED: &str = concat!(
-    "Example { _indexes: [], _counts: [2, 4, 13], _nested: [",
+    "Example { _indexes: [], _counts: [13, 4, 2], _nested: [",
     concat!(
-        "Example { _indexes: [(0, 2)], _counts: [3, 10], _nested: [",
+        "Example { _indexes: [(0, 2)], _counts: [10, 3], _nested: [",
         concat!(
             "Example { _indexes: [(0, 2), (0, 3)], _counts: [4], _nested: [",
             concat!(
@@ -77,7 +77,7 @@ static EXPECTED: &str = concat!(
             "] }",
         ),
         "] }, ",
-        "Example { _indexes: [(1, 2)], _counts: [1, 3], _nested: [",
+        "Example { _indexes: [(1, 2)], _counts: [3, 1], _nested: [",
         concat!(
             "Example { _indexes: [(1, 2), (0, 1)], _counts: [3], _nested: [",
             concat!(
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs
index 6a0d68bd6b1..d195506af36 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.rs
@@ -3,9 +3,9 @@
 macro_rules! a {
     ( $( { $( [ $( ( $( $foo:ident )* ) )* ] )* } )* ) => {
         (
-            ${count(foo, 0)},
-            ${count(foo, 10)},
-            //~^ ERROR depth parameter on meta-variable expression `count` must be less than 4
+            ${count($foo, 0)},
+            ${count($foo, 10)},
+            //~^ ERROR depth parameter of meta-variable expression `count` must be less than 4
         )
     };
 }
@@ -14,10 +14,10 @@ macro_rules! b {
     ( $( { $( [ $( $foo:ident )* ] )* } )* ) => {
         (
             $( $( $(
-                ${ignore(foo)}
+                ${ignore($foo)}
                 ${index(0)},
                 ${index(10)},
-                //~^ ERROR depth parameter on meta-variable expression `index` must be less than 3
+                //~^ ERROR depth parameter of meta-variable expression `index` must be less than 3
             )* )* )*
         )
     };
@@ -27,10 +27,10 @@ macro_rules! c {
     ( $( { $( $foo:ident )* } )* ) => {
         (
             $( $(
-                ${ignore(foo)}
+                ${ignore($foo)}
                 ${length(0)}
                 ${length(10)}
-                //~^ ERROR depth parameter on meta-variable expression `length` must be less than 2
+                //~^ ERROR depth parameter of meta-variable expression `length` must be less than 2
             )* )*
         )
     };
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr
index 236122b6465..f757b8af219 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/out-of-bounds-arguments.stderr
@@ -1,16 +1,16 @@
-error: depth parameter on meta-variable expression `count` must be less than 4
+error: depth parameter of meta-variable expression `count` must be less than 4
   --> $DIR/out-of-bounds-arguments.rs:7:14
    |
-LL |             ${count(foo, 10)},
-   |              ^^^^^^^^^^^^^^^^
+LL |             ${count($foo, 10)},
+   |              ^^^^^^^^^^^^^^^^^
 
-error: depth parameter on meta-variable expression `index` must be less than 3
+error: depth parameter of meta-variable expression `index` must be less than 3
   --> $DIR/out-of-bounds-arguments.rs:19:18
    |
 LL |                 ${index(10)},
    |                  ^^^^^^^^^^^
 
-error: depth parameter on meta-variable expression `length` must be less than 2
+error: depth parameter of meta-variable expression `length` must be less than 2
   --> $DIR/out-of-bounds-arguments.rs:32:18
    |
 LL |                 ${length(10)}
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs
index b4fef11f1e2..53d045700f9 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.rs
@@ -1,6 +1,6 @@
 macro_rules! count {
     ( $( $e:stmt ),* ) => {
-        ${ count(e) }
+        ${ count($e) }
         //~^ ERROR meta-variable expressions are unstable
     };
 }
@@ -19,7 +19,7 @@ macro_rules! dollar_dollar {
 
 macro_rules! index {
     ( $( $e:stmt ),* ) => {
-        $( ${ignore(e)} ${index()} )*
+        $( ${ignore($e)} ${index()} )*
         //~^ ERROR meta-variable expressions are unstable
         //~| ERROR meta-variable expressions are unstable
     };
@@ -27,14 +27,14 @@ macro_rules! index {
 
 macro_rules! ignore {
     ( $( $i:stmt ),* ) => {{
-        0 $( + 1 ${ignore(i)} )*
+        0 $( + 1 ${ignore($i)} )*
         //~^ ERROR meta-variable expressions are unstable
     }};
 }
 
 macro_rules! length {
     ( $( $e:stmt ),* ) => {
-        $( ${ignore(e)} ${length()} )*
+        $( ${ignore($e)} ${length()} )*
         //~^ ERROR meta-variable expressions are unstable
         //~| ERROR meta-variable expressions are unstable
     };
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr
index ecf598b104d..2c2cbb15b72 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr
@@ -1,8 +1,8 @@
 error[E0658]: meta-variable expressions are unstable
   --> $DIR/required-feature.rs:3:10
    |
-LL |         ${ count(e) }
-   |          ^^^^^^^^^^^^
+LL |         ${ count($e) }
+   |          ^^^^^^^^^^^^^
    |
    = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
    = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
@@ -46,17 +46,17 @@ LL |             ( $$( $$any:tt )* ) => { $$( $$any )* };
 error[E0658]: meta-variable expressions are unstable
   --> $DIR/required-feature.rs:22:13
    |
-LL |         $( ${ignore(e)} ${index()} )*
-   |             ^^^^^^^^^^^
+LL |         $( ${ignore($e)} ${index()} )*
+   |             ^^^^^^^^^^^^
    |
    = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
    = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
 
 error[E0658]: meta-variable expressions are unstable
-  --> $DIR/required-feature.rs:22:26
+  --> $DIR/required-feature.rs:22:27
    |
-LL |         $( ${ignore(e)} ${index()} )*
-   |                          ^^^^^^^^^
+LL |         $( ${ignore($e)} ${index()} )*
+   |                           ^^^^^^^^^
    |
    = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
    = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
@@ -64,8 +64,8 @@ LL |         $( ${ignore(e)} ${index()} )*
 error[E0658]: meta-variable expressions are unstable
   --> $DIR/required-feature.rs:30:19
    |
-LL |         0 $( + 1 ${ignore(i)} )*
-   |                   ^^^^^^^^^^^
+LL |         0 $( + 1 ${ignore($i)} )*
+   |                   ^^^^^^^^^^^^
    |
    = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
    = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
@@ -73,17 +73,17 @@ LL |         0 $( + 1 ${ignore(i)} )*
 error[E0658]: meta-variable expressions are unstable
   --> $DIR/required-feature.rs:37:13
    |
-LL |         $( ${ignore(e)} ${length()} )*
-   |             ^^^^^^^^^^^
+LL |         $( ${ignore($e)} ${length()} )*
+   |             ^^^^^^^^^^^^
    |
    = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
    = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
 
 error[E0658]: meta-variable expressions are unstable
-  --> $DIR/required-feature.rs:37:26
+  --> $DIR/required-feature.rs:37:27
    |
-LL |         $( ${ignore(e)} ${length()} )*
-   |                          ^^^^^^^^^^
+LL |         $( ${ignore($e)} ${length()} )*
+   |                           ^^^^^^^^^^
    |
    = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
    = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs
index fdf16442d2a..05c65fe8690 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs
+++ b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.rs
@@ -5,24 +5,17 @@
 // `round` = Left hand side round brackets
 
 macro_rules! curly__no_rhs_dollar__round {
-    ( $( $i:ident ),* ) => { ${ count(i) } };
+    ( $( $i:ident ),* ) => { ${ count($i) } };
 }
 
 macro_rules! curly__no_rhs_dollar__no_round {
-    ( $i:ident ) => { ${ count(i) } };
+    ( $i:ident ) => { ${ count($i) } };
     //~^ ERROR `count` can not be placed inside the inner-most repetition
 }
 
-macro_rules! curly__rhs_dollar__round {
-    ( $( $i:ident ),* ) => { ${ count($i) } };
-    //~^ ERROR expected identifier, found `$`
-    //~| ERROR expected expression, found `$`
-}
-
 macro_rules! curly__rhs_dollar__no_round {
     ( $i:ident ) => { ${ count($i) } };
-    //~^ ERROR expected identifier, found `$`
-    //~| ERROR expected expression, found `$`
+    //~^ ERROR `count` can not be placed inside the inner-most repetition
 }
 
 macro_rules! no_curly__no_rhs_dollar__round {
@@ -60,16 +53,16 @@ macro_rules! extra_garbage_after_metavar {
         ${count() a b c}
         //~^ ERROR unexpected token: a
         //~| ERROR expected expression, found `$`
-        ${count(i a b c)}
+        ${count($i a b c)}
         //~^ ERROR unexpected token: a
-        ${count(i, 1 a b c)}
+        ${count($i, 1 a b c)}
         //~^ ERROR unexpected token: a
-        ${count(i) a b c}
+        ${count($i) a b c}
         //~^ ERROR unexpected token: a
 
-        ${ignore(i) a b c}
+        ${ignore($i) a b c}
         //~^ ERROR unexpected token: a
-        ${ignore(i a b c)}
+        ${ignore($i a b c)}
         //~^ ERROR unexpected token: a
 
         ${index() a b c}
@@ -100,8 +93,8 @@ macro_rules! metavar_in_the_lhs {
 
 macro_rules! metavar_token_without_ident {
     ( $( $i:ident ),* ) => { ${ ignore() } };
-    //~^ ERROR expected identifier
-    //~| ERROR expected expression, found `$`
+    //~^ ERROR meta-variable expressions must be referenced using a dollar sign
+    //~| ERROR expected expression
 }
 
 macro_rules! metavar_with_literal_suffix {
@@ -125,14 +118,16 @@ macro_rules! open_brackets_without_tokens {
 macro_rules! unknown_count_ident {
     ( $( $i:ident )* ) => {
         ${count(foo)}
-        //~^ ERROR variable `foo` is not recognized in meta-variable expression
+        //~^ ERROR meta-variable expressions must be referenced using a dollar sign
+        //~| ERROR expected expression
     };
 }
 
 macro_rules! unknown_ignore_ident {
     ( $( $i:ident )* ) => {
         ${ignore(bar)}
-        //~^ ERROR variable `bar` is not recognized in meta-variable expression
+        //~^ ERROR meta-variable expressions must be referenced using a dollar sign
+        //~| ERROR expected expression
     };
 }
 
@@ -145,7 +140,6 @@ macro_rules! unknown_metavar {
 fn main() {
     curly__no_rhs_dollar__round!(a, b, c);
     curly__no_rhs_dollar__no_round!(a);
-    curly__rhs_dollar__round!(a, b, c);
     curly__rhs_dollar__no_round!(a);
     no_curly__no_rhs_dollar__round!(a, b, c);
     no_curly__no_rhs_dollar__no_round!(a);
diff --git a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr
index a6cff95fd91..0dda38290ab 100644
--- a/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr
+++ b/tests/ui/macros/rfc-3086-metavar-expr/syntax-errors.stderr
@@ -1,197 +1,197 @@
-error: expected identifier, found `$`
-  --> $DIR/syntax-errors.rs:17:33
-   |
-LL |     ( $( $i:ident ),* ) => { ${ count($i) } };
-   |                                 ^^^^^ - help: try removing `$`
-
-error: expected identifier, found `$`
-  --> $DIR/syntax-errors.rs:23:26
-   |
-LL |     ( $i:ident ) => { ${ count($i) } };
-   |                          ^^^^^ - help: try removing `$`
-
 error: unexpected token: $
-  --> $DIR/syntax-errors.rs:53:8
+  --> $DIR/syntax-errors.rs:46:8
    |
 LL |     ( $$ $a:ident ) => {
    |        ^
 
 note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
-  --> $DIR/syntax-errors.rs:53:8
+  --> $DIR/syntax-errors.rs:46:8
    |
 LL |     ( $$ $a:ident ) => {
    |        ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:60:19
+  --> $DIR/syntax-errors.rs:53:19
    |
 LL |         ${count() a b c}
    |                   ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:60:19
+  --> $DIR/syntax-errors.rs:53:19
    |
 LL |         ${count() a b c}
    |                   ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:63:19
+  --> $DIR/syntax-errors.rs:56:20
    |
-LL |         ${count(i a b c)}
-   |                   ^
+LL |         ${count($i a b c)}
+   |                    ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:63:19
+  --> $DIR/syntax-errors.rs:56:20
    |
-LL |         ${count(i a b c)}
-   |                   ^
+LL |         ${count($i a b c)}
+   |                    ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:65:22
+  --> $DIR/syntax-errors.rs:58:23
    |
-LL |         ${count(i, 1 a b c)}
-   |                      ^
+LL |         ${count($i, 1 a b c)}
+   |                       ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:65:22
+  --> $DIR/syntax-errors.rs:58:23
    |
-LL |         ${count(i, 1 a b c)}
-   |                      ^
+LL |         ${count($i, 1 a b c)}
+   |                       ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:67:20
+  --> $DIR/syntax-errors.rs:60:21
    |
-LL |         ${count(i) a b c}
-   |                    ^
+LL |         ${count($i) a b c}
+   |                     ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:67:20
+  --> $DIR/syntax-errors.rs:60:21
    |
-LL |         ${count(i) a b c}
-   |                    ^
+LL |         ${count($i) a b c}
+   |                     ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:70:21
+  --> $DIR/syntax-errors.rs:63:22
    |
-LL |         ${ignore(i) a b c}
-   |                     ^
+LL |         ${ignore($i) a b c}
+   |                      ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:70:21
+  --> $DIR/syntax-errors.rs:63:22
    |
-LL |         ${ignore(i) a b c}
-   |                     ^
+LL |         ${ignore($i) a b c}
+   |                      ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:72:20
+  --> $DIR/syntax-errors.rs:65:21
    |
-LL |         ${ignore(i a b c)}
-   |                    ^
+LL |         ${ignore($i a b c)}
+   |                     ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:72:20
+  --> $DIR/syntax-errors.rs:65:21
    |
-LL |         ${ignore(i a b c)}
-   |                    ^
+LL |         ${ignore($i a b c)}
+   |                     ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:75:19
+  --> $DIR/syntax-errors.rs:68:19
    |
 LL |         ${index() a b c}
    |                   ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:75:19
+  --> $DIR/syntax-errors.rs:68:19
    |
 LL |         ${index() a b c}
    |                   ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:77:19
+  --> $DIR/syntax-errors.rs:70:19
    |
 LL |         ${index(1 a b c)}
    |                   ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:77:19
+  --> $DIR/syntax-errors.rs:70:19
    |
 LL |         ${index(1 a b c)}
    |                   ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:80:19
+  --> $DIR/syntax-errors.rs:73:19
    |
 LL |         ${index() a b c}
    |                   ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:80:19
+  --> $DIR/syntax-errors.rs:73:19
    |
 LL |         ${index() a b c}
    |                   ^
 
 error: unexpected token: a
-  --> $DIR/syntax-errors.rs:82:19
+  --> $DIR/syntax-errors.rs:75:19
    |
 LL |         ${index(1 a b c)}
    |                   ^
    |
 note: meta-variable expression must not have trailing tokens
-  --> $DIR/syntax-errors.rs:82:19
+  --> $DIR/syntax-errors.rs:75:19
    |
 LL |         ${index(1 a b c)}
    |                   ^
 
 error: meta-variable expression depth must be a literal
-  --> $DIR/syntax-errors.rs:89:33
+  --> $DIR/syntax-errors.rs:82:33
    |
 LL |     ( $( $i:ident ),* ) => { ${ index(IDX) } };
    |                                 ^^^^^
 
 error: unexpected token: {
-  --> $DIR/syntax-errors.rs:95:8
+  --> $DIR/syntax-errors.rs:88:8
    |
 LL |     ( ${ length() } ) => {
    |        ^^^^^^^^^^^^
 
 note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
-  --> $DIR/syntax-errors.rs:95:8
+  --> $DIR/syntax-errors.rs:88:8
    |
 LL |     ( ${ length() } ) => {
    |        ^^^^^^^^^^^^
 
 error: expected one of: `*`, `+`, or `?`
-  --> $DIR/syntax-errors.rs:95:8
+  --> $DIR/syntax-errors.rs:88:8
    |
 LL |     ( ${ length() } ) => {
    |        ^^^^^^^^^^^^
 
-error: expected identifier
-  --> $DIR/syntax-errors.rs:102:33
+error: meta-variables within meta-variable expressions must be referenced using a dollar sign
+  --> $DIR/syntax-errors.rs:95:33
    |
 LL |     ( $( $i:ident ),* ) => { ${ ignore() } };
    |                                 ^^^^^^
 
 error: only unsuffixes integer literals are supported in meta-variable expressions
-  --> $DIR/syntax-errors.rs:108:33
+  --> $DIR/syntax-errors.rs:101:33
    |
 LL |     ( $( $i:ident ),* ) => { ${ index(1u32) } };
    |                                 ^^^^^
 
 error: meta-variable expression parameter must be wrapped in parentheses
-  --> $DIR/syntax-errors.rs:114:33
+  --> $DIR/syntax-errors.rs:107:33
    |
 LL |     ( $( $i:ident ),* ) => { ${ count{i} } };
    |                                 ^^^^^
 
 error: expected identifier
-  --> $DIR/syntax-errors.rs:120:31
+  --> $DIR/syntax-errors.rs:113:31
    |
 LL |     ( $( $i:ident ),* ) => { ${ {} } };
    |                               ^^^^^^
 
+error: meta-variables within meta-variable expressions must be referenced using a dollar sign
+  --> $DIR/syntax-errors.rs:120:11
+   |
+LL |         ${count(foo)}
+   |           ^^^^^
+
+error: meta-variables within meta-variable expressions must be referenced using a dollar sign
+  --> $DIR/syntax-errors.rs:128:11
+   |
+LL |         ${ignore(bar)}
+   |           ^^^^^^
+
 error: unrecognized meta-variable expression
-  --> $DIR/syntax-errors.rs:140:33
+  --> $DIR/syntax-errors.rs:135:33
    |
 LL |     ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
    |                                 ^^^^^^^^^^^^^^ help: supported expressions are count, ignore, index and length
@@ -199,39 +199,23 @@ LL |     ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
 error: `count` can not be placed inside the inner-most repetition
   --> $DIR/syntax-errors.rs:12:24
    |
-LL |     ( $i:ident ) => { ${ count(i) } };
-   |                        ^^^^^^^^^^^^
-
-error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:17:30
-   |
-LL |     ( $( $i:ident ),* ) => { ${ count($i) } };
-   |                              ^ expected expression
-...
-LL |     curly__rhs_dollar__round!(a, b, c);
-   |     ---------------------------------- in this macro invocation
-   |
-   = note: this error originates in the macro `curly__rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
+LL |     ( $i:ident ) => { ${ count($i) } };
+   |                        ^^^^^^^^^^^^^
 
-error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:23:23
+error: `count` can not be placed inside the inner-most repetition
+  --> $DIR/syntax-errors.rs:17:24
    |
 LL |     ( $i:ident ) => { ${ count($i) } };
-   |                       ^ expected expression
-...
-LL |     curly__rhs_dollar__no_round!(a);
-   |     ------------------------------- in this macro invocation
-   |
-   = note: this error originates in the macro `curly__rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
+   |                        ^^^^^^^^^^^^^
 
 error: variable 'i' is still repeating at this depth
-  --> $DIR/syntax-errors.rs:41:36
+  --> $DIR/syntax-errors.rs:34:36
    |
 LL |     ( $( $i:ident ),* ) => { count($i) };
    |                                    ^^
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:60:9
+  --> $DIR/syntax-errors.rs:53:9
    |
 LL |         ${count() a b c}
    |         ^ expected expression
@@ -242,7 +226,7 @@ LL |     extra_garbage_after_metavar!(a);
    = note: this error originates in the macro `extra_garbage_after_metavar` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:89:30
+  --> $DIR/syntax-errors.rs:82:30
    |
 LL |     ( $( $i:ident ),* ) => { ${ index(IDX) } };
    |                              ^ expected expression
@@ -253,7 +237,7 @@ LL |     metavar_depth_is_not_literal!(a);
    = note: this error originates in the macro `metavar_depth_is_not_literal` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:102:30
+  --> $DIR/syntax-errors.rs:95:30
    |
 LL |     ( $( $i:ident ),* ) => { ${ ignore() } };
    |                              ^ expected expression
@@ -264,7 +248,7 @@ LL |     metavar_token_without_ident!(a);
    = note: this error originates in the macro `metavar_token_without_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:108:30
+  --> $DIR/syntax-errors.rs:101:30
    |
 LL |     ( $( $i:ident ),* ) => { ${ index(1u32) } };
    |                              ^ expected expression
@@ -275,7 +259,7 @@ LL |     metavar_with_literal_suffix!(a);
    = note: this error originates in the macro `metavar_with_literal_suffix` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:114:30
+  --> $DIR/syntax-errors.rs:107:30
    |
 LL |     ( $( $i:ident ),* ) => { ${ count{i} } };
    |                              ^ expected expression
@@ -286,7 +270,7 @@ LL |     metavar_without_parens!(a);
    = note: this error originates in the macro `metavar_without_parens` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:120:30
+  --> $DIR/syntax-errors.rs:113:30
    |
 LL |     ( $( $i:ident ),* ) => { ${ {} } };
    |                              ^ expected expression
@@ -296,20 +280,30 @@ LL |     open_brackets_without_tokens!(a);
    |
    = note: this error originates in the macro `open_brackets_without_tokens` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: variable `foo` is not recognized in meta-variable expression
-  --> $DIR/syntax-errors.rs:127:17
+error: expected expression, found `$`
+  --> $DIR/syntax-errors.rs:120:9
    |
 LL |         ${count(foo)}
-   |                 ^^^
+   |         ^ expected expression
+...
+LL |     unknown_count_ident!(a);
+   |     ----------------------- in this macro invocation
+   |
+   = note: this error originates in the macro `unknown_count_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: variable `bar` is not recognized in meta-variable expression
-  --> $DIR/syntax-errors.rs:134:18
+error: expected expression, found `$`
+  --> $DIR/syntax-errors.rs:128:9
    |
 LL |         ${ignore(bar)}
-   |                  ^^^
+   |         ^ expected expression
+...
+LL |     unknown_ignore_ident!(a);
+   |     ------------------------ in this macro invocation
+   |
+   = note: this error originates in the macro `unknown_ignore_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected expression, found `$`
-  --> $DIR/syntax-errors.rs:140:30
+  --> $DIR/syntax-errors.rs:135:30
    |
 LL |     ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
    |                              ^ expected expression
@@ -320,7 +314,7 @@ LL |     unknown_metavar!(a);
    = note: this error originates in the macro `unknown_metavar` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `i` in this scope
-  --> $DIR/syntax-errors.rs:29:36
+  --> $DIR/syntax-errors.rs:22:36
    |
 LL |     ( $( $i:ident ),* ) => { count(i) };
    |                                    ^ not found in this scope
@@ -331,7 +325,7 @@ LL |     no_curly__no_rhs_dollar__round!(a, b, c);
    = note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `i` in this scope
-  --> $DIR/syntax-errors.rs:35:29
+  --> $DIR/syntax-errors.rs:28:29
    |
 LL |     ( $i:ident ) => { count(i) };
    |                             ^ not found in this scope
@@ -342,13 +336,13 @@ LL |     no_curly__no_rhs_dollar__no_round!(a);
    = note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `a` in this scope
-  --> $DIR/syntax-errors.rs:153:37
+  --> $DIR/syntax-errors.rs:147:37
    |
 LL |     no_curly__rhs_dollar__no_round!(a);
    |                                     ^ not found in this scope
 
 error[E0425]: cannot find function `count` in this scope
-  --> $DIR/syntax-errors.rs:29:30
+  --> $DIR/syntax-errors.rs:22:30
    |
 LL |     ( $( $i:ident ),* ) => { count(i) };
    |                              ^^^^^ not found in this scope
@@ -359,7 +353,7 @@ LL |     no_curly__no_rhs_dollar__round!(a, b, c);
    = note: this error originates in the macro `no_curly__no_rhs_dollar__round` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find function `count` in this scope
-  --> $DIR/syntax-errors.rs:35:23
+  --> $DIR/syntax-errors.rs:28:23
    |
 LL |     ( $i:ident ) => { count(i) };
    |                       ^^^^^ not found in this scope
@@ -370,7 +364,7 @@ LL |     no_curly__no_rhs_dollar__no_round!(a);
    = note: this error originates in the macro `no_curly__no_rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find function `count` in this scope
-  --> $DIR/syntax-errors.rs:46:23
+  --> $DIR/syntax-errors.rs:39:23
    |
 LL |     ( $i:ident ) => { count($i) };
    |                       ^^^^^ not found in this scope
@@ -380,6 +374,6 @@ LL |     no_curly__rhs_dollar__no_round!(a);
    |
    = note: this error originates in the macro `no_curly__rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 40 previous errors
+error: aborting due to 39 previous errors
 
 For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/malformed/malformed-interpolated.rs b/tests/ui/malformed/malformed-interpolated.rs
index 0d84e723fc3..0d801ebd3ac 100644
--- a/tests/ui/malformed/malformed-interpolated.rs
+++ b/tests/ui/malformed/malformed-interpolated.rs
@@ -10,7 +10,7 @@ macro_rules! check {
 check!("0"); // OK
 check!(0); // OK
 check!(0u8); //~ ERROR suffixed literals are not allowed in attributes
-check!(-0); //~ ERROR unexpected expression: `-0`
-check!(0 + 0); //~ ERROR unexpected expression: `0 + 0`
+check!(-0); //~ ERROR attribute value must be a literal
+check!(0 + 0); //~ ERROR attribute value must be a literal
 
 fn main() {}
diff --git a/tests/ui/malformed/malformed-interpolated.stderr b/tests/ui/malformed/malformed-interpolated.stderr
index c24d9f15388..92e99b7a70b 100644
--- a/tests/ui/malformed/malformed-interpolated.stderr
+++ b/tests/ui/malformed/malformed-interpolated.stderr
@@ -6,13 +6,13 @@ LL | check!(0u8);
    |
    = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
 
-error: unexpected expression: `-0`
+error: attribute value must be a literal
   --> $DIR/malformed-interpolated.rs:13:8
    |
 LL | check!(-0);
    |        ^^
 
-error: unexpected expression: `0 + 0`
+error: attribute value must be a literal
   --> $DIR/malformed-interpolated.rs:14:8
    |
 LL | check!(0 + 0);
diff --git a/tests/ui/parser/bad-lit-suffixes.rs b/tests/ui/parser/bad-lit-suffixes.rs
index 8cb9ef7e0c9..c614f493885 100644
--- a/tests/ui/parser/bad-lit-suffixes.rs
+++ b/tests/ui/parser/bad-lit-suffixes.rs
@@ -28,11 +28,12 @@ fn main() {
 }
 
 #[rustc_dummy = "string"suffix]
-//~^ ERROR unexpected expression: `"string"suffix`
+//~^ ERROR suffixes on string literals are invalid
 fn f() {}
 
 #[must_use = "string"suffix]
-//~^ ERROR unexpected expression: `"string"suffix`
+//~^ ERROR suffixes on string literals are invalid
+//~| ERROR malformed `must_use` attribute input
 fn g() {}
 
 #[link(name = "string"suffix)]
diff --git a/tests/ui/parser/bad-lit-suffixes.stderr b/tests/ui/parser/bad-lit-suffixes.stderr
index 756f99ab12c..b5dacdf7d0d 100644
--- a/tests/ui/parser/bad-lit-suffixes.stderr
+++ b/tests/ui/parser/bad-lit-suffixes.stderr
@@ -10,26 +10,39 @@ error: suffixes on string literals are invalid
 LL |     "C"suffix
    |     ^^^^^^^^^ invalid suffix `suffix`
 
-error: unexpected expression: `"string"suffix`
+error: suffixes on string literals are invalid
   --> $DIR/bad-lit-suffixes.rs:30:17
    |
 LL | #[rustc_dummy = "string"suffix]
-   |                 ^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^ invalid suffix `suffix`
 
-error: unexpected expression: `"string"suffix`
+error: suffixes on string literals are invalid
   --> $DIR/bad-lit-suffixes.rs:34:14
    |
 LL | #[must_use = "string"suffix]
-   |              ^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^ invalid suffix `suffix`
+
+error: malformed `must_use` attribute input
+  --> $DIR/bad-lit-suffixes.rs:34:1
+   |
+LL | #[must_use = "string"suffix]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: the following are the possible correct uses
+   |
+LL | #[must_use = "reason"]
+   |
+LL | #[must_use]
+   |
 
 error: suffixes on string literals are invalid
-  --> $DIR/bad-lit-suffixes.rs:38:15
+  --> $DIR/bad-lit-suffixes.rs:39:15
    |
 LL | #[link(name = "string"suffix)]
    |               ^^^^^^^^^^^^^^ invalid suffix `suffix`
 
 error: invalid suffix `suffix` for number literal
-  --> $DIR/bad-lit-suffixes.rs:42:41
+  --> $DIR/bad-lit-suffixes.rs:43:41
    |
 LL | #[rustc_layout_scalar_valid_range_start(0suffix)]
    |                                         ^^^^^^^ invalid suffix `suffix`
@@ -136,5 +149,5 @@ LL |     1.0e10suffix;
    |
    = help: valid suffixes are `f32` and `f64`
 
-error: aborting due to 20 previous errors
+error: aborting due to 21 previous errors
 
diff --git a/tests/ui/parser/issues/issue-104620.rs b/tests/ui/parser/issues/issue-104620.rs
index f49476c4408..fd0916b4411 100644
--- a/tests/ui/parser/issues/issue-104620.rs
+++ b/tests/ui/parser/issues/issue-104620.rs
@@ -1,4 +1,4 @@
 #![feature(rustc_attrs)]
 
-#![rustc_dummy=5z] //~ ERROR unexpected expression: `5z`
+#![rustc_dummy=5z] //~ ERROR invalid suffix `z` for number literal
 fn main() {}
diff --git a/tests/ui/parser/issues/issue-104620.stderr b/tests/ui/parser/issues/issue-104620.stderr
index fa20b5f8b16..040c63a5fbf 100644
--- a/tests/ui/parser/issues/issue-104620.stderr
+++ b/tests/ui/parser/issues/issue-104620.stderr
@@ -1,8 +1,10 @@
-error: unexpected expression: `5z`
+error: invalid suffix `z` for number literal
   --> $DIR/issue-104620.rs:3:16
    |
 LL | #![rustc_dummy=5z]
-   |                ^^
+   |                ^^ invalid suffix `z`
+   |
+   = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/print_type_sizes/coroutine_discr_placement.stdout b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
index f34a8e9a706..71a7f3c6381 100644
--- a/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
+++ b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
@@ -9,3 +9,9 @@ print-type-size         padding: 3 bytes
 print-type-size         local `.z`: 4 bytes, alignment: 4 bytes
 print-type-size     variant `Returned`: 0 bytes
 print-type-size     variant `Panicked`: 0 bytes
+print-type-size type: `std::mem::ManuallyDrop<i32>`: 4 bytes, alignment: 4 bytes
+print-type-size     field `.value`: 4 bytes
+print-type-size type: `std::mem::MaybeUninit<i32>`: 4 bytes, alignment: 4 bytes
+print-type-size     variant `MaybeUninit`: 4 bytes
+print-type-size         field `.uninit`: 0 bytes
+print-type-size         field `.value`: 4 bytes
diff --git a/tests/ui/self/elision/nested-item.stderr b/tests/ui/self/elision/nested-item.stderr
index 752fd82332c..7bad26fa133 100644
--- a/tests/ui/self/elision/nested-item.stderr
+++ b/tests/ui/self/elision/nested-item.stderr
@@ -21,10 +21,19 @@ LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
    |                                              ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &'static () {
    |                                               +++++++
+help: instead, you are more likely to want to change the argument to be borrowed...
+   |
+LL | fn wrap(self: &Wrap<{ fn bar(&self) {} }>) -> &() {
+   |               +
+help: ...or alternatively, you might want to return an owned value
+   |
+LL - fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+LL + fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> () {
+   |
 
 error[E0412]: cannot find type `Wrap` in this scope
   --> $DIR/nested-item.rs:5:15
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
index 50806a67255..2dfaa731194 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr
@@ -5,10 +5,19 @@ LL |     fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
    |                                                      ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     fn g(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() }
    |                                                       +++++++
+help: consider introducing a named lifetime parameter
+   |
+LL |     fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |         ++++                             ~~~                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL -     fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
+LL +     fn g(mut x: impl Iterator<Item = &()>) -> Option<()> { x.next() }
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/impl-trait-missing-lifetime-gated.rs:19:60
@@ -17,10 +26,19 @@ LL |     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next()
    |                                                            ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() }
    |                                                             +++++++
+help: consider introducing a named lifetime parameter
+   |
+LL |     async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |               ++++                             ~~~                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL -     async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
+LL +     async fn i(mut x: impl Iterator<Item = &()>) -> Option<()> { x.next() }
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/impl-trait-missing-lifetime-gated.rs:27:58
@@ -29,10 +47,19 @@ LL |     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next()
    |                                                          ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL |     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
    |                                                          ~~~~~~~
+help: consider introducing a named lifetime parameter
+   |
+LL |     fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |         ++++                             ~~~                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL -     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL +     fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/impl-trait-missing-lifetime-gated.rs:37:64
@@ -41,10 +68,19 @@ LL |     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.n
    |                                                                ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL |     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
    |                                                                ~~~~~~~
+help: consider introducing a named lifetime parameter
+   |
+LL |     async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |               ++++                             ~~~                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL -     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL +     async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/impl-trait-missing-lifetime-gated.rs:47:37
@@ -53,10 +89,19 @@ LL |     fn g(mut x: impl Foo) -> Option<&()> { x.next() }
    |                                     ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     fn g(mut x: impl Foo) -> Option<&'static ()> { x.next() }
    |                                      +++++++
+help: consider introducing a named lifetime parameter
+   |
+LL |     fn g<'a>(mut x: impl Foo) -> Option<&'a ()> { x.next() }
+   |         ++++                            ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL -     fn g(mut x: impl Foo) -> Option<&()> { x.next() }
+LL +     fn g(mut x: impl Foo) -> Option<()> { x.next() }
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/impl-trait-missing-lifetime-gated.rs:58:41
@@ -65,10 +110,19 @@ LL |     fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
    |                                         ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     fn g(mut x: impl Foo<()>) -> Option<&'static ()> { x.next() }
    |                                          +++++++
+help: consider introducing a named lifetime parameter
+   |
+LL |     fn g<'a>(mut x: impl Foo<()>) -> Option<&'a ()> { x.next() }
+   |         ++++                                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL -     fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
+LL +     fn g(mut x: impl Foo<()>) -> Option<()> { x.next() }
+   |
 
 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
   --> $DIR/impl-trait-missing-lifetime-gated.rs:6:35
diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime.stderr
index 2c29cfa0b91..c1dbaae0649 100644
--- a/tests/ui/suggestions/impl-trait-missing-lifetime.stderr
+++ b/tests/ui/suggestions/impl-trait-missing-lifetime.stderr
@@ -5,10 +5,19 @@ LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
    |                                                      ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
    |                                                      ~~~~~~~
+help: consider introducing a named lifetime parameter
+   |
+LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |     ++++                             ~~~                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL - fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL + fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+   |
 
 error[E0106]: missing lifetime specifier
   --> $DIR/impl-trait-missing-lifetime.rs:16:60
@@ -17,10 +26,19 @@ LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next(
    |                                                            ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
    |                                                            ~~~~~~~
+help: consider introducing a named lifetime parameter
+   |
+LL | async fn i<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'a ()> { x.next() }
+   |           ++++                             ~~~                ~~~
+help: alternatively, you might want to return an owned value
+   |
+LL - async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
+LL + async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<()> { x.next() }
+   |
 
 error: lifetime may not live long enough
   --> $DIR/impl-trait-missing-lifetime.rs:16:69
diff --git a/tests/ui/suggestions/missing-lifetime-specifier.stderr b/tests/ui/suggestions/missing-lifetime-specifier.stderr
index fa4bc2fa79d..e41f547ce9b 100644
--- a/tests/ui/suggestions/missing-lifetime-specifier.stderr
+++ b/tests/ui/suggestions/missing-lifetime-specifier.stderr
@@ -5,7 +5,7 @@ LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::
    |                                            ^^^ expected 2 lifetime parameters
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefCell::new(HashMap::new());
    |                                               ++++++++++++++++++
@@ -32,7 +32,7 @@ LL |     static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap:
    |                                            expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
    |                                             +++++++    ++++++++++++++++++
@@ -59,7 +59,7 @@ LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(Hash
    |                                               ^ expected 2 lifetime parameters
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                                +++++++++++++++++
@@ -86,7 +86,7 @@ LL |     static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(Has
    |                                            expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                             +++++++     +++++++++++++++++
@@ -113,7 +113,7 @@ LL |     static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell
    |                                            ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL |     static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
    |                                             +++++++
diff --git a/tests/ui/suggestions/return-elided-lifetime.stderr b/tests/ui/suggestions/return-elided-lifetime.stderr
index 273d95bc747..7bfffd30184 100644
--- a/tests/ui/suggestions/return-elided-lifetime.stderr
+++ b/tests/ui/suggestions/return-elided-lifetime.stderr
@@ -5,10 +5,15 @@ LL | fn f1() -> &i32 { loop {} }
    |            ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn f1() -> &'static i32 { loop {} }
    |             +++++++
+help: instead, you are more likely to want to return an owned value
+   |
+LL - fn f1() -> &i32 { loop {} }
+LL + fn f1() -> i32 { loop {} }
+   |
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/return-elided-lifetime.rs:8:14
@@ -19,7 +24,7 @@ LL | fn f1_() -> (&i32, &i32) { loop {} }
    |              expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn f1_() -> (&'static i32, &'static i32) { loop {} }
    |               +++++++       +++++++
@@ -31,10 +36,19 @@ LL | fn f2(a: i32, b: i32) -> &i32 { loop {} }
    |                          ^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn f2(a: i32, b: i32) -> &'static i32 { loop {} }
    |                           +++++++
+help: instead, you are more likely to want to change one of the arguments to be borrowed...
+   |
+LL | fn f2(a: &i32, b: &i32) -> &i32 { loop {} }
+   |          +        +
+help: ...or alternatively, you might want to return an owned value
+   |
+LL - fn f2(a: i32, b: i32) -> &i32 { loop {} }
+LL + fn f2(a: i32, b: i32) -> i32 { loop {} }
+   |
 
 error[E0106]: missing lifetime specifiers
   --> $DIR/return-elided-lifetime.rs:13:28
@@ -45,7 +59,7 @@ LL | fn f2_(a: i32, b: i32) -> (&i32, &i32) { loop {} }
    |                            expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
    |
 LL | fn f2_(a: i32, b: i32) -> (&'static i32, &'static i32) { loop {} }
    |                             +++++++       +++++++
diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
index a53879657f5..8f5b937e586 100644
--- a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
+++ b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
@@ -50,7 +50,7 @@ LL |     is_send((8, TestType));
    |     required by a bound introduced by this call
    |
    = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
-   = note: required because it appears within the type `({integer}, TestType)`
+   = note: required because it appears within the type `({integer}, dummy1c::TestType)`
 note: required by a bound in `is_send`
   --> $DIR/negated-auto-traits-error.rs:16:15
    |
@@ -67,7 +67,7 @@ LL |     is_send(Box::new(TestType));
    |
    = note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied
    = note: required for `Unique<dummy2::TestType>` to implement `Send`
-note: required because it appears within the type `Box<TestType>`
+note: required because it appears within the type `Box<dummy2::TestType>`
   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `is_send`
   --> $DIR/negated-auto-traits-error.rs:16:15
@@ -88,13 +88,13 @@ LL |     is_send(Box::new(Outer2(TestType)));
    |     required by a bound introduced by this call
    |
    = help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
-note: required because it appears within the type `Outer2<TestType>`
+note: required because it appears within the type `Outer2<dummy3::TestType>`
   --> $DIR/negated-auto-traits-error.rs:12:8
    |
 LL | struct Outer2<T>(T);
    |        ^^^^^^
    = note: required for `Unique<Outer2<dummy3::TestType>>` to implement `Send`
-note: required because it appears within the type `Box<Outer2<TestType>>`
+note: required because it appears within the type `Box<Outer2<dummy3::TestType>>`
   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `is_send`
   --> $DIR/negated-auto-traits-error.rs:16:15
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.rs b/tests/ui/traits/new-solver/alias-bound-unsound.rs
index 907a3010355..ab84e3875e2 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.rs
+++ b/tests/ui/traits/new-solver/alias-bound-unsound.rs
@@ -27,5 +27,6 @@ fn main() {
     //~| ERROR overflow evaluating the requirement `<() as Foo>::Item well-formed`
     //~| ERROR overflow evaluating the requirement `String <: <() as Foo>::Item`
     //~| ERROR overflow evaluating the requirement `&<() as Foo>::Item well-formed`
+    //~| ERROR overflow evaluating the requirement `<() as Foo>::Item normalizes-to _`
     println!("{x}");
 }
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.stderr b/tests/ui/traits/new-solver/alias-bound-unsound.stderr
index 29d4d983c03..b09c22f3f41 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.stderr
+++ b/tests/ui/traits/new-solver/alias-bound-unsound.stderr
@@ -52,6 +52,15 @@ LL |     drop(<() as Foo>::copy_me(&x));
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`alias_bound_unsound`)
 
-error: aborting due to 6 previous errors
+error[E0275]: overflow evaluating the requirement `<() as Foo>::Item normalizes-to _`
+  --> $DIR/alias-bound-unsound.rs:24:10
+   |
+LL |     drop(<() as Foo>::copy_me(&x));
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`alias_bound_unsound`)
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs b/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs
index 7fe242f4714..94d645a9859 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs
+++ b/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.rs
@@ -1,7 +1,5 @@
 // compile-flags: -Ztrait-solver=next
 // known-bug: trait-system-refactor-initiative#60
-// dont-check-failure-status
-// dont-check-compiler-stderr
 
 // Generalizing a projection containing an inference variable
 // which cannot be named by the `root_vid` can result in ambiguity.
diff --git a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr b/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr
index b2a523ba620..e4922b0c3e9 100644
--- a/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr
+++ b/tests/ui/traits/new-solver/generalize/generalize-proj-new-universe-index-2.stderr
@@ -1,17 +1,8 @@
-error[E0284]: type annotations needed: cannot satisfy `<<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc == <<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc`
+error[E0284]: type annotations needed: cannot satisfy `<<Rigid as IdHigherRankedBound>::Assoc as WithAssoc<<Wrapper<Leaf> as Id>::Assoc>>::Assoc normalizes-to <<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc`
   --> $DIR/generalize-proj-new-universe-index-2.rs:74:5
    |
 LL |     bound::<<Rigid as IdHigherRankedBound>::Assoc, <Wrapper<Leaf> as Id>::Assoc, _>()
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc == <<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc`
-   |
-note: required by a bound in `bound`
-  --> $DIR/generalize-proj-new-universe-index-2.rs:69:21
-   |
-LL | fn bound<T: ?Sized, U: ?Sized, V: ?Sized>()
-   |    ----- required by a bound in this function
-LL | where
-LL |     T: WithAssoc<U, Assoc = V>,
-   |                     ^^^^^^^^^ required by this bound in `bound`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<<Rigid as IdHigherRankedBound>::Assoc as WithAssoc<<Wrapper<Leaf> as Id>::Assoc>>::Assoc normalizes-to <<Leaf as WithAssoc<_>>::Assoc as Id>::Assoc`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs b/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs
index d086db475ac..3e10b2b595e 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs
+++ b/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.rs
@@ -1,4 +1,3 @@
-//~ ERROR overflow
 // compile-flags: -Ztrait-solver=next
 
 trait Foo1 {
@@ -15,6 +14,7 @@ fn needs_bar<S: Bar>() {}
 fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() {
     needs_bar::<T::Assoc1>();
     //~^ ERROR overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
+    //~| ERROR overflow evaluating the requirement `<T as Foo2>::Assoc2`
 }
 
 fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr b/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr
index 1dc63fae98c..eda62b99c44 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr
+++ b/tests/ui/traits/new-solver/overflow/recursive-self-normalization-2.stderr
@@ -1,17 +1,21 @@
 error[E0275]: overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
-  --> $DIR/recursive-self-normalization-2.rs:16:17
+  --> $DIR/recursive-self-normalization-2.rs:15:17
    |
 LL |     needs_bar::<T::Assoc1>();
    |                 ^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
 note: required by a bound in `needs_bar`
-  --> $DIR/recursive-self-normalization-2.rs:13:17
+  --> $DIR/recursive-self-normalization-2.rs:12:17
    |
 LL | fn needs_bar<S: Bar>() {}
    |                 ^^^ required by this bound in `needs_bar`
 
 error[E0275]: overflow evaluating the requirement `<T as Foo2>::Assoc2`
+  --> $DIR/recursive-self-normalization-2.rs:15:5
+   |
+LL |     needs_bar::<T::Assoc1>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
 
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs b/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs
index d15df7dea73..36ef856a466 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs
+++ b/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs
@@ -1,4 +1,3 @@
-//~ ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
 // compile-flags: -Ztrait-solver=next
 
 trait Foo {
@@ -11,6 +10,7 @@ fn needs_bar<S: Bar>() {}
 fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() {
     needs_bar::<T::Assoc>();
     //~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
+    //~| ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
 }
 
 fn main() {}
diff --git a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr b/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr
index afc5bfa54ac..b0a0a69761a 100644
--- a/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr
+++ b/tests/ui/traits/new-solver/overflow/recursive-self-normalization.stderr
@@ -1,17 +1,21 @@
 error[E0275]: overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
-  --> $DIR/recursive-self-normalization.rs:12:17
+  --> $DIR/recursive-self-normalization.rs:11:17
    |
 LL |     needs_bar::<T::Assoc>();
    |                 ^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
 note: required by a bound in `needs_bar`
-  --> $DIR/recursive-self-normalization.rs:9:17
+  --> $DIR/recursive-self-normalization.rs:8:17
    |
 LL | fn needs_bar<S: Bar>() {}
    |                 ^^^ required by this bound in `needs_bar`
 
 error[E0275]: overflow evaluating the requirement `<T as Foo>::Assoc`
+  --> $DIR/recursive-self-normalization.rs:11:5
+   |
+LL |     needs_bar::<T::Assoc>();
+   |     ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
 
diff --git a/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr
index 50401791eff..cd74d27dcb5 100644
--- a/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr
+++ b/tests/ui/underscore-lifetime/underscore-lifetime-binders.stderr
@@ -28,7 +28,7 @@ LL | fn meh() -> Box<dyn for<'_> Meh<'_>>
    |                                 ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
-help: consider using the `'static` lifetime
+help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
    |
 LL | fn meh() -> Box<dyn for<'_> Meh<'static>>
    |                                 ~~~~~~~