about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly-llvm/regparm-module-flag.rs70
-rw-r--r--tests/auxiliary/minicore.rs7
-rw-r--r--tests/codegen-llvm/enum/enum-aggregate.rs8
-rw-r--r--tests/codegen-llvm/enum/enum-match.rs2
-rw-r--r--tests/codegen-llvm/enum/enum-transparent-extract.rs2
-rw-r--r--tests/codegen-llvm/issues/issue-122734-match-eq.rs78
-rw-r--r--tests/codegen-llvm/repeat-operand-zero-len.rs4
-rw-r--r--tests/codegen-llvm/sanitizer/cfi/emit-type-checks-attr-sanitize-off.rs (renamed from tests/codegen-llvm/sanitizer/cfi/emit-type-checks-attr-no-sanitize.rs)6
-rw-r--r--tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs4
-rw-r--r--tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs (renamed from tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-no-sanitize.rs)6
-rw-r--r--tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs42
-rw-r--r--tests/codegen-llvm/sanitizer/sanitize-off-inlining.rs (renamed from tests/codegen-llvm/sanitizer/no-sanitize-inlining.rs)6
-rw-r--r--tests/codegen-llvm/sanitizer/sanitize-off-kasan-asan.rs (renamed from tests/codegen-llvm/sanitizer/no-sanitize.rs)22
-rw-r--r--tests/codegen-llvm/sanitizer/sanitize-off.rs138
-rw-r--r--tests/codegen-llvm/sanitizer/scs-attr-check.rs4
-rw-r--r--tests/codegen-llvm/transmute-scalar.rs13
-rw-r--r--tests/codegen-llvm/uninhabited-transparent-return-abi.rs2
-rw-r--r--tests/mir-opt/inline/inline_compatibility.rs22
-rw-r--r--tests/run-make/emit-shared-files/rmake.rs2
-rw-r--r--tests/run-make/linker-warning/short-error.txt2
-rw-r--r--tests/run-make/rustdoc-determinism/rmake.rs4
-rw-r--r--tests/run-make/rustdoc-scrape-examples-paths/rmake.rs16
-rw-r--r--tests/rustdoc-gui/code-example-buttons.goml8
-rw-r--r--tests/rustdoc-gui/copy-code.goml2
-rw-r--r--tests/rustdoc-gui/cursor.goml7
-rw-r--r--tests/rustdoc-gui/docblock-code-block-line-number.goml8
-rw-r--r--tests/rustdoc-gui/escape-key.goml11
-rw-r--r--tests/rustdoc-gui/font-serif-change.goml4
-rw-r--r--tests/rustdoc-gui/globals.goml5
-rw-r--r--tests/rustdoc-gui/help-page.goml18
-rw-r--r--tests/rustdoc-gui/hide-mobile-topbar.goml9
-rw-r--r--tests/rustdoc-gui/huge-logo.goml5
-rw-r--r--tests/rustdoc-gui/item-info.goml2
-rw-r--r--tests/rustdoc-gui/mobile-crate-name.goml14
-rw-r--r--tests/rustdoc-gui/mobile.goml2
-rw-r--r--tests/rustdoc-gui/notable-trait.goml26
-rw-r--r--tests/rustdoc-gui/pocket-menu.goml67
-rw-r--r--tests/rustdoc-gui/scrape-examples-color.goml2
-rw-r--r--tests/rustdoc-gui/scrape-examples-layout.goml8
-rw-r--r--tests/rustdoc-gui/scrape-examples-toggle.goml2
-rw-r--r--tests/rustdoc-gui/search-about-this-result.goml2
-rw-r--r--tests/rustdoc-gui/search-corrections.goml75
-rw-r--r--tests/rustdoc-gui/search-error.goml1
-rw-r--r--tests/rustdoc-gui/search-filter.goml16
-rw-r--r--tests/rustdoc-gui/search-form-elements.goml19
-rw-r--r--tests/rustdoc-gui/search-input-mobile.goml13
-rw-r--r--tests/rustdoc-gui/search-keyboard.goml21
-rw-r--r--tests/rustdoc-gui/search-reexport.goml11
-rw-r--r--tests/rustdoc-gui/search-result-color.goml7
-rw-r--r--tests/rustdoc-gui/search-result-description.goml1
-rw-r--r--tests/rustdoc-gui/search-result-display.goml9
-rw-r--r--tests/rustdoc-gui/search-result-go-to-first.goml3
-rw-r--r--tests/rustdoc-gui/search-result-impl-disambiguation.goml15
-rw-r--r--tests/rustdoc-gui/search-result-keyword.goml7
-rw-r--r--tests/rustdoc-gui/search-tab-change-title-fn-sig.goml32
-rw-r--r--tests/rustdoc-gui/search-tab.goml3
-rw-r--r--tests/rustdoc-gui/search-title.goml6
-rw-r--r--tests/rustdoc-gui/setting-auto-hide-content-large-items.goml2
-rw-r--r--tests/rustdoc-gui/setting-auto-hide-item-methods-docs.goml2
-rw-r--r--tests/rustdoc-gui/setting-auto-hide-trait-implementations.goml2
-rw-r--r--tests/rustdoc-gui/setting-go-to-only-result.goml4
-rw-r--r--tests/rustdoc-gui/settings-button.goml2
-rw-r--r--tests/rustdoc-gui/settings.goml42
-rw-r--r--tests/rustdoc-gui/shortcuts.goml4
-rw-r--r--tests/rustdoc-gui/sidebar-mobile.goml8
-rw-r--r--tests/rustdoc-gui/sidebar-resize-close-popover.goml4
-rw-r--r--tests/rustdoc-gui/sidebar-resize-setting.goml24
-rw-r--r--tests/rustdoc-gui/sidebar-source-code-display.goml2
-rw-r--r--tests/rustdoc-gui/sidebar-source-code.goml2
-rw-r--r--tests/rustdoc-gui/sidebar.goml6
-rw-r--r--tests/rustdoc-gui/source-anchor-scroll.goml8
-rw-r--r--tests/rustdoc-gui/source-code-page.goml32
-rw-r--r--tests/rustdoc-gui/source-code-wrapping.goml4
-rw-r--r--tests/rustdoc-gui/theme-change.goml4
-rw-r--r--tests/rustdoc-gui/theme-defaults.goml4
-rw-r--r--tests/rustdoc-gui/toggle-click-deadspace.goml2
-rw-r--r--tests/rustdoc-gui/toggle-docs-mobile.goml12
-rw-r--r--tests/rustdoc-gui/toggle-docs.goml2
-rw-r--r--tests/rustdoc-gui/type-declation-overflow.goml22
-rw-r--r--tests/rustdoc-gui/utils.goml37
-rw-r--r--tests/rustdoc-js-std/alias-1.js5
-rw-r--r--tests/rustdoc-js-std/alias-2.js4
-rw-r--r--tests/rustdoc-js-std/basic.js2
-rw-r--r--tests/rustdoc-js-std/parser-bindings.js28
-rw-r--r--tests/rustdoc-js-std/parser-errors.js18
-rw-r--r--tests/rustdoc-js-std/parser-filter.js22
-rw-r--r--tests/rustdoc-js-std/parser-generics.js12
-rw-r--r--tests/rustdoc-js-std/parser-hof.js106
-rw-r--r--tests/rustdoc-js-std/parser-ident.js14
-rw-r--r--tests/rustdoc-js-std/parser-literal.js2
-rw-r--r--tests/rustdoc-js-std/parser-paths.js18
-rw-r--r--tests/rustdoc-js-std/parser-quote.js4
-rw-r--r--tests/rustdoc-js-std/parser-reference.js84
-rw-r--r--tests/rustdoc-js-std/parser-returned.js20
-rw-r--r--tests/rustdoc-js-std/parser-separators.js20
-rw-r--r--tests/rustdoc-js-std/parser-slice-array.js36
-rw-r--r--tests/rustdoc-js-std/parser-tuple.js38
-rw-r--r--tests/rustdoc-js-std/path-end-empty.js3
-rw-r--r--tests/rustdoc-js-std/path-maxeditdistance.js6
-rw-r--r--tests/rustdoc-js-std/return-specific-literal.js2
-rw-r--r--tests/rustdoc-js-std/return-specific.js2
-rw-r--r--tests/rustdoc-js/doc-alias.js13
-rw-r--r--tests/rustdoc-js/generics-trait.js21
-rw-r--r--tests/rustdoc-js/non-english-identifier.js8
-rw-r--r--tests/rustdoc-js/ordering.js9
-rw-r--r--tests/rustdoc-js/ordering.rs3
-rw-r--r--tests/rustdoc-js/type-parameters.js6
-rw-r--r--tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs6
-rw-r--r--tests/rustdoc/cross-crate-info/cargo-transitive/s.rs6
-rw-r--r--tests/rustdoc/cross-crate-info/cargo-two-no-index/e.rs4
-rw-r--r--tests/rustdoc/cross-crate-info/cargo-two/e.rs4
-rw-r--r--tests/rustdoc/cross-crate-info/index-on-last/e.rs4
-rw-r--r--tests/rustdoc/cross-crate-info/kitchen-sink/i.rs8
-rw-r--r--tests/rustdoc/cross-crate-info/single-crate-baseline/q.rs2
-rw-r--r--tests/rustdoc/cross-crate-info/single-crate-no-index/q.rs2
-rw-r--r--tests/rustdoc/cross-crate-info/write-docs-somewhere-else/e.rs4
-rw-r--r--tests/rustdoc/masked.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/cargo-transitive-read-write/sierra.rs6
-rw-r--r--tests/rustdoc/merge-cross-crate-info/kitchen-sink-separate-dirs/indigo.rs8
-rw-r--r--tests/rustdoc/merge-cross-crate-info/no-merge-separate/sierra.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/no-merge-write-anyway/sierra.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/overwrite-but-include/sierra.rs6
-rw-r--r--tests/rustdoc/merge-cross-crate-info/overwrite-but-separate/sierra.rs6
-rw-r--r--tests/rustdoc/merge-cross-crate-info/overwrite/sierra.rs6
-rw-r--r--tests/rustdoc/merge-cross-crate-info/single-crate-finalize/quebec.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/single-crate-read-write/quebec.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/single-crate-write-anyway/quebec.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/single-merge-none-useless-write/quebec.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/transitive-finalize/sierra.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/transitive-merge-none/sierra.rs6
-rw-r--r--tests/rustdoc/merge-cross-crate-info/transitive-merge-read-write/sierra.rs6
-rw-r--r--tests/rustdoc/merge-cross-crate-info/transitive-no-info/sierra.rs2
-rw-r--r--tests/rustdoc/merge-cross-crate-info/two-separate-out-dir/echo.rs4
-rw-r--r--tests/rustdoc/no-unit-struct-field.rs9
-rw-r--r--tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs2
-rw-r--r--tests/rustdoc/search-index-summaries.rs2
-rw-r--r--tests/rustdoc/search-index.rs4
-rw-r--r--tests/ui/array-slice-vec/slice-mut-2.stderr6
-rw-r--r--tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs17
-rw-r--r--tests/ui/attributes/lint_on_root.rs2
-rw-r--r--tests/ui/attributes/lint_on_root.stderr4
-rw-r--r--tests/ui/attributes/malformed-attrs.rs4
-rw-r--r--tests/ui/attributes/malformed-attrs.stderr18
-rw-r--r--tests/ui/attributes/malformed-reprs.stderr20
-rw-r--r--tests/ui/attributes/no-sanitize.rs45
-rw-r--r--tests/ui/attributes/no-sanitize.stderr80
-rw-r--r--tests/ui/attributes/rustc_confusables.rs1
-rw-r--r--tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr6
-rw-r--r--tests/ui/borrowck/borrowck-access-permissions.stderr7
-rw-r--r--tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr6
-rw-r--r--tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.fixed21
-rw-r--r--tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.rs21
-rw-r--r--tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.stderr38
-rw-r--r--tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.rs16
-rw-r--r--tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.stderr9
-rw-r--r--tests/ui/consts/const-eval/heap/ptr_not_made_global.stderr4
-rw-r--r--tests/ui/consts/const-eval/heap/ptr_not_made_global_mut.stderr2
-rw-r--r--tests/ui/consts/const-eval/partial_ptr_overwrite.rs12
-rw-r--r--tests/ui/consts/const-eval/partial_ptr_overwrite.stderr12
-rw-r--r--tests/ui/consts/const-eval/ptr_fragments.rs63
-rw-r--r--tests/ui/consts/const-eval/ptr_fragments_in_final.rs25
-rw-r--r--tests/ui/consts/const-eval/ptr_fragments_in_final.stderr10
-rw-r--r--tests/ui/consts/const-eval/read_partial_ptr.rs49
-rw-r--r--tests/ui/consts/const-eval/read_partial_ptr.stderr39
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.rs13
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.stderr16
-rw-r--r--tests/ui/coverage-attr/name-value.stderr4
-rw-r--r--tests/ui/coverage-attr/word-only.stderr10
-rw-r--r--tests/ui/deprecation/deprecation-sanity.rs5
-rw-r--r--tests/ui/deprecation/deprecation-sanity.stderr2
-rw-r--r--tests/ui/deriving/deriving-all-codegen.rs18
-rw-r--r--tests/ui/deriving/deriving-all-codegen.stdout2
-rw-r--r--tests/ui/deriving/deriving-from-wrong-target.rs3
-rw-r--r--tests/ui/deriving/deriving-from-wrong-target.stderr18
-rw-r--r--tests/ui/deriving/deriving-from.rs2
-rw-r--r--tests/ui/extern/issue-47725.rs3
-rw-r--r--tests/ui/extern/issue-47725.stderr6
-rw-r--r--tests/ui/feature-gates/feature-gate-derive-from.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-derive-from.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-macro-derive.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-macro-derive.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-no_sanitize.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-no_sanitize.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-sanitize.rs7
-rw-r--r--tests/ui/feature-gates/feature-gate-sanitize.stderr23
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs91
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr401
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr6
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr6
-rw-r--r--tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr6
-rw-r--r--tests/ui/generic-associated-types/collectivity-regression.stderr2
-rw-r--r--tests/ui/generic-associated-types/extended/lending_iterator.stderr6
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-just-for-static.stderr2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.stderr2
-rw-r--r--tests/ui/impl-trait/precise-capturing/parenthesized.rs8
-rw-r--r--tests/ui/impl-trait/precise-capturing/parenthesized.stderr14
-rw-r--r--tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr12
-rw-r--r--tests/ui/inference/issue-72616.stderr12
-rw-r--r--tests/ui/invalid/invalid-no-sanitize.rs5
-rw-r--r--tests/ui/invalid/invalid-no-sanitize.stderr10
-rw-r--r--tests/ui/issues/issue-26217.stderr6
-rw-r--r--tests/ui/lifetimes/issue-105507.fixed4
-rw-r--r--tests/ui/lifetimes/issue-105507.rs4
-rw-r--r--tests/ui/lifetimes/issue-105507.stderr4
-rw-r--r--tests/ui/lint/unused/unused_attributes-must_use.fixed63
-rw-r--r--tests/ui/lint/unused/unused_attributes-must_use.rs63
-rw-r--r--tests/ui/lint/unused/unused_attributes-must_use.stderr193
-rw-r--r--tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr6
-rw-r--r--tests/ui/macros/macro-rules-derive-error.rs51
-rw-r--r--tests/ui/macros/macro-rules-derive-error.stderr75
-rw-r--r--tests/ui/macros/macro-rules-derive.rs71
-rw-r--r--tests/ui/macros/macro-rules-derive.run.stdout17
-rw-r--r--tests/ui/mismatched_types/closure-arg-type-mismatch.stderr2
-rw-r--r--tests/ui/nll/local-outlives-static-via-hrtb.stderr12
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr6
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr6
-rw-r--r--tests/ui/nll/type-test-universe.stderr6
-rw-r--r--tests/ui/parser/macro/macro-attr-bad.rs4
-rw-r--r--tests/ui/parser/macro/macro-attr-bad.stderr4
-rw-r--r--tests/ui/parser/macro/macro-attr-recovery.rs2
-rw-r--r--tests/ui/parser/macro/macro-attr-recovery.stderr2
-rw-r--r--tests/ui/parser/macro/macro-derive-bad.rs43
-rw-r--r--tests/ui/parser/macro/macro-derive-bad.stderr90
-rw-r--r--tests/ui/parser/trait-object-lifetime-parens.e2015.stderr4
-rw-r--r--tests/ui/parser/trait-object-lifetime-parens.e2021.stderr4
-rw-r--r--tests/ui/parser/trait-object-lifetime-parens.rs4
-rw-r--r--tests/ui/reachable/expr_cast.rs24
-rw-r--r--tests/ui/reachable/expr_cast.stderr24
-rw-r--r--tests/ui/reachable/unreachable-try-pattern.rs2
-rw-r--r--tests/ui/reachable/unreachable-try-pattern.stderr11
-rw-r--r--tests/ui/resolve/path-attr-in-const-block.stderr2
-rw-r--r--tests/ui/sanitize-attr/invalid-sanitize.rs22
-rw-r--r--tests/ui/sanitize-attr/invalid-sanitize.stderr82
-rw-r--r--tests/ui/sanitize-attr/valid-sanitize.rs115
-rw-r--r--tests/ui/sanitize-attr/valid-sanitize.stderr190
-rw-r--r--tests/ui/sanitizer/inline-always-sanitize.rs (renamed from tests/ui/sanitizer/inline-always.rs)6
-rw-r--r--tests/ui/sanitizer/inline-always-sanitize.stderr15
-rw-r--r--tests/ui/sanitizer/inline-always.stderr15
-rw-r--r--tests/ui/suggestions/partialeq_suggest_swap_on_e0277.stderr2
-rw-r--r--tests/ui/transmutability/references/reject_lifetime_extension.stderr6
-rw-r--r--tests/ui/type/type-name-basic.rs22
-rw-r--r--tests/ui/where-clauses/unsupported_attribute.stderr4
242 files changed, 2919 insertions, 1430 deletions
diff --git a/tests/assembly-llvm/regparm-module-flag.rs b/tests/assembly-llvm/regparm-module-flag.rs
new file mode 100644
index 00000000000..67ef44285ea
--- /dev/null
+++ b/tests/assembly-llvm/regparm-module-flag.rs
@@ -0,0 +1,70 @@
+// Test the regparm ABI with builtin and non-builtin calls
+// Issue: https://github.com/rust-lang/rust/issues/145271
+//@ add-core-stubs
+//@ assembly-output: emit-asm
+//@ compile-flags: -O --target=i686-unknown-linux-gnu -Crelocation-model=static
+//@ revisions: REGPARM1 REGPARM2 REGPARM3
+//@[REGPARM1] compile-flags: -Zregparm=1
+//@[REGPARM2] compile-flags: -Zregparm=2
+//@[REGPARM3] compile-flags: -Zregparm=3
+//@ needs-llvm-components: x86
+#![feature(no_core)]
+#![no_std]
+#![no_core]
+#![crate_type = "lib"]
+
+extern crate minicore;
+use minicore::*;
+
+unsafe extern "C" {
+    fn memset(p: *mut c_void, val: i32, len: usize) -> *mut c_void;
+    fn non_builtin_memset(p: *mut c_void, val: i32, len: usize) -> *mut c_void;
+}
+
+#[unsafe(no_mangle)]
+pub unsafe extern "C" fn entrypoint(len: usize, ptr: *mut c_void, val: i32) -> *mut c_void {
+    // REGPARM1-LABEL: entrypoint
+    // REGPARM1: movl %e{{.*}}, %ecx
+    // REGPARM1: pushl
+    // REGPARM1: pushl
+    // REGPARM1: calll memset
+
+    // REGPARM2-LABEL: entrypoint
+    // REGPARM2: movl 16(%esp), %edx
+    // REGPARM2: movl %e{{.*}}, (%esp)
+    // REGPARM2: movl %e{{.*}}, %eax
+    // REGPARM2: calll memset
+
+    // REGPARM3-LABEL: entrypoint
+    // REGPARM3: movl %e{{.*}}, %esi
+    // REGPARM3: movl %e{{.*}}, %eax
+    // REGPARM3: movl %e{{.*}}, %ecx
+    // REGPARM3: jmp memset
+    unsafe { memset(ptr, val, len) }
+}
+
+#[unsafe(no_mangle)]
+pub unsafe extern "C" fn non_builtin_entrypoint(
+    len: usize,
+    ptr: *mut c_void,
+    val: i32,
+) -> *mut c_void {
+    // REGPARM1-LABEL: non_builtin_entrypoint
+    // REGPARM1: movl %e{{.*}}, %ecx
+    // REGPARM1: pushl
+    // REGPARM1: pushl
+    // REGPARM1: calll non_builtin_memset
+
+    // REGPARM2-LABEL: non_builtin_entrypoint
+    // REGPARM2: movl 16(%esp), %edx
+    // REGPARM2: movl %e{{.*}}, (%esp)
+    // REGPARM2: movl %e{{.*}}, %eax
+    // REGPARM2: calll non_builtin_memset
+
+    // REGPARM3-LABEL: non_builtin_entrypoint
+    // REGPARM3: movl %e{{.*}}, %esi
+    // REGPARM3: movl %e{{.*}}, %eax
+    // REGPARM3: movl %e{{.*}}, %ecx
+    // REGPARM3: jmp non_builtin_memset
+    unsafe { non_builtin_memset(ptr, val, len) }
+}
diff --git a/tests/auxiliary/minicore.rs b/tests/auxiliary/minicore.rs
index 47dadd51ce0..da880100a10 100644
--- a/tests/auxiliary/minicore.rs
+++ b/tests/auxiliary/minicore.rs
@@ -225,3 +225,10 @@ pub mod mem {
     #[rustc_intrinsic]
     pub unsafe fn transmute<Src, Dst>(src: Src) -> Dst;
 }
+
+#[lang = "c_void"]
+#[repr(u8)]
+pub enum c_void {
+    __variant1,
+    __variant2,
+}
diff --git a/tests/codegen-llvm/enum/enum-aggregate.rs b/tests/codegen-llvm/enum/enum-aggregate.rs
index 0161e5f3fa1..f58d7ef12b6 100644
--- a/tests/codegen-llvm/enum/enum-aggregate.rs
+++ b/tests/codegen-llvm/enum/enum-aggregate.rs
@@ -27,7 +27,7 @@ fn make_none_bool() -> Option<bool> {
 
 #[no_mangle]
 fn make_some_ordering(x: Ordering) -> Option<Ordering> {
-    // CHECK-LABEL: i8 @make_some_ordering(i8 %x)
+    // CHECK-LABEL: i8 @make_some_ordering(i8{{( signext)?}} %x)
     // CHECK-NEXT: start:
     // CHECK-NEXT: ret i8 %x
     Some(x)
@@ -35,7 +35,7 @@ fn make_some_ordering(x: Ordering) -> Option<Ordering> {
 
 #[no_mangle]
 fn make_some_u16(x: u16) -> Option<u16> {
-    // CHECK-LABEL: { i16, i16 } @make_some_u16(i16 %x)
+    // CHECK-LABEL: { i16, i16 } @make_some_u16(i16{{( zeroext)?}} %x)
     // CHECK-NEXT: start:
     // CHECK-NEXT: %0 = insertvalue { i16, i16 } { i16 1, i16 poison }, i16 %x, 1
     // CHECK-NEXT: ret { i16, i16 } %0
@@ -52,7 +52,7 @@ fn make_none_u16() -> Option<u16> {
 
 #[no_mangle]
 fn make_some_nzu32(x: NonZero<u32>) -> Option<NonZero<u32>> {
-    // CHECK-LABEL: i32 @make_some_nzu32(i32 %x)
+    // CHECK-LABEL: i32 @make_some_nzu32(i32{{( signext)?}} %x)
     // CHECK-NEXT: start:
     // CHECK-NEXT: ret i32 %x
     Some(x)
@@ -114,7 +114,7 @@ fn make_uninhabited_err_indirectly(n: Never) -> Result<u32, Never> {
 fn make_fully_uninhabited_result(v: u32, n: Never) -> Result<(u32, Never), (Never, u32)> {
     // Actually reaching this would be UB, so we don't actually build a result.
 
-    // CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32 %v)
+    // CHECK-LABEL: { i32, i32 } @make_fully_uninhabited_result(i32{{( signext)?}} %v)
     // CHECK-NEXT: start:
     // CHECK-NEXT: call void @llvm.trap()
     // CHECK-NEXT: call void @llvm.trap()
diff --git a/tests/codegen-llvm/enum/enum-match.rs b/tests/codegen-llvm/enum/enum-match.rs
index 091c4e9adf4..20e2006e3eb 100644
--- a/tests/codegen-llvm/enum/enum-match.rs
+++ b/tests/codegen-llvm/enum/enum-match.rs
@@ -739,7 +739,7 @@ pub enum Tricky {
 
 const _: () = assert!(std::intrinsics::discriminant_value(&Tricky::V100) == 100);
 
-// CHECK-LABEL: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @discriminant6(i8 noundef %e)
+// CHECK-LABEL: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @discriminant6(i8 noundef{{( zeroext)?}} %e)
 // CHECK-NEXT: start:
 // CHECK-NEXT: %[[REL_VAR:.+]] = add i8 %e, -66
 // CHECK-NEXT: %[[IS_NICHE:.+]] = icmp ult i8 %[[REL_VAR]], -56
diff --git a/tests/codegen-llvm/enum/enum-transparent-extract.rs b/tests/codegen-llvm/enum/enum-transparent-extract.rs
index c5efb8d472b..1435e6ec802 100644
--- a/tests/codegen-llvm/enum/enum-transparent-extract.rs
+++ b/tests/codegen-llvm/enum/enum-transparent-extract.rs
@@ -9,7 +9,7 @@ pub enum Never {}
 
 #[no_mangle]
 pub fn make_unmake_result_never(x: i32) -> i32 {
-    // CHECK-LABEL: define i32 @make_unmake_result_never(i32 %x)
+    // CHECK-LABEL: define i32 @make_unmake_result_never(i32{{( signext)?}} %x)
     // CHECK: start:
     // CHECK-NEXT: ret i32 %x
 
diff --git a/tests/codegen-llvm/issues/issue-122734-match-eq.rs b/tests/codegen-llvm/issues/issue-122734-match-eq.rs
new file mode 100644
index 00000000000..89858972677
--- /dev/null
+++ b/tests/codegen-llvm/issues/issue-122734-match-eq.rs
@@ -0,0 +1,78 @@
+//@ min-llvm-version: 21
+//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled
+//! Tests that matching + eq on `Option<FieldlessEnum>` produces a simple compare with no branching
+
+#![crate_type = "lib"]
+
+#[derive(PartialEq)]
+pub enum TwoNum {
+    A,
+    B,
+}
+
+#[derive(PartialEq)]
+pub enum ThreeNum {
+    A,
+    B,
+    C,
+}
+
+// CHECK-LABEL: @match_two
+#[no_mangle]
+pub fn match_two(a: Option<TwoNum>, b: Option<TwoNum>) -> bool {
+    // CHECK-NEXT: start:
+    // CHECK-NEXT: icmp eq i8
+    // CHECK-NEXT: ret
+    match (a, b) {
+        (Some(x), Some(y)) => x == y,
+        (Some(_), None) => false,
+        (None, Some(_)) => false,
+        (None, None) => true,
+    }
+}
+
+// CHECK-LABEL: @match_three
+#[no_mangle]
+pub fn match_three(a: Option<ThreeNum>, b: Option<ThreeNum>) -> bool {
+    // CHECK-NEXT: start:
+    // CHECK-NEXT: icmp eq
+    // CHECK-NEXT: ret
+    match (a, b) {
+        (Some(x), Some(y)) => x == y,
+        (Some(_), None) => false,
+        (None, Some(_)) => false,
+        (None, None) => true,
+    }
+}
+
+// CHECK-LABEL: @match_two_ref
+#[no_mangle]
+pub fn match_two_ref(a: &Option<TwoNum>, b: &Option<TwoNum>) -> bool {
+    // CHECK-NEXT: start:
+    // CHECK-NEXT: load i8
+    // CHECK-NEXT: load i8
+    // CHECK-NEXT: icmp eq i8
+    // CHECK-NEXT: ret
+    match (a, b) {
+        (Some(x), Some(y)) => x == y,
+        (Some(_), None) => false,
+        (None, Some(_)) => false,
+        (None, None) => true,
+    }
+}
+
+// CHECK-LABEL: @match_three_ref
+#[no_mangle]
+pub fn match_three_ref(a: &Option<ThreeNum>, b: &Option<ThreeNum>) -> bool {
+    // CHECK-NEXT: start:
+    // CHECK-NEXT: load i8
+    // CHECK-NEXT: load i8
+    // CHECK-NEXT: icmp eq
+    // CHECK-NEXT: ret
+    match (a, b) {
+        (Some(x), Some(y)) => x == y,
+        (Some(_), None) => false,
+        (None, Some(_)) => false,
+        (None, None) => true,
+    }
+}
diff --git a/tests/codegen-llvm/repeat-operand-zero-len.rs b/tests/codegen-llvm/repeat-operand-zero-len.rs
index b4cec42a07c..8d2a0e77d60 100644
--- a/tests/codegen-llvm/repeat-operand-zero-len.rs
+++ b/tests/codegen-llvm/repeat-operand-zero-len.rs
@@ -11,7 +11,7 @@
 #[repr(transparent)]
 pub struct Wrapper<T, const N: usize>([T; N]);
 
-// CHECK-LABEL: define {{.+}}do_repeat{{.+}}(i32 noundef %x)
+// CHECK-LABEL: define {{.+}}do_repeat{{.+}}(i32 noundef{{( signext)?}} %x)
 // CHECK-NEXT: start:
 // CHECK-NOT: alloca
 // CHECK-NEXT: ret void
@@ -23,6 +23,6 @@ pub fn do_repeat<T: Copy, const N: usize>(x: T) -> Wrapper<T, N> {
 // CHECK-LABEL: @trigger_repeat_zero_len
 #[no_mangle]
 pub fn trigger_repeat_zero_len() -> Wrapper<u32, 0> {
-    // CHECK: call void {{.+}}do_repeat{{.+}}(i32 noundef 4)
+    // CHECK: call void {{.+}}do_repeat{{.+}}(i32 noundef{{( signext)?}} 4)
     do_repeat(4)
 }
diff --git a/tests/codegen-llvm/sanitizer/cfi/emit-type-checks-attr-no-sanitize.rs b/tests/codegen-llvm/sanitizer/cfi/emit-type-checks-attr-sanitize-off.rs
index 71ccdc8ca62..651afb33228 100644
--- a/tests/codegen-llvm/sanitizer/cfi/emit-type-checks-attr-no-sanitize.rs
+++ b/tests/codegen-llvm/sanitizer/cfi/emit-type-checks-attr-sanitize-off.rs
@@ -4,11 +4,11 @@
 //@ compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type = "lib"]
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 
-#[no_sanitize(cfi)]
+#[sanitize(cfi = "off")]
 pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
-    // CHECK-LABEL: emit_type_checks_attr_no_sanitize::foo
+    // CHECK-LABEL: emit_type_checks_attr_sanitize_off::foo
     // CHECK:       Function Attrs: {{.*}}
     // CHECK-LABEL: define{{.*}}foo{{.*}}!type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
     // CHECK:       start:
diff --git a/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs
index 774c9ab53f1..c70aae1703e 100644
--- a/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs
+++ b/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs
@@ -13,7 +13,7 @@
 //@[x86_64] needs-llvm-components: x86
 
 #![crate_type = "rlib"]
-#![feature(no_core, no_sanitize, lang_items)]
+#![feature(no_core, sanitize, lang_items)]
 #![no_core]
 
 extern crate minicore;
@@ -25,7 +25,7 @@ use minicore::*;
 // CHECK:       start:
 // CHECK-NOT:   call void @__asan_report_load
 // CHECK:       }
-#[no_sanitize(address)]
+#[sanitize(address = "off")]
 pub fn unsanitized(b: &mut u8) -> u8 {
     *b
 }
diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-no-sanitize.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs
index 02c31fb8e9b..2581784ce3e 100644
--- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-no-sanitize.rs
+++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs
@@ -9,15 +9,15 @@
 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
 
 #![crate_type = "lib"]
-#![feature(no_core, no_sanitize, lang_items)]
+#![feature(no_core, sanitize, lang_items)]
 #![no_core]
 
 extern crate minicore;
 use minicore::*;
 
-#[no_sanitize(kcfi)]
+#[sanitize(kcfi = "off")]
 pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
-    // CHECK-LABEL: emit_kcfi_operand_bundle_attr_no_sanitize::foo
+    // CHECK-LABEL: emit_kcfi_operand_bundle_attr_sanitize_off::foo
     // CHECK:       Function Attrs: {{.*}}
     // CHECK-LABEL: define{{.*}}foo{{.*}}!{{<unknown kind #36>|kcfi_type}} !{{[0-9]+}}
     // CHECK:       start:
diff --git a/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs b/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs
new file mode 100644
index 00000000000..37549aba447
--- /dev/null
+++ b/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs
@@ -0,0 +1,42 @@
+// Verifies that the `#[sanitize(address = "off")]` attribute also turns off
+// the kernel address sanitizer.
+//
+//@ add-core-stubs
+//@ compile-flags: -Zsanitizer=kernel-address -Ctarget-feature=-crt-static -Copt-level=0
+//@ revisions: aarch64 riscv64imac riscv64gc x86_64
+//@[aarch64] compile-flags: --target aarch64-unknown-none
+//@[aarch64] needs-llvm-components: aarch64
+//@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf
+//@[riscv64imac] needs-llvm-components: riscv
+//@[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf
+//@[riscv64gc] needs-llvm-components: riscv
+//@[x86_64] compile-flags: --target x86_64-unknown-none
+//@[x86_64] needs-llvm-components: x86
+
+#![crate_type = "rlib"]
+#![feature(no_core, sanitize, lang_items)]
+#![no_core]
+
+extern crate minicore;
+use minicore::*;
+
+// CHECK-LABEL: ; sanitize_off_asan_kasan::unsanitized
+// CHECK-NEXT:  ; Function Attrs:
+// CHECK-NOT:   sanitize_address
+// CHECK:       start:
+// CHECK-NOT:   call void @__asan_report_load
+// CHECK:       }
+#[sanitize(address = "off")]
+pub fn unsanitized(b: &mut u8) -> u8 {
+    *b
+}
+
+// CHECK-LABEL: ; sanitize_off_asan_kasan::sanitized
+// CHECK-NEXT:  ; Function Attrs:
+// CHECK:       sanitize_address
+// CHECK:       start:
+// CHECK:       call void @__asan_report_load
+// CHECK:       }
+pub fn sanitized(b: &mut u8) -> u8 {
+    *b
+}
diff --git a/tests/codegen-llvm/sanitizer/no-sanitize-inlining.rs b/tests/codegen-llvm/sanitizer/sanitize-off-inlining.rs
index 4bd832d2ab1..69771827c3a 100644
--- a/tests/codegen-llvm/sanitizer/no-sanitize-inlining.rs
+++ b/tests/codegen-llvm/sanitizer/sanitize-off-inlining.rs
@@ -1,4 +1,4 @@
-// Verifies that no_sanitize attribute prevents inlining when
+// Verifies that sanitize(xyz = "off") attribute prevents inlining when
 // given sanitizer is enabled, but has no effect on inlining otherwise.
 //
 //@ needs-sanitizer-address
@@ -9,7 +9,7 @@
 //@[LSAN] compile-flags: -Zsanitizer=leak
 
 #![crate_type = "lib"]
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 
 // ASAN-LABEL: define void @test
 // ASAN:         call {{.*}} @random_inline
@@ -23,7 +23,7 @@ pub fn test(n: &mut u32) {
     random_inline(n);
 }
 
-#[no_sanitize(address)]
+#[sanitize(address = "off")]
 #[inline]
 #[no_mangle]
 pub fn random_inline(n: &mut u32) {
diff --git a/tests/codegen-llvm/sanitizer/no-sanitize.rs b/tests/codegen-llvm/sanitizer/sanitize-off-kasan-asan.rs
index 2a309f6b9c6..94945f2b2e6 100644
--- a/tests/codegen-llvm/sanitizer/no-sanitize.rs
+++ b/tests/codegen-llvm/sanitizer/sanitize-off-kasan-asan.rs
@@ -1,34 +1,24 @@
-// Verifies that no_sanitize attribute can be used to
-// selectively disable sanitizer instrumentation.
+// Verifies that the `#[sanitize(kernel_address = "off")]` attribute also turns off
+// the address sanitizer.
 //
 //@ needs-sanitizer-address
 //@ compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0
 
 #![crate_type = "lib"]
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 
-// CHECK:     @UNSANITIZED = constant{{.*}} no_sanitize_address
-// CHECK-NOT: @__asan_global_UNSANITIZED
-#[no_mangle]
-#[no_sanitize(address)]
-pub static UNSANITIZED: u32 = 0;
-
-// CHECK: @__asan_global_SANITIZED
-#[no_mangle]
-pub static SANITIZED: u32 = 0;
-
-// CHECK-LABEL: ; no_sanitize::unsanitized
+// CHECK-LABEL: ; sanitize_off_kasan_asan::unsanitized
 // CHECK-NEXT:  ; Function Attrs:
 // CHECK-NOT:   sanitize_address
 // CHECK:       start:
 // CHECK-NOT:   call void @__asan_report_load
 // CHECK:       }
-#[no_sanitize(address)]
+#[sanitize(kernel_address = "off")]
 pub fn unsanitized(b: &mut u8) -> u8 {
     *b
 }
 
-// CHECK-LABEL: ; no_sanitize::sanitized
+// CHECK-LABEL: ; sanitize_off_kasan_asan::sanitized
 // CHECK-NEXT:  ; Function Attrs:
 // CHECK:       sanitize_address
 // CHECK:       start:
diff --git a/tests/codegen-llvm/sanitizer/sanitize-off.rs b/tests/codegen-llvm/sanitizer/sanitize-off.rs
new file mode 100644
index 00000000000..9f3f7cd9df7
--- /dev/null
+++ b/tests/codegen-llvm/sanitizer/sanitize-off.rs
@@ -0,0 +1,138 @@
+// Verifies that the `#[sanitize(address = "off")]` attribute can be used to
+// selectively disable sanitizer instrumentation.
+//
+//@ needs-sanitizer-address
+//@ compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0
+
+#![crate_type = "lib"]
+#![feature(sanitize)]
+
+// CHECK:     @UNSANITIZED = constant{{.*}} no_sanitize_address
+// CHECK-NOT: @__asan_global_SANITIZED
+#[no_mangle]
+#[sanitize(address = "off")]
+pub static UNSANITIZED: u32 = 0;
+
+// CHECK: @__asan_global_SANITIZED
+#[no_mangle]
+pub static SANITIZED: u32 = 0;
+
+// CHECK-LABEL: ; sanitize_off::unsanitized
+// CHECK-NEXT:  ; Function Attrs:
+// CHECK-NOT:   sanitize_address
+// CHECK:       start:
+// CHECK-NOT:   call void @__asan_report_load
+// CHECK:       }
+#[sanitize(address = "off")]
+pub fn unsanitized(b: &mut u8) -> u8 {
+    *b
+}
+
+// CHECK-LABEL: ; sanitize_off::sanitized
+// CHECK-NEXT:  ; Function Attrs:
+// CHECK:       sanitize_address
+// CHECK:       start:
+// CHECK:       call void @__asan_report_load
+// CHECK:       }
+pub fn sanitized(b: &mut u8) -> u8 {
+    *b
+}
+
+#[sanitize(address = "off")]
+pub mod foo {
+    // CHECK-LABEL: ; sanitize_off::foo::unsanitized
+    // CHECK-NEXT:  ; Function Attrs:
+    // CHECK-NOT:   sanitize_address
+    // CHECK:       start:
+    // CHECK-NOT:   call void @__asan_report_load
+    // CHECK:       }
+    pub fn unsanitized(b: &mut u8) -> u8 {
+        *b
+    }
+
+    // CHECK-LABEL: ; sanitize_off::foo::sanitized
+    // CHECK-NEXT:  ; Function Attrs:
+    // CHECK:       sanitize_address
+    // CHECK:       start:
+    // CHECK:       call void @__asan_report_load
+    // CHECK:       }
+    #[sanitize(address = "on")]
+    pub fn sanitized(b: &mut u8) -> u8 {
+        *b
+    }
+}
+
+pub trait MyTrait {
+    fn unsanitized(&self, b: &mut u8) -> u8;
+    fn sanitized(&self, b: &mut u8) -> u8;
+
+    // CHECK-LABEL: ; sanitize_off::MyTrait::unsanitized_default
+    // CHECK-NEXT:  ; Function Attrs:
+    // CHECK-NOT:   sanitize_address
+    // CHECK:       start:
+    // CHECK-NOT:   call void @__asan_report_load
+    // CHECK:       }
+    #[sanitize(address = "off")]
+    fn unsanitized_default(&self, b: &mut u8) -> u8 {
+        *b
+    }
+
+    // CHECK-LABEL: ; sanitize_off::MyTrait::sanitized_default
+    // CHECK-NEXT:  ; Function Attrs:
+    // CHECK:       sanitize_address
+    // CHECK:       start:
+    // CHECK:       call void @__asan_report_load
+    // CHECK:       }
+    fn sanitized_default(&self, b: &mut u8) -> u8 {
+        *b
+    }
+}
+
+#[sanitize(address = "off")]
+impl MyTrait for () {
+    // CHECK-LABEL: ; <() as sanitize_off::MyTrait>::unsanitized
+    // CHECK-NEXT:  ; Function Attrs:
+    // CHECK-NOT:   sanitize_address
+    // CHECK:       start:
+    // CHECK-NOT:   call void @__asan_report_load
+    // CHECK:       }
+    fn unsanitized(&self, b: &mut u8) -> u8 {
+        *b
+    }
+
+    // CHECK-LABEL: ; <() as sanitize_off::MyTrait>::sanitized
+    // CHECK-NEXT:  ; Function Attrs:
+    // CHECK:       sanitize_address
+    // CHECK:       start:
+    // CHECK:       call void @__asan_report_load
+    // CHECK:       }
+    #[sanitize(address = "on")]
+    fn sanitized(&self, b: &mut u8) -> u8 {
+        *b
+    }
+}
+
+pub fn expose_trait(b: &mut u8) -> u8 {
+    <() as MyTrait>::unsanitized_default(&(), b);
+    <() as MyTrait>::sanitized_default(&(), b)
+}
+
+#[sanitize(address = "off")]
+pub mod outer {
+    #[sanitize(thread = "off")]
+    pub mod inner {
+        // CHECK-LABEL: ; sanitize_off::outer::inner::unsanitized
+        // CHECK-NEXT:  ; Function Attrs:
+        // CHECK-NOT:   sanitize_address
+        // CHECK:       start:
+        // CHECK-NOT:   call void @__asan_report_load
+        // CHECK:       }
+        pub fn unsanitized() {
+            let xs = [0, 1, 2, 3];
+            // Avoid optimizing everything out.
+            let xs = std::hint::black_box(xs.as_ptr());
+            let code = unsafe { *xs.offset(4) };
+            std::process::exit(code);
+        }
+    }
+}
diff --git a/tests/codegen-llvm/sanitizer/scs-attr-check.rs b/tests/codegen-llvm/sanitizer/scs-attr-check.rs
index 6f4cbc2c0a6..f726503503c 100644
--- a/tests/codegen-llvm/sanitizer/scs-attr-check.rs
+++ b/tests/codegen-llvm/sanitizer/scs-attr-check.rs
@@ -5,7 +5,7 @@
 //@ compile-flags: -Zsanitizer=shadow-call-stack
 
 #![crate_type = "lib"]
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 
 // CHECK: ; sanitizer_scs_attr_check::scs
 // CHECK-NEXT: ; Function Attrs:{{.*}}shadowcallstack
@@ -13,5 +13,5 @@ pub fn scs() {}
 
 // CHECK: ; sanitizer_scs_attr_check::no_scs
 // CHECK-NOT: ; Function Attrs:{{.*}}shadowcallstack
-#[no_sanitize(shadow_call_stack)]
+#[sanitize(shadow_call_stack = "off")]
 pub fn no_scs() {}
diff --git a/tests/codegen-llvm/transmute-scalar.rs b/tests/codegen-llvm/transmute-scalar.rs
index ce1b0558b2e..21f7287047c 100644
--- a/tests/codegen-llvm/transmute-scalar.rs
+++ b/tests/codegen-llvm/transmute-scalar.rs
@@ -1,8 +1,9 @@
 //@ add-core-stubs
-//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes
+//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu
+//@ needs-llvm-components: x86
 
 #![crate_type = "lib"]
-#![feature(no_core, repr_simd, arm_target_feature, mips_target_feature, s390x_target_feature)]
+#![feature(no_core, repr_simd)]
 #![no_core]
 extern crate minicore;
 
@@ -117,11 +118,7 @@ struct S([i64; 1]);
 // CHECK-NEXT: %[[TEMP:.+]] = load i64, ptr %[[RET]]
 // CHECK-NEXT: ret i64 %[[TEMP]]
 #[no_mangle]
-#[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
-#[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
-#[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
-#[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
 pub extern "C" fn single_element_simd_to_scalar(b: S) -> i64 {
     unsafe { mem::transmute(b) }
 }
@@ -133,11 +130,7 @@ pub extern "C" fn single_element_simd_to_scalar(b: S) -> i64 {
 // CHECK-NEXT: %[[TEMP:.+]] = load <1 x i64>, ptr %[[RET]]
 // CHECK-NEXT: ret <1 x i64> %[[TEMP]]
 #[no_mangle]
-#[cfg_attr(target_family = "wasm", target_feature(enable = "simd128"))]
-#[cfg_attr(target_arch = "arm", target_feature(enable = "neon"))]
 #[cfg_attr(target_arch = "x86", target_feature(enable = "sse"))]
-#[cfg_attr(target_arch = "mips", target_feature(enable = "msa"))]
-#[cfg_attr(target_arch = "s390x", target_feature(enable = "vector"))]
 pub extern "C" fn scalar_to_single_element_simd(b: i64) -> S {
     unsafe { mem::transmute(b) }
 }
diff --git a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
index 83d9a7a32ab..507cd7ae2a6 100644
--- a/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
+++ b/tests/codegen-llvm/uninhabited-transparent-return-abi.rs
@@ -36,7 +36,7 @@ pub fn test_uninhabited_ret_by_ref() {
 pub fn test_uninhabited_ret_by_ref_with_arg(rsi: u32) {
     // CHECK: %_2 = alloca [24 x i8], align {{8|4}}
     // CHECK-NEXT: call void @llvm.lifetime.start.p0({{(i64 24, )?}}ptr nonnull %_2)
-    // CHECK-NEXT: call void @opaque_with_arg({{.*}} sret([24 x i8]) {{.*}} %_2, i32 noundef %rsi) #2
+    // CHECK-NEXT: call void @opaque_with_arg({{.*}} sret([24 x i8]) {{.*}} %_2, i32 noundef{{( signext)?}} %rsi) #2
     // CHECK-NEXT: unreachable
     unsafe {
         opaque_with_arg(rsi);
diff --git a/tests/mir-opt/inline/inline_compatibility.rs b/tests/mir-opt/inline/inline_compatibility.rs
index 1bb102ccda5..a31153dedc9 100644
--- a/tests/mir-opt/inline/inline_compatibility.rs
+++ b/tests/mir-opt/inline/inline_compatibility.rs
@@ -3,7 +3,7 @@
 //@ compile-flags: -Cpanic=abort
 
 #![crate_type = "lib"]
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 #![feature(c_variadic)]
 
 #[inline]
@@ -37,22 +37,22 @@ pub unsafe fn f2() {
 }
 
 #[inline]
-#[no_sanitize(address)]
-pub unsafe fn no_sanitize() {}
+#[sanitize(address = "off")]
+pub unsafe fn sanitize_off() {}
 
-// CHECK-LABEL: fn inlined_no_sanitize()
+// CHECK-LABEL: fn inlined_sanitize_off()
 // CHECK:       bb0: {
 // CHECK-NEXT:  return;
-#[no_sanitize(address)]
-pub unsafe fn inlined_no_sanitize() {
-    no_sanitize();
+#[sanitize(address = "off")]
+pub unsafe fn inlined_sanitize_off() {
+    sanitize_off();
 }
 
-// CHECK-LABEL: fn not_inlined_no_sanitize()
+// CHECK-LABEL: fn not_inlined_sanitize_off()
 // CHECK:       bb0: {
-// CHECK-NEXT:  no_sanitize()
-pub unsafe fn not_inlined_no_sanitize() {
-    no_sanitize();
+// CHECK-NEXT:  sanitize_off()
+pub unsafe fn not_inlined_sanitize_off() {
+    sanitize_off();
 }
 
 // CHECK-LABEL: fn not_inlined_c_variadic()
diff --git a/tests/run-make/emit-shared-files/rmake.rs b/tests/run-make/emit-shared-files/rmake.rs
index f88fe69aa9c..911ceb3adca 100644
--- a/tests/run-make/emit-shared-files/rmake.rs
+++ b/tests/run-make/emit-shared-files/rmake.rs
@@ -19,7 +19,7 @@ fn main() {
         .args(&["--extend-css", "z.css"])
         .input("x.rs")
         .run();
-    assert!(path("invocation-only/search-index-xxx.js").exists());
+    assert!(path("invocation-only/search.index/root-xxx.js").exists());
     assert!(path("invocation-only/crates-xxx.js").exists());
     assert!(path("invocation-only/settings.html").exists());
     assert!(path("invocation-only/x/all.html").exists());
diff --git a/tests/run-make/linker-warning/short-error.txt b/tests/run-make/linker-warning/short-error.txt
index 5b7c040bc50..e5861b732c5 100644
--- a/tests/run-make/linker-warning/short-error.txt
+++ b/tests/run-make/linker-warning/short-error.txt
@@ -1,6 +1,6 @@
 error: linking with `./fake-linker` failed: exit status: 1
   |
-  = note:  "./fake-linker" "-m64" "/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/build-root/test/run-make/linker-warning/rmake_out/{libfoo,libbar}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,libcfg_if-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/build-root/test/run-make/linker-warning/rmake_out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "main" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "run_make_error"
+  = note:  "./fake-linker" "-m64" "/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/build-root/test/run-make/linker-warning/rmake_out/{libfoo,libbar}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/build-root/test/run-make/linker-warning/rmake_out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "main" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "run_make_error"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: error: baz
           
diff --git a/tests/run-make/rustdoc-determinism/rmake.rs b/tests/run-make/rustdoc-determinism/rmake.rs
index 921baef4a97..5705dff6858 100644
--- a/tests/run-make/rustdoc-determinism/rmake.rs
+++ b/tests/run-make/rustdoc-determinism/rmake.rs
@@ -15,7 +15,7 @@ fn main() {
     rustdoc().input("foo.rs").out_dir(&bar_first).run();
 
     diff()
-        .expected_file(foo_first.join("search-index.js"))
-        .actual_file(bar_first.join("search-index.js"))
+        .expected_file(foo_first.join("search.index/root.js"))
+        .actual_file(bar_first.join("search.index/root.js"))
         .run();
 }
diff --git a/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs b/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs
index 03888f69eab..6784e438762 100644
--- a/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs
+++ b/tests/run-make/rustdoc-scrape-examples-paths/rmake.rs
@@ -1,16 +1,16 @@
 //! Test to ensure that the rustdoc `scrape-examples` feature is not panicking.
 //! Regression test for <https://github.com/rust-lang/rust/issues/144752>.
 
-use run_make_support::{cargo, path, rfs};
+use run_make_support::cargo;
+use run_make_support::scoped_run::run_in_tmpdir;
 
 fn main() {
     // We copy the crate to be documented "outside" to prevent documenting
     // the whole compiler.
-    let tmp = std::env::temp_dir();
-    let test_crate = tmp.join("foo");
-    rfs::copy_dir_all(path("foo"), &test_crate);
-
-    // The `scrape-examples` feature is also implemented in `cargo` so instead of reproducing
-    // what `cargo` does, better to just let `cargo` do it.
-    cargo().current_dir(&test_crate).args(["doc", "-p", "foo", "-Zrustdoc-scrape-examples"]).run();
+    std::env::set_current_dir("foo").unwrap();
+    run_in_tmpdir(|| {
+        // The `scrape-examples` feature is also implemented in `cargo` so instead of reproducing
+        // what `cargo` does, better to just let `cargo` do it.
+        cargo().args(["doc", "-p", "foo", "-Zrustdoc-scrape-examples"]).run();
+    })
 }
diff --git a/tests/rustdoc-gui/code-example-buttons.goml b/tests/rustdoc-gui/code-example-buttons.goml
index b96f6ddcc37..1429f978a28 100644
--- a/tests/rustdoc-gui/code-example-buttons.goml
+++ b/tests/rustdoc-gui/code-example-buttons.goml
@@ -5,25 +5,25 @@ include: "utils.goml"
 // First we check we "hover".
 move-cursor-to: ".example-wrap"
 assert-css: (".example-wrap .copy-button", { "visibility": "visible" })
-move-cursor-to: ".search-input"
+move-cursor-to: "#search-button"
 assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
 
 // Now we check the click.
 assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
 click: ".example-wrap"
-move-cursor-to: ".search-input"
+move-cursor-to: "#search-button"
 // It should have a new class and be visible.
 wait-for-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 1)
 wait-for-css: (".example-wrap:not(:hover) .button-holder.keep-visible", { "visibility": "visible" })
 // Clicking again will remove the class.
 click: ".example-wrap"
-move-cursor-to: ".search-input"
+move-cursor-to: "rustdoc-toolbar #search-button"
 assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
 assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
 
 // Clicking on the "copy code" button shouldn't make the buttons stick.
 click: ".example-wrap .copy-button"
-move-cursor-to: ".search-input"
+move-cursor-to: "#search-button"
 assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
 assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
 // Since we clicked on the copy button, the clipboard content should have been updated.
diff --git a/tests/rustdoc-gui/copy-code.goml b/tests/rustdoc-gui/copy-code.goml
index 9cc717bc67a..a6fb816c4bd 100644
--- a/tests/rustdoc-gui/copy-code.goml
+++ b/tests/rustdoc-gui/copy-code.goml
@@ -12,7 +12,7 @@ define-function: (
         assert-count: (".example-wrap .copy-button", 1)
         // We now ensure it's only displayed when the example is hovered.
         assert-css: (".example-wrap .copy-button", { "visibility": "visible" })
-        move-cursor-to: ".search-input"
+        move-cursor-to: "rustdoc-toolbar #search-button"
         assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
         // Checking that the copy button has the same size as the "copy path" button.
         compare-elements-size: (
diff --git a/tests/rustdoc-gui/cursor.goml b/tests/rustdoc-gui/cursor.goml
index 9412987fc32..0d78e192606 100644
--- a/tests/rustdoc-gui/cursor.goml
+++ b/tests/rustdoc-gui/cursor.goml
@@ -1,4 +1,5 @@
 // This test ensures that several clickable items actually have the pointer cursor.
+include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
 
 // the `[+]/[-]` button
@@ -8,11 +9,7 @@ assert-css: ("#toggle-all-docs", {"cursor": "pointer"})
 assert-css: ("#copy-path", {"cursor": "pointer"})
 
 // the search tabs
-write-into: (".search-input", "Foo")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "Foo"})
 assert-css: ("#search-tabs > button", {"cursor": "pointer"})
 
 // mobile sidebar toggle button
diff --git a/tests/rustdoc-gui/docblock-code-block-line-number.goml b/tests/rustdoc-gui/docblock-code-block-line-number.goml
index 0df9cc2a659..a182124aced 100644
--- a/tests/rustdoc-gui/docblock-code-block-line-number.goml
+++ b/tests/rustdoc-gui/docblock-code-block-line-number.goml
@@ -69,7 +69,7 @@ call-function: ("check-colors", {
 // and make sure it goes away.
 
 // First, open the settings menu.
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 assert-css: ("#settings", {"display": "block"})
 
@@ -121,7 +121,7 @@ call-function: ("check-padding", {
 define-function: ("check-line-numbers-existence", [], block {
     assert-local-storage: {"rustdoc-line-numbers": "true" }
     assert-false: ".example-line-numbers"
-    click: "#settings-menu"
+    click: "rustdoc-toolbar .settings-menu"
     wait-for: "#settings"
 
     // Then, click the toggle button.
@@ -137,7 +137,7 @@ define-function: ("check-line-numbers-existence", [], block {
     // Line numbers should still be there.
     assert-css: ("[data-nosnippet]", { "display": "block"})
     // Closing settings menu.
-    click: "#settings-menu"
+    click: "rustdoc-toolbar .settings-menu"
     wait-for-css: ("#settings", {"display": "none"})
 })
 
@@ -168,7 +168,7 @@ assert: ".example-wrap > pre.rust"
 assert-count: (".example-wrap", 2)
 assert-count: (".example-wrap.digits-1", 2)
 
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 
 // Then, click the toggle button.
diff --git a/tests/rustdoc-gui/escape-key.goml b/tests/rustdoc-gui/escape-key.goml
index ff8557b9b81..ab5615ebcd8 100644
--- a/tests/rustdoc-gui/escape-key.goml
+++ b/tests/rustdoc-gui/escape-key.goml
@@ -1,13 +1,10 @@
 // This test ensures that the "Escape" shortcut is handled correctly based on the
 // current content displayed.
+include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 // First, we check that the search results are hidden when the Escape key is pressed.
-write-into: (".search-input", "test")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-wait-for: "#search h1" // The search element is empty before the first search
+call-function: ("perform-search", {"query": "test"})
 // Check that the currently displayed element is search.
-wait-for: "#alternative-display #search"
 assert-attribute: ("#main-content", {"class": "content hidden"})
 assert-document-property: ({"URL": "index.html?search=test"}, ENDS_WITH)
 press-key: "Escape"
@@ -17,8 +14,8 @@ assert-false: "#alternative-display #search"
 assert-attribute: ("#main-content", {"class": "content"})
 assert-document-property: ({"URL": "index.html"}, [ENDS_WITH])
 
-// Check that focusing the search input brings back the search results
-focus: ".search-input"
+// Check that clicking the search button brings back the search results
+click: "#search-button"
 wait-for: "#alternative-display #search"
 assert-attribute: ("#main-content", {"class": "content hidden"})
 assert-document-property: ({"URL": "index.html?search=test"}, ENDS_WITH)
diff --git a/tests/rustdoc-gui/font-serif-change.goml b/tests/rustdoc-gui/font-serif-change.goml
index b14d5ae96f9..1e9f21c3541 100644
--- a/tests/rustdoc-gui/font-serif-change.goml
+++ b/tests/rustdoc-gui/font-serif-change.goml
@@ -8,7 +8,7 @@ assert-css: ("body", {"font-family": |serif_font|})
 assert-css: ("p code", {"font-family": |serif_code_font|})
 
 // We now switch to the sans serif font
-click: "#settings-menu"
+click: "main .settings-menu"
 wait-for: "#sans-serif-fonts"
 click: "#sans-serif-fonts"
 
@@ -23,7 +23,7 @@ assert-css: ("body", {"font-family": |font|})
 assert-css: ("p code", {"font-family": |code_font|})
 
 // We switch back to the serif font
-click: "#settings-menu"
+click: "main .settings-menu"
 wait-for: "#sans-serif-fonts"
 click: "#sans-serif-fonts"
 
diff --git a/tests/rustdoc-gui/globals.goml b/tests/rustdoc-gui/globals.goml
index 7a0e2b9eb74..89f57add816 100644
--- a/tests/rustdoc-gui/globals.goml
+++ b/tests/rustdoc-gui/globals.goml
@@ -1,6 +1,7 @@
 // Make sure search stores its data in `window`
 // It needs to use a global to avoid racing on search-index.js and search.js
 // https://github.com/rust-lang/rust/pull/118961
+include: "utils.goml"
 
 // URL query
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
@@ -9,9 +10,7 @@ assert-window-property-false: {"searchIndex": null}
 
 // Form input
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "Foo")
-press-key: 'Enter'
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "Foo"})
 assert-window-property-false: {"searchIndex": null}
 
 // source sidebar
diff --git a/tests/rustdoc-gui/help-page.goml b/tests/rustdoc-gui/help-page.goml
index 6d6e353ae36..34b40814027 100644
--- a/tests/rustdoc-gui/help-page.goml
+++ b/tests/rustdoc-gui/help-page.goml
@@ -6,12 +6,12 @@ assert-css: ("#help", {"display": "block"})
 assert-css: ("#help dd", {"font-size": "16px"})
 assert-false: "#help-button > a"
 assert-css: ("#help", {"display": "block"})
-compare-elements-property: (".sub", "#help", ["offsetWidth"])
-compare-elements-position: (".sub", "#help", ["x"])
+compare-elements-property: (".main-heading", "#help", ["offsetWidth"])
+compare-elements-position: (".main-heading", "#help", ["x"])
 set-window-size: (500, 1000) // Try mobile next.
 assert-css: ("#help", {"display": "block"})
-compare-elements-property: (".sub", "#help", ["offsetWidth"])
-compare-elements-position: (".sub", "#help", ["x"])
+compare-elements-property: (".main-heading", "#help", ["offsetWidth"])
+compare-elements-position: (".main-heading", "#help", ["x"])
 
 // Checking the color of the elements of the help menu.
 show-text: true
@@ -54,19 +54,17 @@ go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=a"
 wait-for: "#search-tabs" // Waiting for the search.js to load.
 set-window-size: (1000, 1000) // Only supported on desktop.
 assert-false: "#help"
-click: "#help-button > a"
+click: "rustdoc-toolbar .help-menu > a"
 assert-css: ("#help", {"display": "block"})
 assert-css: ("#help dd", {"font-size": "16px"})
-click: "#help-button > a"
-assert-css: ("#help", {"display": "none"})
-compare-elements-property-false: (".sub", "#help", ["offsetWidth"])
-compare-elements-position-false: (".sub", "#help", ["x"])
+click: "rustdoc-toolbar .help-menu > a"
+assert-false: "#help"
 
 // This test ensures that the "the rustdoc book" anchor link within the help popover works.
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=a"
 wait-for: "#search-tabs" // Waiting for the search.js to load.
 set-window-size: (1000, 1000) // Popover only appears when the screen width is >700px.
 assert-false: "#help"
-click: "#help-button > a"
+click: "rustdoc-toolbar .help-menu > a"
 click: "//*[@id='help']//a[text()='the rustdoc book']"
 wait-for-document-property: ({"URL": "https://doc.rust-lang.org/"}, STARTS_WITH)
diff --git a/tests/rustdoc-gui/hide-mobile-topbar.goml b/tests/rustdoc-gui/hide-mobile-topbar.goml
index 46eb8acfe8c..1e46d235827 100644
--- a/tests/rustdoc-gui/hide-mobile-topbar.goml
+++ b/tests/rustdoc-gui/hide-mobile-topbar.goml
@@ -1,20 +1,19 @@
 // Checks sidebar resizing stays synced with the setting
-go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+go-to: "file://" + |DOC_PATH| + "/settings.html"
 set-window-size: (400, 600)
 
 // Verify that the "hide" option is unchecked
-click: "#settings-menu"
 wait-for: "#settings"
 assert-css: ("#settings", {"display": "block"})
 assert-property: ("#hide-sidebar", {"checked": "false"})
-assert-css: (".mobile-topbar", {"display": "flex"})
+assert-css: ("rustdoc-topbar", {"display": "flex"})
 
 // Toggle it
 click: "#hide-sidebar"
 assert-property: ("#hide-sidebar", {"checked": "true"})
-assert-css: (".mobile-topbar", {"display": "none"})
+assert-css: ("rustdoc-topbar", {"display": "none"})
 
 // Toggle it again
 click: "#hide-sidebar"
 assert-property: ("#hide-sidebar", {"checked": "false"})
-assert-css: (".mobile-topbar", {"display": "flex"})
+assert-css: ("rustdoc-topbar", {"display": "flex"})
diff --git a/tests/rustdoc-gui/huge-logo.goml b/tests/rustdoc-gui/huge-logo.goml
index d207ab5bb37..6ad6948ef2a 100644
--- a/tests/rustdoc-gui/huge-logo.goml
+++ b/tests/rustdoc-gui/huge-logo.goml
@@ -8,8 +8,3 @@ assert-property: (".sidebar-crate .logo-container", {"offsetWidth": "96", "offse
 // offsetWidth = width of sidebar, offsetHeight = height + top padding
 assert-property: (".sidebar-crate .logo-container img", {"offsetWidth": "48", "offsetHeight": 64})
 assert-css: (".sidebar-crate .logo-container img", {"border-top-width": "16px", "margin-top": "-16px"})
-
-set-window-size: (400, 600)
-// offset = size + margin
-assert-property: (".mobile-topbar .logo-container", {"offsetWidth": "55", "offsetHeight": 45})
-assert-property: (".mobile-topbar .logo-container img", {"offsetWidth": "35", "offsetHeight": 35})
diff --git a/tests/rustdoc-gui/item-info.goml b/tests/rustdoc-gui/item-info.goml
index 647a2fd290d..11388c79e0b 100644
--- a/tests/rustdoc-gui/item-info.goml
+++ b/tests/rustdoc-gui/item-info.goml
@@ -20,7 +20,7 @@ store-position: (
     {"x": second_line_x, "y": second_line_y},
 )
 assert: |first_line_x| != |second_line_x| && |first_line_x| == 521 && |second_line_x| == 277
-assert: |first_line_y| != |second_line_y| && |first_line_y| == 718 && |second_line_y| == 741
+assert: |first_line_y| != |second_line_y| && |first_line_y| == 676 && |second_line_y| == 699
 
 // Now we ensure that they're not rendered on the same line.
 set-window-size: (1100, 800)
diff --git a/tests/rustdoc-gui/mobile-crate-name.goml b/tests/rustdoc-gui/mobile-crate-name.goml
index a0c96eec8a5..524c1d36a8a 100644
--- a/tests/rustdoc-gui/mobile-crate-name.goml
+++ b/tests/rustdoc-gui/mobile-crate-name.goml
@@ -5,18 +5,18 @@ go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 // First we change the title to make it big.
 set-window-size: (350, 800)
 // We ensure that the "format" of the title is the same as the one we'll use.
-assert-text: (".mobile-topbar .location a", "test_docs")
+assert-text: ("rustdoc-topbar h2 a", "Crate test_docs")
 // We store the height we know is correct.
-store-property: (".mobile-topbar .location", {"offsetHeight": height})
+store-property: ("rustdoc-topbar h2", {"offsetHeight": height})
 // We change the crate name to something longer.
-set-text: (".mobile-topbar .location a", "cargo_packager_resource_resolver")
+set-text: ("rustdoc-topbar h2 a", "cargo_packager_resource_resolver")
 // And we check that the size remained the same.
-assert-property: (".mobile-topbar .location", {"offsetHeight": |height|})
+assert-property: ("rustdoc-topbar h2", {"offsetHeight": |height|})
 
 // Now we check if it works for the non-crate pages as well.
 go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
 // We store the height we know is correct.
-store-property: (".mobile-topbar .location", {"offsetHeight": height})
-set-text: (".mobile-topbar .location a", "Something_incredibly_long_because")
+store-property: ("rustdoc-topbar h2", {"offsetHeight": height})
+set-text: ("rustdoc-topbar h2 a", "Something_incredibly_long_because")
 // And we check that the size remained the same.
-assert-property: (".mobile-topbar .location", {"offsetHeight": |height|})
+assert-property: ("rustdoc-topbar h2", {"offsetHeight": |height|})
diff --git a/tests/rustdoc-gui/mobile.goml b/tests/rustdoc-gui/mobile.goml
index a9eee53dd1d..d292281932d 100644
--- a/tests/rustdoc-gui/mobile.goml
+++ b/tests/rustdoc-gui/mobile.goml
@@ -5,7 +5,7 @@ set-window-size: (400, 600)
 set-font-size: 18
 wait-for: 100 // wait a bit for the resize and the font-size change to be fully taken into account.
 
-assert-property: (".mobile-topbar h2", {"offsetHeight": 33})
+assert-property: ("rustdoc-topbar h2", {"offsetHeight": 33})
 
 // On the settings page, the theme buttons should not line-wrap. Instead, they should
 // all be placed as a group on a line below the setting name "Theme."
diff --git a/tests/rustdoc-gui/notable-trait.goml b/tests/rustdoc-gui/notable-trait.goml
index 423a273fde7..6bd4661ac8f 100644
--- a/tests/rustdoc-gui/notable-trait.goml
+++ b/tests/rustdoc-gui/notable-trait.goml
@@ -82,15 +82,6 @@ call-function: ("check-notable-tooltip-position", {
     "i_x": 528,
 })
 
-// Checking on mobile now.
-set-window-size: (650, 600)
-wait-for-size: ("body", {"width": 650})
-call-function: ("check-notable-tooltip-position-complete", {
-    "x": 26,
-    "i_x": 305,
-    "popover_x": 0,
-})
-
 // Now check the colors.
 define-function: (
     "check-colors",
@@ -176,6 +167,15 @@ call-function: (
     },
 )
 
+// Checking on mobile now.
+set-window-size: (650, 600)
+wait-for-size: ("body", {"width": 650})
+call-function: ("check-notable-tooltip-position-complete", {
+    "x": 26,
+    "i_x": 305,
+    "popover_x": 0,
+})
+
 reload:
 
 // Check that pressing escape works
@@ -189,7 +189,7 @@ assert: "#method\.create_an_iterator_from_read .tooltip:focus"
 // Check that clicking outside works.
 click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
 assert-count: ("//*[@class='tooltip popover']", 1)
-click: ".search-input"
+click: ".main-heading h1"
 assert-count: ("//*[@class='tooltip popover']", 0)
 assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
 
@@ -219,14 +219,14 @@ define-function: (
         store-window-property: {"scrollY": scroll}
         click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
         wait-for: "//*[@class='tooltip popover']"
-        click: "#settings-menu a"
+        click: ".main-heading h1"
     }
 )
 
 // Now we check that the focus isn't given back to the wrong item when opening
 // another popover.
 call-function: ("setup-popup", {})
-click: ".search-input"
+click: ".main-heading h1"
 // We ensure we didn't come back to the previous focused item.
 assert-window-property-false: {"scrollY": |scroll|}
 
@@ -251,7 +251,7 @@ reload:
 assert-count: ("//*[@class='tooltip popover']", 0)
 click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
 assert-count: ("//*[@class='tooltip popover']", 1)
-click: "#settings-menu a"
+click: "rustdoc-toolbar .settings-menu a"
 wait-for: "#settings"
 assert-count: ("//*[@class='tooltip popover']", 0)
 assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
diff --git a/tests/rustdoc-gui/pocket-menu.goml b/tests/rustdoc-gui/pocket-menu.goml
index 073172dd8a7..a0815bfa9a0 100644
--- a/tests/rustdoc-gui/pocket-menu.goml
+++ b/tests/rustdoc-gui/pocket-menu.goml
@@ -3,33 +3,33 @@ include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=test"
 wait-for: "#crate-search"
 // First we check that the help menu doesn't exist yet.
-assert-false: "#help-button .popover"
+assert-false: "rustdoc-toolbar .help-menu .popover"
 // Then we display the help menu.
-click: "#help-button"
-assert: "#help-button .popover"
-assert-css: ("#help-button .popover", {"display": "block"})
+click: "rustdoc-toolbar .help-menu"
+assert: "rustdoc-toolbar .help-menu .popover"
+assert-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
 
 // Now we click somewhere else on the page to ensure it is handling the blur event
 // correctly.
 click: ".sidebar"
-assert-css: ("#help-button .popover", {"display": "none"})
+assert-false: "rustdoc-toolbar .help-menu .popover"
 
 // Now we will check that we cannot have two "pocket menus" displayed at the same time.
-click: "#help-button"
-assert-css: ("#help-button .popover", {"display": "block"})
-click: "#settings-menu"
-assert-css: ("#help-button .popover", {"display": "none"})
-assert-css: ("#settings-menu .popover", {"display": "block"})
+click: "rustdoc-toolbar .help-menu"
+assert-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
+click: "rustdoc-toolbar .settings-menu"
+assert-false: "rustdoc-toolbar .help-menu .popover"
+assert-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "block"})
 
 // Now the other way.
-click: "#help-button"
-assert-css: ("#help-button .popover", {"display": "block"})
-assert-css: ("#settings-menu .popover", {"display": "none"})
+click: "rustdoc-toolbar .help-menu"
+assert-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
+assert-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "none"})
 
 // Now verify that clicking the help menu again closes it.
-click: "#help-button"
-assert-css: ("#help-button .popover", {"display": "none"})
-assert-css: ("#settings-menu .popover", {"display": "none"})
+click: "rustdoc-toolbar .help-menu"
+assert-false: "rustdoc-toolbar .help-menu .popover"
+assert-css: (".settings-menu .popover", {"display": "none"})
 
 define-function: (
     "check-popover-colors",
@@ -37,13 +37,21 @@ define-function: (
     block {
         call-function: ("switch-theme", {"theme": |theme|})
 
-        click: "#help-button"
+        click: "rustdoc-toolbar .help-menu"
         assert-css: (
-            "#help-button .popover",
+            "rustdoc-toolbar .help-menu .popover",
             {"display": "block", "border-color": |border_color|},
         )
-        compare-elements-css: ("#help-button .popover", "#help-button .top", ["border-color"])
-        compare-elements-css: ("#help-button .popover", "#help-button .bottom", ["border-color"])
+        compare-elements-css: (
+            "rustdoc-toolbar .help-menu .popover",
+            "rustdoc-toolbar .help-menu .top",
+            ["border-color"],
+        )
+        compare-elements-css: (
+            "rustdoc-toolbar .help-menu .popover",
+            "rustdoc-toolbar .help-menu .bottom",
+            ["border-color"],
+        )
     }
 )
 
@@ -63,8 +71,21 @@ call-function: ("check-popover-colors", {
 
 // Opening the mobile sidebar should close the settings popover.
 set-window-size: (650, 600)
-click: "#settings-menu a"
-assert-css: ("#settings-menu .popover", {"display": "block"})
+click: "rustdoc-topbar .settings-menu a"
+assert-css: ("rustdoc-topbar .settings-menu .popover", {"display": "block"})
+click: ".sidebar-menu-toggle"
+assert: "//*[@class='sidebar shown']"
+assert-css: ("rustdoc-topbar .settings-menu .popover", {"display": "none"})
+// Opening the settings popover should close the sidebar.
+click: ".settings-menu a"
+assert-css: ("rustdoc-topbar .settings-menu .popover", {"display": "block"})
+assert-false: "//*[@class='sidebar shown']"
+
+// Opening the settings popover at start (which async loads stuff) should also close.
+reload:
 click: ".sidebar-menu-toggle"
 assert: "//*[@class='sidebar shown']"
-assert-css: ("#settings-menu .popover", {"display": "none"})
+assert-false: "rustdoc-topbar .settings-menu .popover"
+click: "rustdoc-topbar .settings-menu a"
+assert-false: "//*[@class='sidebar shown']"
+wait-for: "rustdoc-topbar .settings-menu .popover"
diff --git a/tests/rustdoc-gui/scrape-examples-color.goml b/tests/rustdoc-gui/scrape-examples-color.goml
index b0faca190a5..c84fe1f3411 100644
--- a/tests/rustdoc-gui/scrape-examples-color.goml
+++ b/tests/rustdoc-gui/scrape-examples-color.goml
@@ -27,7 +27,7 @@ define-function: (
             "color": |help_hover_color|,
         })
         // Moving the cursor to another item to not break next runs.
-        move-cursor-to: ".search-input"
+        move-cursor-to: "#search-button"
     }
 )
 
diff --git a/tests/rustdoc-gui/scrape-examples-layout.goml b/tests/rustdoc-gui/scrape-examples-layout.goml
index 85a3b2a6287..681d0c24c6d 100644
--- a/tests/rustdoc-gui/scrape-examples-layout.goml
+++ b/tests/rustdoc-gui/scrape-examples-layout.goml
@@ -64,8 +64,8 @@ assert-size: (".more-scraped-examples .scraped-example .example-wrap", {
 store-value: (offset_y, 4)
 
 // First with desktop
-assert-position: (".scraped-example", {"y": 256})
-assert-position: (".scraped-example .prev", {"y": 256 + |offset_y|})
+assert-position: (".scraped-example", {"y": 214})
+assert-position: (".scraped-example .prev", {"y": 214 + |offset_y|})
 
 // Gradient background should be at the top of the code block.
 assert-css: (".scraped-example .example-wrap::before", {"top": "0px"})
@@ -74,8 +74,8 @@ assert-css: (".scraped-example .example-wrap::after", {"bottom": "0px"})
 // Then with mobile
 set-window-size: (600, 600)
 store-size: (".scraped-example .scraped-example-title", {"height": title_height})
-assert-position: (".scraped-example", {"y": 291})
-assert-position: (".scraped-example .prev", {"y": 291 + |offset_y| + |title_height|})
+assert-position: (".scraped-example", {"y": 249})
+assert-position: (".scraped-example .prev", {"y": 249 + |offset_y| + |title_height|})
 
 define-function: (
     "check_title_and_code_position",
diff --git a/tests/rustdoc-gui/scrape-examples-toggle.goml b/tests/rustdoc-gui/scrape-examples-toggle.goml
index 441895a7c0e..ec5710fbcdc 100644
--- a/tests/rustdoc-gui/scrape-examples-toggle.goml
+++ b/tests/rustdoc-gui/scrape-examples-toggle.goml
@@ -25,7 +25,7 @@ define-function: (
         // We put the toggle in the original state.
         click: ".more-examples-toggle"
         // Moving cursor away from the toggle line to prevent disrupting next test.
-        move-cursor-to: ".search-input"
+        move-cursor-to: "rustdoc-toolbar #search-button"
     },
 )
 
diff --git a/tests/rustdoc-gui/search-about-this-result.goml b/tests/rustdoc-gui/search-about-this-result.goml
index 1d45c06dc43..ec1df737c81 100644
--- a/tests/rustdoc-gui/search-about-this-result.goml
+++ b/tests/rustdoc-gui/search-about-this-result.goml
@@ -7,6 +7,7 @@ focus: ".search-input"
 press-key: "Enter"
 
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-count: ("#search-tabs button", 1)
 assert-count: (".search-results > a", 1)
 
@@ -32,6 +33,7 @@ focus: ".search-input"
 press-key: "Enter"
 
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-text: ("//div[@class='type-signature']", "F -> WhereWhitespace<T>")
 assert-count: ("#search-tabs button", 1)
 assert-count: (".search-results > a", 1)
diff --git a/tests/rustdoc-gui/search-corrections.goml b/tests/rustdoc-gui/search-corrections.goml
index f80675730c4..a14a80f357c 100644
--- a/tests/rustdoc-gui/search-corrections.goml
+++ b/tests/rustdoc-gui/search-corrections.goml
@@ -1,101 +1,60 @@
 // ignore-tidy-linelength
+include: "utils.goml"
 
 // Checks that the search tab result tell the user about corrections
 // First, try a search-by-name
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-// Intentionally wrong spelling of "NotableStructWithLongName"
-write-into: (".search-input", "NotableStructWithLongNamr")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "NotableStructWithLongNamr"})
 
 // Corrections aren't shown on the "In Names" tab.
 assert: "#search-tabs button.selected:first-child"
-assert-css: (".search-corrections", {
-    "display": "none"
-})
+assert-false: ".search-results:nth-child(1) .search-corrections"
 
 // Corrections do get shown on the "In Parameters" tab.
 click: "#search-tabs button:nth-child(2)"
 assert: "#search-tabs button.selected:nth-child(2)"
-assert-css: (".search-corrections", {
-    "display": "block"
-})
 assert-text: (
-    ".search-corrections",
-    "Type \"NotableStructWithLongNamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
+    ".search-results:nth-child(2) .search-corrections",
+    "Type \"NotableStructWithLongNamr\" not found. Showing results for closest type name \"NotableStructWithLongName\" instead."
 )
 
 // Corrections do get shown on the "In Return Type" tab.
 click: "#search-tabs button:nth-child(3)"
 assert: "#search-tabs button.selected:nth-child(3)"
-assert-css: (".search-corrections", {
-    "display": "block"
-})
 assert-text: (
-    ".search-corrections",
-    "Type \"NotableStructWithLongNamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
+    ".search-results:nth-child(3) .search-corrections",
+    "Type \"NotableStructWithLongNamr\" not found. Showing results for closest type name \"NotableStructWithLongName\" instead."
 )
 
 // Now, explicit return values
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-// Intentionally wrong spelling of "NotableStructWithLongName"
-write-into: (".search-input", "-> NotableStructWithLongNamr")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "-> NotableStructWithLongNamr"})
 
-assert-css: (".search-corrections", {
-    "display": "block"
-})
 assert-text: (
-    ".search-corrections",
-    "Type \"NotableStructWithLongNamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
+    ".search-results.active .search-corrections",
+    "Type \"NotableStructWithLongNamr\" not found and used as generic parameter. Consider searching for \"NotableStructWithLongName\" instead."
 )
 
 // Now, generic correction
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-// Intentionally wrong spelling of "NotableStructWithLongName"
-write-into: (".search-input", "NotableStructWithLongNamr, NotableStructWithLongNamr")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "NotableStructWithLongNamr, NotableStructWithLongNamr"})
 
-assert-css: (".search-corrections", {
-    "display": "block"
-})
 assert-text: (
-    ".search-corrections",
-    "Type \"NotableStructWithLongNamr\" not found and used as generic parameter. Consider searching for \"notablestructwithlongname\" instead."
+    ".search-failed.active .search-corrections",
+    "Type \"NotableStructWithLongNamr\" not found and used as generic parameter. Consider searching for \"NotableStructWithLongName\" instead."
 )
 
 // Now, generic correction plus error
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-// Intentionally wrong spelling of "NotableStructWithLongName"
-write-into: (".search-input", "Foo<NotableStructWithLongNamr>,y")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "Foo<NotableStructWithLongNamr>,y"})
 
-assert-css: (".search-corrections", {
-    "display": "block"
-})
 assert-text: (
-    ".search-corrections",
-    "Type \"NotableStructWithLongNamr\" not found and used as generic parameter. Consider searching for \"notablestructwithlongname\" instead."
+    ".search-failed.active .search-corrections",
+    "Type \"NotableStructWithLongNamr\" not found and used as generic parameter. Consider searching for \"NotableStructWithLongName\" instead."
 )
 
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-// Intentionally wrong spelling of "NotableStructWithLongName"
-write-into: (".search-input", "generic:NotableStructWithLongNamr<x>,y")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "generic:NotableStructWithLongNamr<x>,y"})
 
 assert-css: (".error", {
     "display": "block"
diff --git a/tests/rustdoc-gui/search-error.goml b/tests/rustdoc-gui/search-error.goml
index 4dc60669c7a..4d7c2263fd1 100644
--- a/tests/rustdoc-gui/search-error.goml
+++ b/tests/rustdoc-gui/search-error.goml
@@ -8,6 +8,7 @@ define-function: (
     [theme, error_background],
     block {
         call-function: ("switch-theme", {"theme": |theme|})
+        wait-for-false: "#search-tabs .count.loading"
         wait-for: "#search .error code"
         assert-css: ("#search .error code", {"background-color": |error_background|})
     }
diff --git a/tests/rustdoc-gui/search-filter.goml b/tests/rustdoc-gui/search-filter.goml
index c5038e0892b..d92d522c119 100644
--- a/tests/rustdoc-gui/search-filter.goml
+++ b/tests/rustdoc-gui/search-filter.goml
@@ -2,11 +2,7 @@
 include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 show-text: true
-write-into: (".search-input", "test")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "test"})
 assert-text: ("#results .externcrate", "test_docs")
 
 wait-for: "#crate-search"
@@ -21,6 +17,7 @@ press-key: "ArrowDown"
 press-key: "Enter"
 // Waiting for the search results to appear...
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-document-property: ({"URL": "&filter-crate="}, CONTAINS)
 // We check that there is no more "test_docs" appearing.
 assert-false: "#results .externcrate"
@@ -31,7 +28,8 @@ assert-property: ("#crate-search", {"value": "lib2"})
 // crate filtering.
 press-key: "Escape"
 wait-for-css: ("#main-content", {"display": "block"})
-focus: ".search-input"
+click: "#search-button"
+wait-for: ".search-input"
 wait-for-css: ("#main-content", {"display": "none"})
 // We check that there is no more "test_docs" appearing.
 assert-false: "#results .externcrate"
@@ -47,6 +45,7 @@ press-key: "ArrowUp"
 press-key: "Enter"
 // Waiting for the search results to appear...
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-property: ("#crate-search", {"value": "all crates"})
 
 // Checking that the URL parameter is taken into account for crate filtering.
@@ -56,8 +55,7 @@ assert-property: ("#crate-search", {"value": "lib2"})
 assert-false: "#results .externcrate"
 
 // Checking that the text for the "title" is correct (the "all crates" comes from the "<select>").
-assert-text: (".search-results-title", "Results", STARTS_WITH)
-assert-text: (".search-results-title + .sub-heading", " in all crates", STARTS_WITH)
+assert-text: (".search-switcher", "Search results in all crates", STARTS_WITH)
 
 // Checking the display of the crate filter.
 // We start with the light theme.
@@ -72,7 +70,7 @@ assert-css: ("#crate-search", {
 })
 
 // We now check the dark theme.
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 click: "#theme-dark"
 wait-for-css: ("#crate-search", {
diff --git a/tests/rustdoc-gui/search-form-elements.goml b/tests/rustdoc-gui/search-form-elements.goml
index efe39f7a9d1..fdf0afb7e8f 100644
--- a/tests/rustdoc-gui/search-form-elements.goml
+++ b/tests/rustdoc-gui/search-form-elements.goml
@@ -2,6 +2,7 @@
 include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=test"
 wait-for: "#search-tabs" // Waiting for the search.js to load.
+wait-for-false: "#search-tabs .count.loading"
 show-text: true
 
 define-function: (
@@ -31,7 +32,7 @@ define-function: (
             },
         )
         assert-css: (
-            "#help-button > a",
+            "rustdoc-toolbar .help-menu > a",
             {
                 "color": |menu_button_a_color|,
                 "border-color": "transparent",
@@ -39,9 +40,9 @@ define-function: (
             },
         )
         // Hover help button.
-        move-cursor-to: "#help-button"
+        move-cursor-to: "rustdoc-toolbar .help-menu"
         assert-css: (
-            "#help-button > a",
+            "rustdoc-toolbar .help-menu > a",
             {
                 "color": |menu_button_a_color|,
                 "border-color": |menu_button_a_border_hover|,
@@ -49,15 +50,15 @@ define-function: (
             },
         )
         // Link color inside
-        click: "#help-button"
+        click: "rustdoc-toolbar .help-menu"
         assert-css: (
-            "#help a",
+            "rustdoc-toolbar #help a",
             {
                 "color": |menu_a_color|,
             },
         )
         assert-css: (
-            "#settings-menu > a",
+            "rustdoc-toolbar .settings-menu > a",
             {
                 "color": |menu_button_a_color|,
                 "border-color": "transparent",
@@ -65,9 +66,9 @@ define-function: (
             },
         )
         // Hover settings menu.
-        move-cursor-to: "#settings-menu"
+        move-cursor-to: "rustdoc-toolbar .settings-menu"
         assert-css: (
-            "#settings-menu:hover > a",
+            "rustdoc-toolbar .settings-menu:hover > a",
             {
                 "color": |menu_button_a_color|,
                 "border-color": |menu_button_a_border_hover|,
@@ -120,8 +121,10 @@ call-function: (
 // Check that search input correctly decodes form encoding.
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=a+b"
 wait-for: "#search-tabs" // Waiting for the search.js to load.
+wait-for-false: "#search-tabs .count.loading"
 assert-property: (".search-input", { "value": "a b" })
 // Check that literal + is not treated as space.
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=a%2Bb"
 wait-for: "#search-tabs" // Waiting for the search.js to load.
+wait-for-false: "#search-tabs .count.loading"
 assert-property: (".search-input", { "value": "a+b" })
diff --git a/tests/rustdoc-gui/search-input-mobile.goml b/tests/rustdoc-gui/search-input-mobile.goml
index adcb3658a27..a383d92d288 100644
--- a/tests/rustdoc-gui/search-input-mobile.goml
+++ b/tests/rustdoc-gui/search-input-mobile.goml
@@ -2,10 +2,13 @@
 // The PR which fixed it is: https://github.com/rust-lang/rust/pull/81592
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 set-window-size: (463, 700)
-// We first check that the search input isn't already focused.
-assert-false: ("input.search-input:focus")
-click: "input.search-input"
+click: "#search-button"
+wait-for: ".search-input"
+assert: "input.search-input:focus"
+
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 reload:
 set-window-size: (750, 700)
-click: "input.search-input"
-assert: ("input.search-input:focus")
+click: "#search-button"
+wait-for: ".search-input"
+assert: "input.search-input:focus"
diff --git a/tests/rustdoc-gui/search-keyboard.goml b/tests/rustdoc-gui/search-keyboard.goml
index 707bb8f5faa..4adaaa106ea 100644
--- a/tests/rustdoc-gui/search-keyboard.goml
+++ b/tests/rustdoc-gui/search-keyboard.goml
@@ -1,28 +1,25 @@
 // Checks that the search tab results work correctly with function signature syntax
 // First, try a search-by-name
+include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "Foo")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "Foo"})
 
 // Now use the keyboard commands to switch to the third result.
 press-key: "ArrowDown"
 press-key: "ArrowDown"
 press-key: "ArrowDown"
-assert: ".search-results.active > a:focus:nth-of-type(3)"
+wait-for: ".search-results.active > a:focus:nth-of-type(3)"
 
 // Now switch to the second tab, then back to the first one, then arrow back up.
 press-key: "ArrowRight"
-assert: ".search-results.active:nth-of-type(2) > a:focus:nth-of-type(1)"
+wait-for: ".search-results.active:nth-of-type(2) > a:focus:nth-of-type(1)"
 press-key: "ArrowLeft"
-assert: ".search-results.active:nth-of-type(1) > a:focus:nth-of-type(3)"
+wait-for: ".search-results.active:nth-of-type(1) > a:focus:nth-of-type(3)"
 press-key: "ArrowUp"
-assert: ".search-results.active > a:focus:nth-of-type(2)"
+wait-for: ".search-results.active > a:focus:nth-of-type(2)"
 press-key: "ArrowUp"
-assert: ".search-results.active > a:focus:nth-of-type(1)"
+wait-for: ".search-results.active > a:focus:nth-of-type(1)"
 press-key: "ArrowUp"
-assert: ".search-input:focus"
+wait-for: ".search-input:focus"
 press-key: "ArrowDown"
-assert: ".search-results.active > a:focus:nth-of-type(1)"
+wait-for: ".search-results.active > a:focus:nth-of-type(1)"
diff --git a/tests/rustdoc-gui/search-reexport.goml b/tests/rustdoc-gui/search-reexport.goml
index fa9eedeceac..c69464f8bd9 100644
--- a/tests/rustdoc-gui/search-reexport.goml
+++ b/tests/rustdoc-gui/search-reexport.goml
@@ -6,10 +6,8 @@ call-function: ("switch-theme", {"theme": "dark"})
 // First we check that the reexport has the correct ID and no background color.
 assert-text: ("//*[@id='reexport.TheStdReexport']", "pub use ::std as TheStdReexport;")
 assert-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgba(0, 0, 0, 0)"})
-write-into: (".search-input", "TheStdReexport")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-wait-for: "//a[@class='result-import']"
+call-function: ("perform-search", {"query": "TheStdReexport"})
+assert: "//a[@class='result-import']"
 assert-attribute: (
     "//a[@class='result-import']",
     {"href": "../test_docs/index.html#reexport.TheStdReexport"},
@@ -21,9 +19,8 @@ wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "#494a
 
 // We now check that the alias is working as well on the reexport.
 // To be SURE that the search will be run.
-press-key: 'Enter'
-write-into: (".search-input", "AliasForTheStdReexport")
-wait-for: "//a[@class='result-import']"
+call-function: ("perform-search", {"query": "AliasForTheStdReexport"})
+assert: "//a[@class='result-import']"
 assert-text: (
     "a.result-import .result-name",
     "re-export AliasForTheStdReexport - see test_docs::TheStdReexport",
diff --git a/tests/rustdoc-gui/search-result-color.goml b/tests/rustdoc-gui/search-result-color.goml
index e6dd504d703..e136eab6a7d 100644
--- a/tests/rustdoc-gui/search-result-color.goml
+++ b/tests/rustdoc-gui/search-result-color.goml
@@ -14,6 +14,7 @@ define-function: (
 
         // Waiting for the search results to appear...
         wait-for: "#search-tabs"
+        wait-for-false: "#search-tabs .count.loading"
         assert-css: (
             "#search-tabs > button > .count",
             {"color": |count_color|},
@@ -212,11 +213,7 @@ call-function: ("check-search-color", {
 // Check the alias.
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 
-write-into: (".search-input", "thisisanalias")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "thisisanalias"})
 
 define-function: (
     "check-alias",
diff --git a/tests/rustdoc-gui/search-result-description.goml b/tests/rustdoc-gui/search-result-description.goml
index 745ef31e6cb..4ab250b472d 100644
--- a/tests/rustdoc-gui/search-result-description.goml
+++ b/tests/rustdoc-gui/search-result-description.goml
@@ -2,4 +2,5 @@
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=some_more_function"
 // Waiting for the search results to appear...
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-text: (".search-results .desc code", "format!")
diff --git a/tests/rustdoc-gui/search-result-display.goml b/tests/rustdoc-gui/search-result-display.goml
index 1521267956a..345e08cd578 100644
--- a/tests/rustdoc-gui/search-result-display.goml
+++ b/tests/rustdoc-gui/search-result-display.goml
@@ -7,6 +7,7 @@ write-into: (".search-input", "test")
 // To be SURE that the search will be run.
 press-key: 'Enter'
 wait-for: "#crate-search"
+wait-for-false: "#search-tabs .count.loading"
 // The width is returned by "getComputedStyle" which returns the exact number instead of the
 // CSS rule which is "50%"...
 assert-size: (".search-results div.desc", {"width": 248})
@@ -34,6 +35,7 @@ assert: |new_width| < |width| - 10
 // Check that if the search is too long on mobile, it'll go under the "typename".
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName"
 wait-for: "#crate-search"
+wait-for-false: "#search-tabs .count.loading"
 compare-elements-position-near: (
     ".search-results .result-name .typename",
     ".search-results .result-name .path",
@@ -51,7 +53,7 @@ set-window-size: (900, 900)
 
 // First we check the current width, height and position.
 assert-css: ("#crate-search", {"width": "159px"})
-store-size: (".search-results-title", {
+store-size: (".search-switcher", {
     "height": search_results_title_height,
     "width": search_results_title_width,
 })
@@ -64,8 +66,8 @@ set-text: (
 )
 
 // Then we compare again to confirm the height didn't change.
-assert-size: ("#crate-search", {"width": 370})
-assert-size: (".search-results-title", {
+assert-size: ("#crate-search", {"width": 185})
+assert-size: (".search-switcher", {
     "height": |search_results_title_height|,
 })
 assert-css: ("#search", {"width": "640px"})
@@ -79,6 +81,7 @@ define-function: (
     block {
         call-function: ("switch-theme", {"theme": |theme|})
         wait-for: "#crate-search"
+        wait-for-false: "#search-tabs .count.loading"
         assert-css: ("#crate-search", {"border": "1px solid " + |border|})
         assert-css: ("#crate-search-div::after", {"filter": |filter|})
         move-cursor-to: "#crate-search"
diff --git a/tests/rustdoc-gui/search-result-go-to-first.goml b/tests/rustdoc-gui/search-result-go-to-first.goml
index 136213c517e..acb25453171 100644
--- a/tests/rustdoc-gui/search-result-go-to-first.goml
+++ b/tests/rustdoc-gui/search-result-go-to-first.goml
@@ -9,6 +9,7 @@ assert-text-false: (".main-heading h1", "Struct test_docs::FooCopy item path")
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo"
 // Waiting for the search results to appear...
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-text-false: (".main-heading h1", "Struct test_docs::FooCopy item path")
 // Ensure that the search results are displayed, not the "normal" content.
 assert-css: ("#main-content", {"display": "none"})
@@ -17,4 +18,4 @@ assert-css: ("#main-content", {"display": "none"})
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=struct%3AFoo&go_to_first=true"
 // Waiting for the page to load...
 wait-for-text: (".main-heading .rustdoc-breadcrumbs", "test_docs")
-wait-for-text: (".main-heading h1", "Struct FooCopy item path")
+wait-for-text: (".main-heading h1", "Struct Foo Copy item path")
diff --git a/tests/rustdoc-gui/search-result-impl-disambiguation.goml b/tests/rustdoc-gui/search-result-impl-disambiguation.goml
index bca52b46498..e39b90a735e 100644
--- a/tests/rustdoc-gui/search-result-impl-disambiguation.goml
+++ b/tests/rustdoc-gui/search-result-impl-disambiguation.goml
@@ -1,15 +1,12 @@
 // ignore-tidy-linelength
+include: "utils.goml"
 
 // Checks that, if a type has two methods with the same name, they both get
 // linked correctly.
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 
 // This should link to the inherent impl
-write-into: (".search-input", "ZyxwvutMethodDisambiguation -> bool")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "ZyxwvutMethodDisambiguation -> bool"})
 // Check the disambiguated link.
 assert-count: ("a.result-method", 1)
 assert-attribute: ("a.result-method", {
@@ -25,11 +22,7 @@ assert: "section:target"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 
 // This should link to the trait impl
-write-into: (".search-input", "ZyxwvutMethodDisambiguation, usize -> usize")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "ZyxwvutMethodDisambiguation, usize -> usize"})
 // Check the disambiguated link.
 assert-count: ("a.result-method", 1)
 assert-attribute: ("a.result-method", {
@@ -47,6 +40,7 @@ assert: "section:target"
 // impl block's disambiguator is also acted upon.
 go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=MultiImplBlockStruct->bool"
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-count: ("a.result-method", 1)
 assert-attribute: ("a.result-method", {
     "href": "../lib2/another_mod/struct.MultiImplBlockStruct.html#impl-MultiImplBlockStruct/method.second_fn"
@@ -56,6 +50,7 @@ wait-for: "details:has(summary > #impl-MultiImplBlockStruct-1) > div section[id=
 
 go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=MultiImplBlockStruct->u32"
 wait-for: "#search-tabs"
+wait-for-false: "#search-tabs .count.loading"
 assert-count: ("a.result-method", 1)
 assert-attribute: ("a.result-method", {
     "href": "../lib2/another_mod/struct.MultiImplBlockStruct.html#impl-MultiImplBlockTrait-for-MultiImplBlockStruct/method.second_fn"
diff --git a/tests/rustdoc-gui/search-result-keyword.goml b/tests/rustdoc-gui/search-result-keyword.goml
index 02305f2587c..d9bdf6d0135 100644
--- a/tests/rustdoc-gui/search-result-keyword.goml
+++ b/tests/rustdoc-gui/search-result-keyword.goml
@@ -1,8 +1,5 @@
 // Checks that the "keyword" results have the expected text alongside them.
+include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "for")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "for"})
 assert-text: (".result-keyword .result-name", "keyword for")
diff --git a/tests/rustdoc-gui/search-tab-change-title-fn-sig.goml b/tests/rustdoc-gui/search-tab-change-title-fn-sig.goml
index 7e26229ec6e..7bd283c5739 100644
--- a/tests/rustdoc-gui/search-tab-change-title-fn-sig.goml
+++ b/tests/rustdoc-gui/search-tab-change-title-fn-sig.goml
@@ -1,11 +1,9 @@
 // Checks that the search tab results work correctly with function signature syntax
 // First, try a search-by-name
+include: "utils.goml"
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "Foo")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "Foo"})
+
 assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"})
 assert-text: ("#search-tabs > button:nth-of-type(1)", "In Names", STARTS_WITH)
 assert: "input.search-input:focus"
@@ -23,11 +21,7 @@ wait-for-attribute: ("#search-tabs > button:nth-of-type(3)", {"class": "selected
 
 // Now try search-by-return
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "-> String")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "-> String"})
 assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"})
 assert-text: ("#search-tabs > button:nth-of-type(1)", "In Function Return Types", STARTS_WITH)
 assert: "input.search-input:focus"
@@ -45,30 +39,18 @@ wait-for-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected
 
 // Try with a search-by-return with no results
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "-> Something")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "-> Something"})
 assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"})
 assert-text: ("#search-tabs > button:nth-of-type(1)", "In Function Return Types", STARTS_WITH)
 
 // Try with a search-by-parameter
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "usize,pattern")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "usize,pattern"})
 assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"})
 assert-text: ("#search-tabs > button:nth-of-type(1)", "In Function Parameters", STARTS_WITH)
 
 // Try with a search-by-parameter-and-return
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-write-into: (".search-input", "pattern -> str")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-// Waiting for the search results to appear...
-wait-for: "#search-tabs"
+call-function: ("perform-search", {"query": "pattern -> str"})
 assert-attribute: ("#search-tabs > button:nth-of-type(1)", {"class": "selected"})
 assert-text: ("#search-tabs > button:nth-of-type(1)", "In Function Signatures", STARTS_WITH)
diff --git a/tests/rustdoc-gui/search-tab.goml b/tests/rustdoc-gui/search-tab.goml
index 826e272e508..00ca952033d 100644
--- a/tests/rustdoc-gui/search-tab.goml
+++ b/tests/rustdoc-gui/search-tab.goml
@@ -15,7 +15,8 @@ define-function: (
         focus: ".search-input"
         press-key: "Enter"
 
-        wait-for: "#search-tabs"
+        wait-for: "#search-tabs .count"
+        wait-for-false: "#search-tabs .count.loading"
         assert-css: ("#search-tabs > button:not(.selected)", {
             "background-color": |background|,
             "border-bottom": |border_bottom|,
diff --git a/tests/rustdoc-gui/search-title.goml b/tests/rustdoc-gui/search-title.goml
index 95bc36af449..83321a05f2b 100644
--- a/tests/rustdoc-gui/search-title.goml
+++ b/tests/rustdoc-gui/search-title.goml
@@ -5,10 +5,7 @@ go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 store-value: (title, "test_docs - Rust")
 assert-document-property: {"title": |title|}
 
-write-into: (".search-input", "test")
-// To be SURE that the search will be run.
-press-key: 'Enter'
-wait-for: "#crate-search"
+call-function: ("perform-search", {"query": "test"})
 
 assert-document-property: {"title": '"test" Search - Rust'}
 
@@ -16,6 +13,7 @@ set-property: (".search-input", {"value": "another one"})
 // To be SURE that the search will be run.
 press-key: 'Enter'
 wait-for: "#crate-search"
+wait-for-false: "#search-tabs .count.loading"
 
 assert-document-property: {"title": '"another one" Search - Rust'}
 
diff --git a/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml b/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
index 9afde7c61da..342bd726694 100644
--- a/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
+++ b/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
@@ -9,7 +9,7 @@ define-function: (
     [storage_value, setting_attribute_value, toggle_attribute_value],
     block {
         assert-local-storage: {"rustdoc-auto-hide-large-items": |storage_value|}
-        click: "#settings-menu"
+        click: "rustdoc-toolbar .settings-menu"
         wait-for: "#settings"
         assert-property: ("#auto-hide-large-items", {"checked": |setting_attribute_value|})
         assert-attribute: (".item-decl .type-contents-toggle", {"open": |toggle_attribute_value|})
diff --git a/tests/rustdoc-gui/setting-auto-hide-item-methods-docs.goml b/tests/rustdoc-gui/setting-auto-hide-item-methods-docs.goml
index 644396ed578..02d4ce8855f 100644
--- a/tests/rustdoc-gui/setting-auto-hide-item-methods-docs.goml
+++ b/tests/rustdoc-gui/setting-auto-hide-item-methods-docs.goml
@@ -6,7 +6,7 @@ define-function: (
     [storage_value, setting_attribute_value, toggle_attribute_value],
     block {
         assert-local-storage: {"rustdoc-auto-hide-method-docs": |storage_value|}
-        click: "#settings-menu"
+        click: "rustdoc-toolbar .settings-menu"
         wait-for: "#settings"
         assert-property: ("#auto-hide-method-docs", {"checked": |setting_attribute_value|})
         assert-attribute: (".toggle.method-toggle", {"open": |toggle_attribute_value|})
diff --git a/tests/rustdoc-gui/setting-auto-hide-trait-implementations.goml b/tests/rustdoc-gui/setting-auto-hide-trait-implementations.goml
index 3c09198dae5..4af1e829b31 100644
--- a/tests/rustdoc-gui/setting-auto-hide-trait-implementations.goml
+++ b/tests/rustdoc-gui/setting-auto-hide-trait-implementations.goml
@@ -5,7 +5,7 @@ define-function: (
     [storage_value, setting_attribute_value, toggle_attribute_value],
     block {
         assert-local-storage: {"rustdoc-auto-hide-trait-implementations": |storage_value|}
-        click: "#settings-menu"
+        click: "rustdoc-toolbar .settings-menu"
         wait-for: "#settings"
         assert-property: ("#auto-hide-trait-implementations", {"checked": |setting_attribute_value|})
         assert-attribute: ("#trait-implementations-list > details", {"open": |toggle_attribute_value|}, ALL)
diff --git a/tests/rustdoc-gui/setting-go-to-only-result.goml b/tests/rustdoc-gui/setting-go-to-only-result.goml
index f8535477c22..5a9c81e0b83 100644
--- a/tests/rustdoc-gui/setting-go-to-only-result.goml
+++ b/tests/rustdoc-gui/setting-go-to-only-result.goml
@@ -5,7 +5,7 @@ define-function: (
     [storage_value, setting_attribute_value],
     block {
         assert-local-storage: {"rustdoc-go-to-only-result": |storage_value|}
-        click: "#settings-menu"
+        click: "rustdoc-toolbar .settings-menu"
         wait-for: "#settings"
         assert-property: ("#go-to-only-result", {"checked": |setting_attribute_value|})
     }
@@ -25,7 +25,7 @@ wait-for: "#search"
 assert-document-property: ({"URL": "/lib2/index.html"}, CONTAINS)
 
 // Now we change its value.
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 click: "#go-to-only-result"
 assert-local-storage: {"rustdoc-go-to-only-result": "true"}
diff --git a/tests/rustdoc-gui/settings-button.goml b/tests/rustdoc-gui/settings-button.goml
index d78034769e2..28ce06207aa 100644
--- a/tests/rustdoc-gui/settings-button.goml
+++ b/tests/rustdoc-gui/settings-button.goml
@@ -9,7 +9,7 @@ define-function: (
     [theme, filter],
     block {
         call-function: ("switch-theme", {"theme": |theme|})
-        assert-css: ("#settings-menu > a::before", {
+        assert-css: ("rustdoc-toolbar .settings-menu > a::before", {
             "filter": |filter|,
             "width": "18px",
             "height": "18px",
diff --git a/tests/rustdoc-gui/settings.goml b/tests/rustdoc-gui/settings.goml
index 11d3696ccf6..7a163103b5a 100644
--- a/tests/rustdoc-gui/settings.goml
+++ b/tests/rustdoc-gui/settings.goml
@@ -5,7 +5,7 @@ show-text: true // needed when we check for colors below.
 // First, we check that the settings page doesn't exist.
 assert-false: "#settings"
 // We now click on the settings button.
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 assert-css: ("#settings", {"display": "block"})
 
@@ -13,11 +13,11 @@ assert-css: ("#settings", {"display": "block"})
 store-css: (".setting-line", {"margin": setting_line_margin})
 
 // Let's close it by clicking on the same button.
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for-css: ("#settings", {"display": "none"})
 
 // Let's check that pressing "ESCAPE" is closing it.
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for-css: ("#settings", {"display": "block"})
 press-key: "Escape"
 wait-for-css: ("#settings", {"display": "none"})
@@ -28,7 +28,7 @@ write: "test"
 // To be SURE that the search will be run.
 press-key: 'Enter'
 wait-for: "#alternative-display #search"
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for-css: ("#settings", {"display": "block"})
 // Ensure that the search is still displayed.
 wait-for: "#alternative-display #search"
@@ -41,7 +41,7 @@ set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"
 // We reload the page so the local storage settings are being used.
 reload:
 
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 
 // We check that the "Use system theme" is disabled.
@@ -55,7 +55,7 @@ assert: "#preferred-light-theme.setting-line.hidden"
 assert-property: ("#theme .setting-radio-choices #theme-dark", {"checked": "true"})
 
 // Some style checks...
-move-cursor-to: "#settings-menu > a"
+move-cursor-to: "rustdoc-toolbar .settings-menu > a"
 // First we check the "default" display for radio buttons.
 assert-css: (
     "#theme-dark",
@@ -194,7 +194,7 @@ assert-css: (
         "border-width": "2px",
     },
 )
-move-cursor-to: "#settings-menu > a"
+move-cursor-to: "rustdoc-toolbar .settings-menu > a"
 // Let's now check with the focus for toggles.
 focus: "#auto-hide-large-items"
 assert-css: (
@@ -273,43 +273,43 @@ assert-local-storage: {"rustdoc-disable-shortcuts": "true"}
 press-key: "Escape"
 press-key: "?"
 assert-false: "#help-button .popover"
-wait-for-css: ("#settings-menu .popover", {"display": "block"})
+wait-for-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "block"})
 
 // Now turn keyboard shortcuts back on, and see if they work.
 click: "#disable-shortcuts"
 assert-local-storage: {"rustdoc-disable-shortcuts": "false"}
 press-key: "Escape"
 press-key: "?"
-wait-for-css: ("#help-button .popover", {"display": "block"})
-assert-css: ("#settings-menu .popover", {"display": "none"})
+wait-for-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
+assert-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "none"})
 
 // Now switch back to the settings popover, and make sure the keyboard
 // shortcut works when a check box is selected.
-click: "#settings-menu > a"
-wait-for-css: ("#settings-menu .popover", {"display": "block"})
+click: "rustdoc-toolbar .settings-menu > a"
+wait-for-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "block"})
 focus: "#auto-hide-large-items"
 press-key: "?"
-wait-for-css: ("#settings-menu .popover", {"display": "none"})
-wait-for-css: ("#help-button .popover", {"display": "block"})
+wait-for-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "none"})
+wait-for-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
 
 // Now switch back to the settings popover, and make sure the keyboard
 // shortcut works when a check box is selected.
-click: "#settings-menu > a"
-wait-for-css: ("#settings-menu .popover", {"display": "block"})
-wait-for-css: ("#help-button .popover", {"display": "none"})
+click: "rustdoc-toolbar .settings-menu > a"
+wait-for-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "block"})
+assert-false: "rustdoc-toolbar .help-menu .popover"
 focus: "#theme-system-preference"
 press-key: "?"
-wait-for-css: ("#settings-menu .popover", {"display": "none"})
-wait-for-css: ("#help-button .popover", {"display": "block"})
+wait-for-css: ("rustdoc-toolbar .settings-menu .popover", {"display": "none"})
+wait-for-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
 
 // Now we go to the settings page to check that the CSS is loaded as expected.
 go-to: "file://" + |DOC_PATH| + "/settings.html"
 wait-for: "#settings"
-assert-false: "#settings-menu"
+assert-false: "rustdoc-toolbar .settings-menu"
 assert-css: (".setting-radio", {"cursor": "pointer"})
 
 assert-attribute-false: ("#settings", {"class": "popover"}, CONTAINS)
-compare-elements-position: (".sub form", "#settings", ["x"])
+compare-elements-position: (".main-heading", "#settings", ["x"])
 
 // Check that setting-line has the same margin in this mode as in the popover.
 assert-css: (".setting-line", {"margin": |setting_line_margin|})
diff --git a/tests/rustdoc-gui/shortcuts.goml b/tests/rustdoc-gui/shortcuts.goml
index 5a6171d6f76..b27cf8c407d 100644
--- a/tests/rustdoc-gui/shortcuts.goml
+++ b/tests/rustdoc-gui/shortcuts.goml
@@ -8,9 +8,9 @@ press-key: "Escape"
 assert-false: "input.search-input:focus"
 // We now check for the help popup.
 press-key: "?"
-assert-css: ("#help-button .popover", {"display": "block"})
+assert-css: ("rustdoc-toolbar .help-menu .popover", {"display": "block"})
 press-key: "Escape"
-assert-css: ("#help-button .popover", {"display": "none"})
+assert-false: "rustdoc-toolbar .help-menu .popover"
 // Checking doc collapse and expand.
 // It should be displaying a "-":
 assert-text: ("#toggle-all-docs", "Summary")
diff --git a/tests/rustdoc-gui/sidebar-mobile.goml b/tests/rustdoc-gui/sidebar-mobile.goml
index 6ddc07c6481..f828516d762 100644
--- a/tests/rustdoc-gui/sidebar-mobile.goml
+++ b/tests/rustdoc-gui/sidebar-mobile.goml
@@ -17,7 +17,7 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 focus: ".sidebar-elems h3 a"
 assert-css: (".sidebar", {"display": "block", "left": "0px"})
 // When we tab out of the sidebar, close it.
-focus: ".search-input"
+focus: "#search-button"
 assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 
 // Open the sidebar menu.
@@ -43,7 +43,7 @@ press-key: "Escape"
 assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 
 // Check that the topbar is visible
-assert-property: (".mobile-topbar", {"clientHeight": "45"})
+assert-property: ("rustdoc-topbar", {"clientHeight": "45"})
 
 // Check that clicking an element from the sidebar scrolls to the right place
 // so the target is not obscured by the topbar.
@@ -54,7 +54,7 @@ assert-position: ("#method\.must_use", {"y": 46})
 // Check that the bottom-most item on the sidebar menu can be scrolled fully into view.
 click: ".sidebar-menu-toggle"
 scroll-to: ".block.keyword li:nth-child(1)"
-compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 544})
+compare-elements-position-near: (".block.keyword li:nth-child(1)", "rustdoc-topbar", {"y": 544})
 
 // Now checking the background color of the sidebar.
 // Close the sidebar menu.
@@ -65,7 +65,7 @@ define-function: (
     "check-colors",
     [theme, color, background],
     block {
-        call-function: ("switch-theme", {"theme": |theme|})
+        call-function: ("switch-theme-mobile", {"theme": |theme|})
         reload:
 
         // Open the sidebar menu.
diff --git a/tests/rustdoc-gui/sidebar-resize-close-popover.goml b/tests/rustdoc-gui/sidebar-resize-close-popover.goml
index 2d26caf1a39..d3fea9b0f40 100644
--- a/tests/rustdoc-gui/sidebar-resize-close-popover.goml
+++ b/tests/rustdoc-gui/sidebar-resize-close-popover.goml
@@ -2,7 +2,7 @@
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 assert-property: (".sidebar", {"clientWidth": "199"})
 show-text: true
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 assert-css: ("#settings", {"display": "block"})
 // normal resizing
@@ -12,7 +12,7 @@ assert-css: ("#settings", {"display": "none"})
 
 // Now same thing, but for source code
 go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 assert-css: ("#settings", {"display": "block"})
 assert-property: (".sidebar", {"clientWidth": "49"})
diff --git a/tests/rustdoc-gui/sidebar-resize-setting.goml b/tests/rustdoc-gui/sidebar-resize-setting.goml
index e346fe6aeac..a4572c670f8 100644
--- a/tests/rustdoc-gui/sidebar-resize-setting.goml
+++ b/tests/rustdoc-gui/sidebar-resize-setting.goml
@@ -4,7 +4,7 @@ assert-property: (".sidebar", {"clientWidth": "199"})
 show-text: true
 
 // Verify that the "hide" option is unchecked
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#settings"
 assert-css: ("#settings", {"display": "block"})
 assert-property: ("#hide-sidebar", {"checked": "false"})
@@ -15,7 +15,7 @@ drag-and-drop: ((205, 100), (5, 100))
 assert-css: (".sidebar", {"display": "none"})
 
 // Verify that the "hide" option is checked
-focus: "#settings-menu a"
+focus: "rustdoc-toolbar .settings-menu a"
 press-key: "Enter"
 wait-for-css: ("#settings", {"display": "block"})
 assert-property: ("#hide-sidebar", {"checked": "true"})
@@ -24,28 +24,28 @@ wait-for-css: (".sidebar", {"display": "block"})
 
 // Verify that hiding the sidebar hides the source sidebar
 // and puts the button in static position mode on mobile
-go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
 set-window-size: (600, 600)
-focus: "#settings-menu a"
+focus: "rustdoc-topbar .settings-menu a"
 press-key: "Enter"
 wait-for-css: ("#settings", {"display": "block"})
+wait-for-css: ("#sidebar-button", {"position": "static"})
+assert-property: ("#hide-sidebar", {"checked": "false"})
+click: "#hide-sidebar"
+wait-for-css: (".sidebar", {"display": "none"})
 wait-for-css: ("#sidebar-button", {"position": "fixed"})
 store-position: ("#sidebar-button", {
     "y": sidebar_button_y,
     "x": sidebar_button_x,
 })
-assert-property: ("#hide-sidebar", {"checked": "false"})
-click: "#hide-sidebar"
-wait-for-css: (".sidebar", {"display": "none"})
-wait-for-css: ("#sidebar-button", {"position": "static"})
-assert-position: ("#sidebar-button", {
-    "y": |sidebar_button_y|,
-    "x": |sidebar_button_x|,
-})
 assert-property: ("#hide-sidebar", {"checked": "true"})
 press-key: "Escape"
 // Clicking the sidebar button should work, and implicitly re-enable
 // the persistent navigation bar
 wait-for-css: ("#settings", {"display": "none"})
+assert-position: ("#sidebar-button", {
+    "y": |sidebar_button_y|,
+    "x": |sidebar_button_x|,
+})
 click: "#sidebar-button"
 wait-for-css: (".sidebar", {"display": "block"})
diff --git a/tests/rustdoc-gui/sidebar-source-code-display.goml b/tests/rustdoc-gui/sidebar-source-code-display.goml
index 1e77bcc2273..99810cd7863 100644
--- a/tests/rustdoc-gui/sidebar-source-code-display.goml
+++ b/tests/rustdoc-gui/sidebar-source-code-display.goml
@@ -141,7 +141,7 @@ click: "#sidebar-button"
 wait-for-css: (".src .sidebar > *", {"visibility": "hidden"})
 // We scroll to line 117 to change the scroll position.
 scroll-to: '//*[@id="117"]'
-store-value: (y_offset, "2578")
+store-value: (y_offset, "2567")
 assert-window-property: {"pageYOffset": |y_offset|}
 // Expanding the sidebar...
 click: "#sidebar-button"
diff --git a/tests/rustdoc-gui/sidebar-source-code.goml b/tests/rustdoc-gui/sidebar-source-code.goml
index 6afccf6a95f..0ac88612cef 100644
--- a/tests/rustdoc-gui/sidebar-source-code.goml
+++ b/tests/rustdoc-gui/sidebar-source-code.goml
@@ -85,4 +85,4 @@ assert-false: ".src-sidebar-expanded"
 assert: "nav.sidebar"
 
 // Check that the topbar is not visible
-assert-false: ".mobile-topbar"
+assert-false: "rustdoc-topbar"
diff --git a/tests/rustdoc-gui/sidebar.goml b/tests/rustdoc-gui/sidebar.goml
index c0fe240e2be..5ec0008ad8a 100644
--- a/tests/rustdoc-gui/sidebar.goml
+++ b/tests/rustdoc-gui/sidebar.goml
@@ -200,7 +200,7 @@ drag-and-drop: ((205, 100), (108, 100))
 assert-position: (".sidebar-crate > h2 > a", {"x": -3})
 
 // Check that the mobile sidebar and the source sidebar use the same icon.
-store-css: (".mobile-topbar .sidebar-menu-toggle::before", {"content": image_url})
+store-css: ("rustdoc-topbar .sidebar-menu-toggle::before", {"content": image_url})
 // Then we go to a source page.
 click: ".main-heading .src"
 assert-css: ("#sidebar-button a::before", {"content": |image_url|})
@@ -212,7 +212,7 @@ assert: |sidebar_background| != |sidebar_background_hover|
 click: "#sidebar-button a"
 wait-for: "html.src-sidebar-expanded"
 assert-css: ("#sidebar-button a:hover", {"background-color": |sidebar_background_hover|})
-move-cursor-to: "#settings-menu"
+move-cursor-to: "#search-button"
 assert-css: ("#sidebar-button a:not(:hover)", {"background-color": |sidebar_background|})
 // Closing sidebar.
 click: "#sidebar-button a"
@@ -220,7 +220,7 @@ wait-for: "html:not(.src-sidebar-expanded)"
 // Now we check the same when the sidebar button is moved alongside the search.
 set-window-size: (500, 500)
 store-css: ("#sidebar-button a:hover", {"background-color": not_sidebar_background_hover})
-move-cursor-to: "#settings-menu"
+move-cursor-to: "rustdoc-toolbar #search-button"
 store-css: ("#sidebar-button a:not(:hover)", {"background-color": not_sidebar_background})
 // The sidebar background is supposed to be the same as the main background.
 assert-css: ("body", {"background-color": |not_sidebar_background|})
diff --git a/tests/rustdoc-gui/source-anchor-scroll.goml b/tests/rustdoc-gui/source-anchor-scroll.goml
index c005af1e7a1..b1cbd02ef04 100644
--- a/tests/rustdoc-gui/source-anchor-scroll.goml
+++ b/tests/rustdoc-gui/source-anchor-scroll.goml
@@ -8,13 +8,13 @@ set-window-size: (600, 800)
 assert-property: ("html", {"scrollTop": "0"})
 
 click: '//a[text() = "barbar" and @href="#5-7"]'
-assert-property: ("html", {"scrollTop": "206"})
+assert-property: ("html", {"scrollTop": "195"})
 click: '//a[text() = "bar" and @href="#28-36"]'
-assert-property: ("html", {"scrollTop": "239"})
+assert-property: ("html", {"scrollTop": "228"})
 click: '//a[normalize-space() = "sub_fn" and @href="#2-4"]'
-assert-property: ("html", {"scrollTop": "134"})
+assert-property: ("html", {"scrollTop": "123"})
 
 // We now check that clicking on lines doesn't change the scroll
 // Extra information: the "sub_fn" function header is on line 1.
 click: '//*[@id="6"]'
-assert-property: ("html", {"scrollTop": "134"})
+assert-property: ("html", {"scrollTop": "123"})
diff --git a/tests/rustdoc-gui/source-code-page.goml b/tests/rustdoc-gui/source-code-page.goml
index aa5a16aac70..5e3470dca20 100644
--- a/tests/rustdoc-gui/source-code-page.goml
+++ b/tests/rustdoc-gui/source-code-page.goml
@@ -89,9 +89,9 @@ assert-css: ("a[data-nosnippet]", {"text-align": "right"}, ALL)
 // do anything (and certainly not add a `#NaN` to the URL!).
 go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
 // We use this assert-position to know where we will click.
-assert-position: ("//*[@id='1']", {"x": 81, "y": 169})
-// We click on the left of the "1" anchor but still in the `a[data-nosnippet]`.
-click: (77, 163)
+assert-position: ("//*[@id='1']", {"x": 81, "y": 141})
+// We click on the left of the "1" anchor but still in the "src-line-number" `<pre>`.
+click: (135, 77)
 assert-document-property: ({"URL": "/lib.rs.html"}, ENDS_WITH)
 
 // Checking the source code sidebar.
@@ -156,27 +156,8 @@ call-function: ("check-sidebar-dir-entry", {
     "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 7,
 })
 
-// Check the search form
-assert-css: ("nav.sub", {"flex-direction": "row"})
-// The goal of this test is to ensure the search input is perfectly centered
-// between the top of the page and the header.
-// To check this, we maintain the invariant:
-//
-// offsetTop[nav.sub form] = offsetTop[#main-content] - offsetHeight[nav.sub form] - offsetTop[nav.sub form]
-assert-position: ("nav.sub form", {"y": 15})
-assert-property: ("nav.sub form", {"offsetHeight": 34})
-assert-position: ("h1", {"y": 68})
-// 15 = 64 - 34 - 15
-
-// Now do the same check on moderately-sized, tablet mobile.
-set-window-size: (700, 700)
-assert-css: ("nav.sub", {"flex-direction": "row"})
-assert-position: ("nav.sub form", {"y": 8})
-assert-property: ("nav.sub form", {"offsetHeight": 34})
-assert-position: ("h1", {"y": 54})
-// 8 = 50 - 34 - 8
-
 // Check the sidebar directory entries have a marker and spacing (tablet).
+set-window-size: (700, 700)
 store-property: (".src-sidebar-title", {
     "offsetHeight": source_sidebar_title_height,
     "offsetTop": source_sidebar_title_y,
@@ -187,11 +168,8 @@ call-function: ("check-sidebar-dir-entry", {
     "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 7,
 })
 
-// Tiny, phone mobile gets a different display where the logo is stacked on top.
-set-window-size: (450, 700)
-assert-css: ("nav.sub", {"flex-direction": "column"})
-
 // Check the sidebar directory entries have a marker and spacing (phone).
+set-window-size: (450, 700)
 store-property: (".src-sidebar-title", {
     "offsetHeight": source_sidebar_title_height,
     "offsetTop": source_sidebar_title_y,
diff --git a/tests/rustdoc-gui/source-code-wrapping.goml b/tests/rustdoc-gui/source-code-wrapping.goml
index 0dab9c72ea9..c1fc2835c89 100644
--- a/tests/rustdoc-gui/source-code-wrapping.goml
+++ b/tests/rustdoc-gui/source-code-wrapping.goml
@@ -13,7 +13,7 @@ define-function: (
 )
 
 store-size: (".rust code", {"width": width, "height": height})
-click: "#settings-menu"
+click: "main .settings-menu"
 wait-for: "#settings"
 call-function: ("click-code-wrapping", {"expected": "true"})
 wait-for-size-false: (".rust code", {"width": |width|, "height": |height|})
@@ -28,7 +28,7 @@ assert-size: (".rust code", {"width": |width|, "height": |height|})
 
 // Now let's check in docs code examples.
 go-to: "file://" + |DOC_PATH| + "/test_docs/trait_bounds/index.html"
-click: "#settings-menu"
+click: "main .settings-menu"
 wait-for: "#settings"
 
 store-property: (".example-wrap .rust code", {"scrollWidth": rust_width, "scrollHeight": rust_height})
diff --git a/tests/rustdoc-gui/theme-change.goml b/tests/rustdoc-gui/theme-change.goml
index 58987110509..3860596e343 100644
--- a/tests/rustdoc-gui/theme-change.goml
+++ b/tests/rustdoc-gui/theme-change.goml
@@ -7,7 +7,7 @@ store-value: (background_light, "white")
 store-value: (background_dark, "#353535")
 store-value: (background_ayu, "#0f1419")
 
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#theme-ayu"
 click: "#theme-ayu"
 // should be the ayu theme so let's check the color.
@@ -75,7 +75,7 @@ store-value: (background_dark, "#353535")
 store-value: (background_ayu, "#0f1419")
 store-value: (background_custom_theme, "red")
 
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#theme-ayu"
 click: "#theme-ayu"
 // should be the ayu theme so let's check the color.
diff --git a/tests/rustdoc-gui/theme-defaults.goml b/tests/rustdoc-gui/theme-defaults.goml
index 2cc5d716cfe..12c17166e87 100644
--- a/tests/rustdoc-gui/theme-defaults.goml
+++ b/tests/rustdoc-gui/theme-defaults.goml
@@ -1,6 +1,6 @@
 // Ensure that the theme picker always starts with the actual defaults.
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#theme-system-preference"
 assert: "#theme-system-preference:checked"
 assert: "#preferred-light-theme-light:checked"
@@ -16,7 +16,7 @@ set-local-storage: {
     "rustdoc-theme": "ayu"
 }
 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
-click: "#settings-menu"
+click: "rustdoc-toolbar .settings-menu"
 wait-for: "#theme-system-preference"
 assert: "#theme-system-preference:checked"
 assert: "#preferred-light-theme-light:checked"
diff --git a/tests/rustdoc-gui/toggle-click-deadspace.goml b/tests/rustdoc-gui/toggle-click-deadspace.goml
index caca1b61493..c6d13973087 100644
--- a/tests/rustdoc-gui/toggle-click-deadspace.goml
+++ b/tests/rustdoc-gui/toggle-click-deadspace.goml
@@ -13,4 +13,4 @@ assert-attribute-false: (".impl-items .toggle", {"open": ""})
 // Click the "Trait" part of "impl Trait" and verify it navigates.
 click: "#impl-Trait-for-Foo h3 a:first-of-type"
 assert-text: (".main-heading .rustdoc-breadcrumbs", "lib2")
-assert-text: (".main-heading h1", "Trait TraitCopy item path")
+assert-text: (".main-heading h1", "Trait Trait Copy item path")
diff --git a/tests/rustdoc-gui/toggle-docs-mobile.goml b/tests/rustdoc-gui/toggle-docs-mobile.goml
index 6a40ba83b84..d038ebcdd6f 100644
--- a/tests/rustdoc-gui/toggle-docs-mobile.goml
+++ b/tests/rustdoc-gui/toggle-docs-mobile.goml
@@ -3,12 +3,12 @@
 go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
 set-window-size: (433, 600)
 assert-attribute: (".top-doc", {"open": ""})
-click: (4, 270) // This is the position of the top doc comment toggle
+click: (4, 230) // This is the position of the top doc comment toggle
 assert-attribute-false: (".top-doc", {"open": ""})
-click: (4, 270)
+click: (4, 230)
 assert-attribute: (".top-doc", {"open": ""})
 // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
-click: (3, 270)
+click: (3, 230)
 assert-attribute: (".top-doc", {"open": ""})
 
 // Assert the position of the toggle on the top doc block.
@@ -24,12 +24,12 @@ assert-position: (
 // Now we do the same but with a little bigger width
 set-window-size: (600, 600)
 assert-attribute: (".top-doc", {"open": ""})
-click: (4, 270) // New Y position since all search elements are back on one line.
+click: (4, 230) // New Y position since all search elements are back on one line.
 assert-attribute-false: (".top-doc", {"open": ""})
-click: (4, 270)
+click: (4, 230)
 assert-attribute: (".top-doc", {"open": ""})
 // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
-click: (3, 270)
+click: (3, 230)
 assert-attribute: (".top-doc", {"open": ""})
 
 // Same check on trait items.
diff --git a/tests/rustdoc-gui/toggle-docs.goml b/tests/rustdoc-gui/toggle-docs.goml
index 4607c604eeb..9eea687f74e 100644
--- a/tests/rustdoc-gui/toggle-docs.goml
+++ b/tests/rustdoc-gui/toggle-docs.goml
@@ -64,7 +64,7 @@ define-function: (
             "filter": |filter|,
         })
         // moving the cursor somewhere else to not mess with next function calls.
-        move-cursor-to: ".search-input"
+        move-cursor-to: "#search-button"
     },
 )
 
diff --git a/tests/rustdoc-gui/type-declation-overflow.goml b/tests/rustdoc-gui/type-declation-overflow.goml
index 4f8fe78ea4d..e53d7f00d93 100644
--- a/tests/rustdoc-gui/type-declation-overflow.goml
+++ b/tests/rustdoc-gui/type-declation-overflow.goml
@@ -47,27 +47,27 @@ assert-property: ("pre.item-decl", {"scrollWidth": "950"})
 set-window-size: (600, 600)
 go-to: "file://" + |DOC_PATH| + "/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html"
 // It shouldn't have an overflow in the topbar either.
-store-property: (".mobile-topbar", {"scrollWidth": scrollWidth})
-assert-property: (".mobile-topbar", {"clientWidth": |scrollWidth|})
-assert-css: (".mobile-topbar h2", {"overflow-x": "hidden"})
+store-property: ("rustdoc-topbar", {"scrollWidth": scrollWidth})
+assert-property: ("rustdoc-topbar", {"clientWidth": |scrollWidth|}, NEAR)
+assert-css: ("rustdoc-topbar h2", {"overflow-x": "hidden"})
 
 // Check that main heading and toolbar go side-by-side, both on desktop and on mobile.
 set-window-size: (1100, 800)
 go-to: "file://" + |DOC_PATH| + "/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html"
-compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar", ["y"])
-compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar", {"x": 550})
+compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", ["y"])
+compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", {"x": 300})
 go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
-compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar", ["y"])
-compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar", {"x": 550})
+compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", ["y"])
+compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", {"x": 300})
 
 // On mobile, they always wrap.
 set-window-size: (600, 600)
 go-to: "file://" + |DOC_PATH| + "/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html"
-compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar", ["y"])
-compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar", {"x": 200})
+compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", ["y"])
+compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", {"x": 200})
 go-to: "file://" + |DOC_PATH| + "/lib2/index.html"
-compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar", ["y"])
-compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar", {"x": 200})
+compare-elements-position: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", ["y"])
+compare-elements-position-near-false: (".main-heading h1", ".main-heading rustdoc-toolbar #search-button", {"x": 200})
 
 // Now we will check that the scrolling is working.
 // First on an item with "hidden methods".
diff --git a/tests/rustdoc-gui/utils.goml b/tests/rustdoc-gui/utils.goml
index 844dc98a537..10439309402 100644
--- a/tests/rustdoc-gui/utils.goml
+++ b/tests/rustdoc-gui/utils.goml
@@ -5,14 +5,47 @@ define-function: (
     block {
         // Set the theme.
         // Open the settings menu.
-        click: "#settings-menu"
+        click: "rustdoc-toolbar .settings-menu"
         // Wait for the popover to appear...
         wait-for: "#settings"
         // Change the setting.
         click: "#theme-"+ |theme|
         // Close the popover.
-        click: "#settings-menu"
+        click: "rustdoc-toolbar .settings-menu"
         // Ensure that the local storage was correctly updated.
         assert-local-storage: {"rustdoc-theme": |theme|}
     },
 )
+
+define-function: (
+    "switch-theme-mobile",
+    [theme],
+    block {
+        // Set the theme.
+        // Open the settings menu.
+        click: "rustdoc-topbar .settings-menu"
+        // Wait for the popover to appear...
+        wait-for: "#settings"
+        // Change the setting.
+        click: "#theme-"+ |theme|
+        // Close the popover.
+        click: "rustdoc-topbar .settings-menu"
+        // Ensure that the local storage was correctly updated.
+        assert-local-storage: {"rustdoc-theme": |theme|}
+    },
+)
+
+define-function: (
+    "perform-search",
+    [query],
+    block {
+        click: "#search-button"
+        wait-for: ".search-input"
+        write-into: (".search-input", |query|)
+        press-key: 'Enter'
+        // wait for the search to start
+        wait-for: "#search-tabs"
+        // then wait for it to finish
+        wait-for-false: "#search-tabs .count.loading"
+    }
+)
diff --git a/tests/rustdoc-js-std/alias-1.js b/tests/rustdoc-js-std/alias-1.js
index c31d1a3b1ad..b8f8db1f629 100644
--- a/tests/rustdoc-js-std/alias-1.js
+++ b/tests/rustdoc-js-std/alias-1.js
@@ -6,5 +6,10 @@ const EXPECTED = {
             'name': 'reference',
             'desc': "References, <code>&amp;T</code> and <code>&amp;mut T</code>.",
         },
+        {
+            'path': 'std::ops',
+            'name': 'BitAnd',
+            'desc': "The bitwise AND operator <code>&amp;</code>.",
+        },
     ],
 };
diff --git a/tests/rustdoc-js-std/alias-2.js b/tests/rustdoc-js-std/alias-2.js
index 5735b573bcb..9e97501e443 100644
--- a/tests/rustdoc-js-std/alias-2.js
+++ b/tests/rustdoc-js-std/alias-2.js
@@ -1,9 +1,7 @@
 const EXPECTED = {
     'query': '+',
     'others': [
-        { 'path': 'std::ops', 'name': 'AddAssign' },
         { 'path': 'std::ops', 'name': 'Add' },
-        { 'path': 'core::ops', 'name': 'AddAssign' },
-        { 'path': 'core::ops', 'name': 'Add' },
+        { 'path': 'std::ops', 'name': 'AddAssign' },
     ],
 };
diff --git a/tests/rustdoc-js-std/basic.js b/tests/rustdoc-js-std/basic.js
index baff24b0af6..74467f0eef1 100644
--- a/tests/rustdoc-js-std/basic.js
+++ b/tests/rustdoc-js-std/basic.js
@@ -9,6 +9,6 @@ const EXPECTED = {
         { 'path': 'std::str', 'name': 'eq' },
     ],
     'returned': [
-        { 'path': 'std::string::String', 'name': 'add' },
+        { 'path': 'std::string::String', 'name': 'new' },
     ],
 };
diff --git a/tests/rustdoc-js-std/parser-bindings.js b/tests/rustdoc-js-std/parser-bindings.js
index bd379f139ff..e00e3088303 100644
--- a/tests/rustdoc-js-std/parser-bindings.js
+++ b/tests/rustdoc-js-std/parser-bindings.js
@@ -20,12 +20,12 @@ const PARSED = [
                                 pathLast: "c",
                                 normalizedPathLast: "c",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ]
                     ],
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -51,11 +51,11 @@ const PARSED = [
                             pathWithoutLast: [],
                             pathLast: "c",
                             generics: [],
-                            typeFilter: -1,
+                            typeFilter: null,
                         }]
                     ],
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -81,11 +81,11 @@ const PARSED = [
                             pathWithoutLast: [],
                             pathLast: "never",
                             generics: [],
-                            typeFilter: 1,
+                            typeFilter: "primitive",
                         }]
                     ],
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -111,11 +111,11 @@ const PARSED = [
                             pathWithoutLast: [],
                             pathLast: "[]",
                             generics: [],
-                            typeFilter: 1,
+                            typeFilter: "primitive",
                         }]
                     ],
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -147,14 +147,14 @@ const PARSED = [
                                     pathWithoutLast: [],
                                     pathLast: "never",
                                     generics: [],
-                                    typeFilter: 1,
+                                    typeFilter: "primitive",
                                 },
                             ],
-                            typeFilter: 1,
+                            typeFilter: "primitive",
                         }]
                     ],
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -213,7 +213,7 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "c",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                             {
                                 name: "X",
@@ -221,12 +221,12 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "x",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
                     ],
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index 8bffef61c8f..49150cbd570 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -406,10 +406,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "x",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "y",
@@ -417,7 +417,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "y",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -440,7 +440,7 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "x",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                     {
                         name: "y",
@@ -448,10 +448,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "y",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -468,7 +468,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "p",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "x",
@@ -476,7 +476,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "x",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "y",
@@ -484,7 +484,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "y",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 3,
diff --git a/tests/rustdoc-js-std/parser-filter.js b/tests/rustdoc-js-std/parser-filter.js
index cda950461f7..569ef9aa96c 100644
--- a/tests/rustdoc-js-std/parser-filter.js
+++ b/tests/rustdoc-js-std/parser-filter.js
@@ -7,7 +7,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "foo",
             generics: [],
-            typeFilter: 7,
+            typeFilter: "fn",
         }],
         foundElems: 1,
         userQuery: "fn:foo",
@@ -22,7 +22,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "foo",
             generics: [],
-            typeFilter: 6,
+            typeFilter: "enum",
         }],
         foundElems: 1,
         userQuery: "enum : foo",
@@ -45,7 +45,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "macro",
             generics: [],
-            typeFilter: 16,
+            typeFilter: "macro",
         }],
         foundElems: 1,
         userQuery: "macro!",
@@ -60,7 +60,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "mac",
             generics: [],
-            typeFilter: 16,
+            typeFilter: "macro",
         }],
         foundElems: 1,
         userQuery: "macro:mac!",
@@ -75,7 +75,7 @@ const PARSED = [
             pathWithoutLast: ["a"],
             pathLast: "mac",
             generics: [],
-            typeFilter: 16,
+            typeFilter: "macro",
         }],
         foundElems: 1,
         userQuery: "a::mac!",
@@ -93,7 +93,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "foo",
             generics: [],
-            typeFilter: 7,
+            typeFilter: "fn",
         }],
         error: null,
     },
@@ -114,10 +114,10 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "bar",
                     generics: [],
-                    typeFilter: 7,
+                    typeFilter: "fn",
                 }
             ],
-            typeFilter: 7,
+            typeFilter: "fn",
         }],
         error: null,
     },
@@ -138,7 +138,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "bar",
                     generics: [],
-                    typeFilter: 7,
+                    typeFilter: "fn",
                 },
                 {
                     name: "baz::fuzz",
@@ -146,10 +146,10 @@ const PARSED = [
                     pathWithoutLast: ["baz"],
                     pathLast: "fuzz",
                     generics: [],
-                    typeFilter: 6,
+                    typeFilter: "enum",
                 },
             ],
-            typeFilter: 7,
+            typeFilter: "fn",
         }],
         error: null,
     },
diff --git a/tests/rustdoc-js-std/parser-generics.js b/tests/rustdoc-js-std/parser-generics.js
index 8b8d95bcb88..deaa0adbc63 100644
--- a/tests/rustdoc-js-std/parser-generics.js
+++ b/tests/rustdoc-js-std/parser-generics.js
@@ -16,7 +16,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "p",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "u8",
@@ -24,7 +24,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -49,7 +49,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -82,7 +82,7 @@ const PARSED = [
                         ],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -122,7 +122,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -162,7 +162,7 @@ const PARSED = [
                         ],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
diff --git a/tests/rustdoc-js-std/parser-hof.js b/tests/rustdoc-js-std/parser-hof.js
index ca761015412..5de232a66cd 100644
--- a/tests/rustdoc-js-std/parser-hof.js
+++ b/tests/rustdoc-js-std/parser-hof.js
@@ -25,11 +25,11 @@ const PARSED = [
                                 generics: [],
                             },
                         ],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(-> F<P>)",
@@ -53,11 +53,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "p",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(-> P)",
@@ -81,11 +81,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "a",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(->,a)",
@@ -113,7 +113,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             }],
             bindings: [
                 [
@@ -121,7 +121,7 @@ const PARSED = [
                     [],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(F<P> ->)",
@@ -141,7 +141,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "p",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             }],
             bindings: [
                 [
@@ -149,7 +149,7 @@ const PARSED = [
                     [],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(P ->)",
@@ -169,7 +169,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "a",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             }],
             bindings: [
                 [
@@ -177,7 +177,7 @@ const PARSED = [
                     [],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(,a->)",
@@ -197,7 +197,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "aaaaa",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             }],
             bindings: [
                 [
@@ -208,11 +208,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "a",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(aaaaa->a)",
@@ -233,7 +233,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "aaaaa",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
                 {
                     name: "b",
@@ -241,7 +241,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "b",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
             ],
             bindings: [
@@ -253,11 +253,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "a",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(aaaaa, b -> a)",
@@ -278,7 +278,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "aaaaa",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
                 {
                     name: "b",
@@ -286,7 +286,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "b",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
             ],
             bindings: [
@@ -298,11 +298,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "a",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "primitive:(aaaaa, b -> a)",
@@ -318,7 +318,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "x",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "->",
@@ -332,7 +332,7 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "aaaaa",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                     {
                         name: "b",
@@ -340,7 +340,7 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "b",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
                 bindings: [
@@ -352,11 +352,11 @@ const PARSED = [
                             pathWithoutLast: [],
                             pathLast: "a",
                             generics: [],
-                            typeFilter: -1,
+                            typeFilter: null,
                         }],
                     ],
                 ],
-                typeFilter: 10,
+                typeFilter: "trait",
             }
         ],
         foundElems: 2,
@@ -390,11 +390,11 @@ const PARSED = [
                                 generics: [],
                             },
                         ],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "Fn () -> F<P>",
@@ -418,11 +418,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "p",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "FnMut() -> P",
@@ -446,11 +446,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "p",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "(FnMut() -> P)",
@@ -478,7 +478,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             }],
             bindings: [
                 [
@@ -486,7 +486,7 @@ const PARSED = [
                     [],
                 ],
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "Fn(F<P>)",
@@ -507,7 +507,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "aaaaa",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
                 {
                     name: "b",
@@ -515,7 +515,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "b",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
             ],
             bindings: [
@@ -527,11 +527,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "a",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     }],
                 ],
             ],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "primitive:fnonce(aaaaa, b) -> a",
@@ -552,7 +552,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "aaaaa",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 },
                 {
                     name: "b",
@@ -560,7 +560,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "b",
                     generics: [],
-                    typeFilter: 0,
+                    typeFilter: "keyword",
                 },
             ],
             bindings: [
@@ -572,11 +572,11 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "a",
                         generics: [],
-                        typeFilter: 10,
+                        typeFilter: "trait",
                     }],
                 ],
             ],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "primitive:fnonce(aaaaa, keyword:b) -> trait:a",
@@ -592,7 +592,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "x",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "fn",
@@ -612,7 +612,7 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "aaaaa",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                             {
                                 name: "b",
@@ -620,7 +620,7 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "b",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
                         bindings: [
@@ -632,11 +632,11 @@ const PARSED = [
                                     pathWithoutLast: [],
                                     pathLast: "a",
                                     generics: [],
-                                    typeFilter: -1,
+                                    typeFilter: null,
                                 }],
                             ],
                         ],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
                 bindings: [
@@ -645,7 +645,7 @@ const PARSED = [
                         [],
                     ]
                 ],
-                typeFilter: 10,
+                typeFilter: "trait",
             }
         ],
         foundElems: 2,
@@ -662,7 +662,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "a",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "b",
@@ -675,7 +675,7 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "c",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 }],
                 bindings: [
                     [
@@ -683,7 +683,7 @@ const PARSED = [
                         [],
                     ]
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             }
         ],
         foundElems: 2,
diff --git a/tests/rustdoc-js-std/parser-ident.js b/tests/rustdoc-js-std/parser-ident.js
index f65391b1571..5366ac847b0 100644
--- a/tests/rustdoc-js-std/parser-ident.js
+++ b/tests/rustdoc-js-std/parser-ident.js
@@ -13,10 +13,10 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "never",
                     generics: [],
-                    typeFilter: 1,
+                    typeFilter: "primitive",
                 },
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "R<!>",
@@ -31,7 +31,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "never",
             generics: [],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "!",
@@ -46,7 +46,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "a",
             generics: [],
-            typeFilter: 16,
+            typeFilter: "macro",
         }],
         foundElems: 1,
         userQuery: "a!",
@@ -77,7 +77,7 @@ const PARSED = [
             pathWithoutLast: ["never"],
             pathLast: "b",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "!::b",
@@ -122,10 +122,10 @@ const PARSED = [
                     pathWithoutLast: [],
                     pathLast: "t",
                     generics: [],
-                    typeFilter: -1,
+                    typeFilter: null,
                 }
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "!::b<T>",
diff --git a/tests/rustdoc-js-std/parser-literal.js b/tests/rustdoc-js-std/parser-literal.js
index 63e07a246a1..803929b74fd 100644
--- a/tests/rustdoc-js-std/parser-literal.js
+++ b/tests/rustdoc-js-std/parser-literal.js
@@ -15,7 +15,7 @@ const PARSED = [
                     generics: [],
                 },
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "R<P>",
diff --git a/tests/rustdoc-js-std/parser-paths.js b/tests/rustdoc-js-std/parser-paths.js
index bb34e22e518..3ddd6572277 100644
--- a/tests/rustdoc-js-std/parser-paths.js
+++ b/tests/rustdoc-js-std/parser-paths.js
@@ -7,7 +7,7 @@ const PARSED = [
             pathWithoutLast: ["a"],
             pathLast: "b",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "A::B",
@@ -22,7 +22,7 @@ const PARSED = [
             pathWithoutLast: ["a"],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: 'a:: a',
@@ -37,7 +37,7 @@ const PARSED = [
             pathWithoutLast: ["a"],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: 'a ::a',
@@ -52,7 +52,7 @@ const PARSED = [
             pathWithoutLast: ["a"],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: 'a  ::  a',
@@ -68,7 +68,7 @@ const PARSED = [
                 pathWithoutLast: ["a"],
                 pathLast: "b",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "C",
@@ -76,7 +76,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "c",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -101,7 +101,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: "C",
@@ -109,7 +109,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "c",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -125,7 +125,7 @@ const PARSED = [
             pathWithoutLast: ["mod"],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "mod::a",
diff --git a/tests/rustdoc-js-std/parser-quote.js b/tests/rustdoc-js-std/parser-quote.js
index b485047e385..d5a9863367f 100644
--- a/tests/rustdoc-js-std/parser-quote.js
+++ b/tests/rustdoc-js-std/parser-quote.js
@@ -10,7 +10,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "p",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         error: null,
     },
@@ -22,7 +22,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "p",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: '"p",',
diff --git a/tests/rustdoc-js-std/parser-reference.js b/tests/rustdoc-js-std/parser-reference.js
index 0fa07ae9895..b17dad5fb1f 100644
--- a/tests/rustdoc-js-std/parser-reference.js
+++ b/tests/rustdoc-js-std/parser-reference.js
@@ -42,16 +42,16 @@ const PARSED = [
                                         pathWithoutLast: [],
                                         pathLast: "d",
                                         generics: [],
-                                        typeFilter: -1,
+                                        typeFilter: null,
                                     },
                                 ],
-                                typeFilter: 1,
+                                typeFilter: "primitive",
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
             {
                 name: "[]",
@@ -59,7 +59,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "[]",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 2,
@@ -100,19 +100,19 @@ const PARSED = [
                                                 pathWithoutLast: [],
                                                 pathLast: "d",
                                                 generics: [],
-                                                typeFilter: -1,
+                                                typeFilter: null,
                                             },
                                         ],
-                                        typeFilter: 1,
+                                        typeFilter: "primitive",
                                     },
                                 ],
-                                typeFilter: 1,
+                                typeFilter: "primitive",
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -129,7 +129,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "reference",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -152,10 +152,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "mut",
                         generics: [],
-                        typeFilter: 0,
+                        typeFilter: "keyword",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -172,7 +172,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "reference",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
             {
                 name: "u8",
@@ -180,7 +180,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -203,10 +203,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "mut",
                         generics: [],
-                        typeFilter: 0,
+                        typeFilter: "keyword",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
             {
                 name: "u8",
@@ -214,7 +214,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -237,10 +237,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -269,13 +269,13 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "u8",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -304,13 +304,13 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "u8",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -339,10 +339,10 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "u8",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                     {
                         name: "u8",
@@ -350,10 +350,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -382,13 +382,13 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "u8",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -417,7 +417,7 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "mut",
                                 generics: [],
-                                typeFilter: 0,
+                                typeFilter: "keyword",
                             },
                             {
                                 name: "u8",
@@ -425,10 +425,10 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "u8",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                     {
                         name: "u8",
@@ -436,10 +436,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -462,10 +462,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -496,10 +496,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: 16,
+                        typeFilter: "macro",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
diff --git a/tests/rustdoc-js-std/parser-returned.js b/tests/rustdoc-js-std/parser-returned.js
index 30ce26a8920..67aabdacb04 100644
--- a/tests/rustdoc-js-std/parser-returned.js
+++ b/tests/rustdoc-js-std/parser-returned.js
@@ -18,7 +18,7 @@ const PARSED = [
                     generics: [],
                 },
             ],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         error: null,
     },
@@ -33,7 +33,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "p",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         error: null,
     },
@@ -48,7 +48,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         error: null,
     },
@@ -60,7 +60,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "aaaaa",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 2,
         userQuery: "aaaaa->a",
@@ -70,7 +70,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         error: null,
     },
@@ -85,7 +85,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "never",
             generics: [],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         error: null,
     },
@@ -97,7 +97,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "a",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "a->",
@@ -113,7 +113,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "never",
             generics: [],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "!->",
@@ -129,7 +129,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "never",
             generics: [],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "! ->",
@@ -145,7 +145,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "never",
             generics: [],
-            typeFilter: 1,
+            typeFilter: "primitive",
         }],
         foundElems: 1,
         userQuery: "primitive:!->",
diff --git a/tests/rustdoc-js-std/parser-separators.js b/tests/rustdoc-js-std/parser-separators.js
index cf271c80cdc..2f41211d783 100644
--- a/tests/rustdoc-js-std/parser-separators.js
+++ b/tests/rustdoc-js-std/parser-separators.js
@@ -10,7 +10,7 @@ const PARSED = [
                 pathWithoutLast: ['aaaaaa'],
                 pathLast: 'b',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -27,7 +27,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: 'aaaaaa',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: 'b',
@@ -35,7 +35,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: 'b',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -52,7 +52,7 @@ const PARSED = [
                 pathWithoutLast: ['a'],
                 pathLast: 'b',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -69,7 +69,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: 'a',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
             {
                 name: 'b',
@@ -77,7 +77,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: 'b',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -94,7 +94,7 @@ const PARSED = [
                 pathWithoutLast: ['a'],
                 pathLast: 'b',
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -119,7 +119,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -151,7 +151,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -176,7 +176,7 @@ const PARSED = [
                         generics: [],
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
diff --git a/tests/rustdoc-js-std/parser-slice-array.js b/tests/rustdoc-js-std/parser-slice-array.js
index 65797945535..c587eb9001f 100644
--- a/tests/rustdoc-js-std/parser-slice-array.js
+++ b/tests/rustdoc-js-std/parser-slice-array.js
@@ -34,7 +34,7 @@ const PARSED = [
                                         pathWithoutLast: [],
                                         pathLast: "d",
                                         generics: [],
-                                        typeFilter: -1,
+                                        typeFilter: null,
                                     },
                                     {
                                         name: "[]",
@@ -42,16 +42,16 @@ const PARSED = [
                                         pathWithoutLast: [],
                                         pathLast: "[]",
                                         generics: [],
-                                        typeFilter: 1,
+                                        typeFilter: "primitive",
                                     },
                                 ],
-                                typeFilter: 1,
+                                typeFilter: "primitive",
                             },
                         ],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -68,7 +68,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "[]",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
             {
                 name: "u8",
@@ -76,7 +76,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -99,10 +99,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -125,7 +125,7 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                     {
                         name: "u8",
@@ -133,10 +133,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -165,13 +165,13 @@ const PARSED = [
                                 pathWithoutLast: [],
                                 pathLast: "u8",
                                 generics: [],
-                                typeFilter: -1,
+                                typeFilter: null,
                             },
                         ],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -188,7 +188,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "[]",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -283,10 +283,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
diff --git a/tests/rustdoc-js-std/parser-tuple.js b/tests/rustdoc-js-std/parser-tuple.js
index 61925068387..dfe9fdc98e3 100644
--- a/tests/rustdoc-js-std/parser-tuple.js
+++ b/tests/rustdoc-js-std/parser-tuple.js
@@ -22,7 +22,7 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "d",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                     {
                         name: "()",
@@ -30,10 +30,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "()",
                         generics: [],
-                        typeFilter: 1,
+                        typeFilter: "primitive",
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             }
         ],
         foundElems: 1,
@@ -50,7 +50,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "()",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
             {
                 name: "u8",
@@ -58,7 +58,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 2,
@@ -81,7 +81,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -104,10 +104,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -130,10 +130,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -156,10 +156,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -176,7 +176,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "u8",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -199,7 +199,7 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                     {
                         name: "u8",
@@ -207,10 +207,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
@@ -233,10 +233,10 @@ const PARSED = [
                         pathWithoutLast: [],
                         pathLast: "u8",
                         generics: [],
-                        typeFilter: -1,
+                        typeFilter: null,
                     },
                 ],
-                typeFilter: -1,
+                typeFilter: null,
             },
         ],
         foundElems: 1,
@@ -253,7 +253,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "()",
                 generics: [],
-                typeFilter: 1,
+                typeFilter: "primitive",
             },
         ],
         foundElems: 1,
diff --git a/tests/rustdoc-js-std/path-end-empty.js b/tests/rustdoc-js-std/path-end-empty.js
index 6e853c61b4d..17b8cac8a66 100644
--- a/tests/rustdoc-js-std/path-end-empty.js
+++ b/tests/rustdoc-js-std/path-end-empty.js
@@ -1,6 +1,7 @@
+const FILTER_CRATE = "std";
 const EXPECTED = {
     'query': 'Option::',
     'others': [
-        { 'path': 'std::option::Option', 'name': 'get_or_insert_default' },
+        { 'path': 'std::option::Option', 'name': 'eq' },
     ],
 }
diff --git a/tests/rustdoc-js-std/path-maxeditdistance.js b/tests/rustdoc-js-std/path-maxeditdistance.js
index 6989e7d6488..b22a506eee5 100644
--- a/tests/rustdoc-js-std/path-maxeditdistance.js
+++ b/tests/rustdoc-js-std/path-maxeditdistance.js
@@ -10,15 +10,15 @@ const EXPECTED = [
         query: 'vec::iter',
         others: [
             // std::net::ToSocketAttrs::iter should not show up here
-            { 'path': 'std::vec', 'name': 'IntoIter' },
+            { 'path': 'std::collections::VecDeque', 'name': 'iter' },
+            { 'path': 'std::collections::VecDeque', 'name': 'iter_mut' },
             { 'path': 'std::vec::Vec', 'name': 'from_iter' },
+            { 'path': 'std::vec', 'name': 'IntoIter' },
             { 'path': 'std::vec::Vec', 'name': 'into_iter' },
             { 'path': 'std::vec::ExtractIf', 'name': 'into_iter' },
             { 'path': 'std::vec::Drain', 'name': 'into_iter' },
             { 'path': 'std::vec::IntoIter', 'name': 'into_iter' },
             { 'path': 'std::vec::Splice', 'name': 'into_iter' },
-            { 'path': 'std::collections::VecDeque', 'name': 'iter' },
-            { 'path': 'std::collections::VecDeque', 'name': 'iter_mut' },
             { 'path': 'std::collections::VecDeque', 'name': 'from_iter' },
             { 'path': 'std::collections::VecDeque', 'name': 'into_iter' },
         ],
diff --git a/tests/rustdoc-js-std/return-specific-literal.js b/tests/rustdoc-js-std/return-specific-literal.js
index 86ed3aceb4e..1efdb776ad7 100644
--- a/tests/rustdoc-js-std/return-specific-literal.js
+++ b/tests/rustdoc-js-std/return-specific-literal.js
@@ -4,6 +4,6 @@ const EXPECTED = {
         { 'path': 'std::string::String', 'name': 'ne' },
     ],
     'returned': [
-        { 'path': 'std::string::String', 'name': 'add' },
+        { 'path': 'std::string::String', 'name': 'new' },
     ],
 };
diff --git a/tests/rustdoc-js-std/return-specific.js b/tests/rustdoc-js-std/return-specific.js
index be54a1c9772..abf243bf6ab 100644
--- a/tests/rustdoc-js-std/return-specific.js
+++ b/tests/rustdoc-js-std/return-specific.js
@@ -4,6 +4,6 @@ const EXPECTED = {
         { 'path': 'std::string::String', 'name': 'ne' },
     ],
     'returned': [
-        { 'path': 'std::string::String', 'name': 'add' },
+        { 'path': 'std::string::String', 'name': 'new' },
     ],
 };
diff --git a/tests/rustdoc-js/doc-alias.js b/tests/rustdoc-js/doc-alias.js
index e57bd71419d..74f1665f74a 100644
--- a/tests/rustdoc-js/doc-alias.js
+++ b/tests/rustdoc-js/doc-alias.js
@@ -232,6 +232,12 @@ const EXPECTED = [
         'query': 'UnionItem',
         'others': [
             {
+                'path': 'doc_alias::Union',
+                'name': 'union_item',
+                'desc': 'Doc for <code>Union::union_item</code>',
+                'href': '../doc_alias/union.Union.html#structfield.union_item'
+            },
+            {
                 'path': 'doc_alias',
                 'name': 'Union',
                 'desc': 'Doc for <code>Union</code>',
@@ -239,13 +245,6 @@ const EXPECTED = [
                 'href': '../doc_alias/union.Union.html',
                 'is_alias': true
             },
-            // Not an alias!
-            {
-                'path': 'doc_alias::Union',
-                'name': 'union_item',
-                'desc': 'Doc for <code>Union::union_item</code>',
-                'href': '../doc_alias/union.Union.html#structfield.union_item'
-            },
         ],
     },
     {
diff --git a/tests/rustdoc-js/generics-trait.js b/tests/rustdoc-js/generics-trait.js
index 8da9c67050e..cd100463e9a 100644
--- a/tests/rustdoc-js/generics-trait.js
+++ b/tests/rustdoc-js/generics-trait.js
@@ -25,8 +25,25 @@ const EXPECTED = [
     },
     {
         'query': 'Resulx<SomeTrait>',
-        'in_args': [],
-        'returned': [],
+        'correction': 'Result',
+        'in_args': [
+            {
+                'path': 'generics_trait',
+                'name': 'beta',
+                'displayType': '`Result`<`T`, ()> -> ()',
+                'displayMappedNames': '',
+                'displayWhereClause': 'T: `SomeTrait`',
+            },
+        ],
+        'returned': [
+            {
+                'path': 'generics_trait',
+                'name': 'bet',
+                'displayType': ' -> `Result`<`T`, ()>',
+                'displayMappedNames': '',
+                'displayWhereClause': 'T: `SomeTrait`',
+            },
+        ],
     },
     {
         'query': 'Result<SomeTraiz>',
diff --git a/tests/rustdoc-js/non-english-identifier.js b/tests/rustdoc-js/non-english-identifier.js
index 3d50bd3ee90..0f9ffe7c038 100644
--- a/tests/rustdoc-js/non-english-identifier.js
+++ b/tests/rustdoc-js/non-english-identifier.js
@@ -7,7 +7,7 @@ const PARSED = [
             pathWithoutLast: [],
             pathLast: "中文",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         returned: [],
         foundElems: 1,
@@ -23,7 +23,7 @@ const PARSED = [
             pathLast: "_0mixed中英文",
             normalizedPathLast: "0mixed中英文",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "_0Mixed中英文",
@@ -38,7 +38,7 @@ const PARSED = [
             pathWithoutLast: ["my_crate"],
             pathLast: "中文api",
             generics: [],
-            typeFilter: -1,
+            typeFilter: null,
         }],
         foundElems: 1,
         userQuery: "my_crate::中文API",
@@ -94,7 +94,7 @@ const PARSED = [
             pathWithoutLast: ["my_crate"],
             pathLast: "中文宏",
             generics: [],
-            typeFilter: 16,
+            typeFilter: "macro",
         }],
         foundElems: 1,
         userQuery: "my_crate 中文宏!",
diff --git a/tests/rustdoc-js/ordering.js b/tests/rustdoc-js/ordering.js
new file mode 100644
index 00000000000..a7c10900da6
--- /dev/null
+++ b/tests/rustdoc-js/ordering.js
@@ -0,0 +1,9 @@
+const EXPECTED = [
+    {
+        'query': 'Entry',
+        'others': [
+            { 'path': 'ordering', 'name': 'Entry1a' },
+            { 'path': 'ordering', 'name': 'Entry2ab' },
+        ],
+    },
+];
diff --git a/tests/rustdoc-js/ordering.rs b/tests/rustdoc-js/ordering.rs
new file mode 100644
index 00000000000..18ca06ab5ec
--- /dev/null
+++ b/tests/rustdoc-js/ordering.rs
@@ -0,0 +1,3 @@
+pub struct Entry1a;
+pub struct Entry1b;
+pub struct Entry2ab;
diff --git a/tests/rustdoc-js/type-parameters.js b/tests/rustdoc-js/type-parameters.js
index fa2b8d2ebfd..b1f1ee951c6 100644
--- a/tests/rustdoc-js/type-parameters.js
+++ b/tests/rustdoc-js/type-parameters.js
@@ -4,8 +4,8 @@ const EXPECTED = [
     {
         query: '-> trait:Some',
         others: [
-            { path: 'foo', name: 'alpha' },
             { path: 'foo', name: 'alef' },
+            { path: 'foo', name: 'alpha' },
         ],
     },
     {
@@ -75,10 +75,8 @@ const EXPECTED = [
     {
         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' },
+            { path: 'foo', name: 'other' },
         ],
     },
     {
diff --git a/tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs b/tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs
index 85c460ace64..088ab242d27 100644
--- a/tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs
+++ b/tests/rustdoc/cross-crate-info/cargo-transitive-no-index/s.rs
@@ -5,9 +5,9 @@
 //@ has t/trait.Tango.html
 //@ hasraw s/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // We document multiple crates into the same output directory, which
 // merges the cross-crate information. Everything is available.
diff --git a/tests/rustdoc/cross-crate-info/cargo-transitive/s.rs b/tests/rustdoc/cross-crate-info/cargo-transitive/s.rs
index 68bfc34883b..fb6eef0bf69 100644
--- a/tests/rustdoc/cross-crate-info/cargo-transitive/s.rs
+++ b/tests/rustdoc/cross-crate-info/cargo-transitive/s.rs
@@ -13,9 +13,9 @@
 //@ has t/trait.Tango.html
 //@ hasraw s/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // We document multiple crates into the same output directory, which
 // merges the cross-crate information. Everything is available.
diff --git a/tests/rustdoc/cross-crate-info/cargo-two-no-index/e.rs b/tests/rustdoc/cross-crate-info/cargo-two-no-index/e.rs
index c93298f969e..53375670552 100644
--- a/tests/rustdoc/cross-crate-info/cargo-two-no-index/e.rs
+++ b/tests/rustdoc/cross-crate-info/cargo-two-no-index/e.rs
@@ -4,8 +4,8 @@
 //@ has f/trait.Foxtrot.html
 //@ hasraw e/enum.Echo.html 'Foxtrot'
 //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
-//@ hasraw search-index.js 'Foxtrot'
-//@ hasraw search-index.js 'Echo'
+//@ hasraw search.index/name/*.js 'Foxtrot'
+//@ hasraw search.index/name/*.js 'Echo'
 
 // document two crates in the same way that cargo does. do not provide
 // --enable-index-page
diff --git a/tests/rustdoc/cross-crate-info/cargo-two/e.rs b/tests/rustdoc/cross-crate-info/cargo-two/e.rs
index 00f86cbc348..936e75c97af 100644
--- a/tests/rustdoc/cross-crate-info/cargo-two/e.rs
+++ b/tests/rustdoc/cross-crate-info/cargo-two/e.rs
@@ -11,8 +11,8 @@
 //@ has f/trait.Foxtrot.html
 //@ hasraw e/enum.Echo.html 'Foxtrot'
 //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
-//@ hasraw search-index.js 'Foxtrot'
-//@ hasraw search-index.js 'Echo'
+//@ hasraw search.index/name/*.js 'Foxtrot'
+//@ hasraw search.index/name/*.js 'Echo'
 
 // document two crates in the same way that cargo does, writing them both
 // into the same output directory
diff --git a/tests/rustdoc/cross-crate-info/index-on-last/e.rs b/tests/rustdoc/cross-crate-info/index-on-last/e.rs
index ffee898cd96..dbaeaf5b725 100644
--- a/tests/rustdoc/cross-crate-info/index-on-last/e.rs
+++ b/tests/rustdoc/cross-crate-info/index-on-last/e.rs
@@ -11,8 +11,8 @@
 //@ has f/trait.Foxtrot.html
 //@ hasraw e/enum.Echo.html 'Foxtrot'
 //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
-//@ hasraw search-index.js 'Foxtrot'
-//@ hasraw search-index.js 'Echo'
+//@ hasraw search.index/name/*.js 'Foxtrot'
+//@ hasraw search.index/name/*.js 'Echo'
 
 // only declare --enable-index-page to the last rustdoc invocation
 extern crate f;
diff --git a/tests/rustdoc/cross-crate-info/kitchen-sink/i.rs b/tests/rustdoc/cross-crate-info/kitchen-sink/i.rs
index bcb9464795a..979d77d8c42 100644
--- a/tests/rustdoc/cross-crate-info/kitchen-sink/i.rs
+++ b/tests/rustdoc/cross-crate-info/kitchen-sink/i.rs
@@ -19,10 +19,10 @@
 //@ has t/trait.Tango.html
 //@ hasraw s/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Quebec'
-//@ hasraw search-index.js 'Romeo'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Tango'
+//@ hasraw search.index/name/*.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Romeo'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Tango'
 //@ has type.impl/s/struct.Sierra.js
 //@ hasraw type.impl/s/struct.Sierra.js 'Tango'
 //@ hasraw type.impl/s/struct.Sierra.js 'Romeo'
diff --git a/tests/rustdoc/cross-crate-info/single-crate-baseline/q.rs b/tests/rustdoc/cross-crate-info/single-crate-baseline/q.rs
index c5e3dc0a0f4..439ab23de18 100644
--- a/tests/rustdoc/cross-crate-info/single-crate-baseline/q.rs
+++ b/tests/rustdoc/cross-crate-info/single-crate-baseline/q.rs
@@ -6,7 +6,7 @@
 //@ has index.html '//h1' 'List of all crates'
 //@ has index.html '//ul[@class="all-items"]//a[@href="q/index.html"]' 'q'
 //@ has q/struct.Quebec.html
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // there's nothing cross-crate going on here
 pub struct Quebec;
diff --git a/tests/rustdoc/cross-crate-info/single-crate-no-index/q.rs b/tests/rustdoc/cross-crate-info/single-crate-no-index/q.rs
index d3e71fa0ce3..b3703658465 100644
--- a/tests/rustdoc/cross-crate-info/single-crate-no-index/q.rs
+++ b/tests/rustdoc/cross-crate-info/single-crate-no-index/q.rs
@@ -1,6 +1,6 @@
 //@ build-aux-docs
 //@ has q/struct.Quebec.html
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // there's nothing cross-crate going on here
 pub struct Quebec;
diff --git a/tests/rustdoc/cross-crate-info/write-docs-somewhere-else/e.rs b/tests/rustdoc/cross-crate-info/write-docs-somewhere-else/e.rs
index 9dcec211e17..6ded19546b8 100644
--- a/tests/rustdoc/cross-crate-info/write-docs-somewhere-else/e.rs
+++ b/tests/rustdoc/cross-crate-info/write-docs-somewhere-else/e.rs
@@ -4,8 +4,8 @@
 //@ !has f/trait.Foxtrot.html
 //@ hasraw e/enum.Echo.html 'Foxtrot'
 //@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html'
-//@ !hasraw search-index.js 'Foxtrot'
-//@ hasraw search-index.js 'Echo'
+//@ !hasraw search.index/name/*.js 'Foxtrot'
+//@ hasraw search.index/name/*.js 'Echo'
 
 // test the fact that our test runner will document this crate somewhere
 // else
diff --git a/tests/rustdoc/masked.rs b/tests/rustdoc/masked.rs
index 4f361ca881e..bc0a5f57cef 100644
--- a/tests/rustdoc/masked.rs
+++ b/tests/rustdoc/masked.rs
@@ -7,7 +7,7 @@
 #[doc(masked)]
 extern crate masked;
 
-//@ !hasraw 'search-index.js' 'masked_method'
+//@ !hasraw 'search.index/name/*.js' 'masked_method'
 
 //@ !hasraw 'foo/struct.String.html' 'MaskedTrait'
 //@ !hasraw 'foo/struct.String.html' 'MaskedBlanketTrait'
diff --git a/tests/rustdoc/merge-cross-crate-info/cargo-transitive-read-write/sierra.rs b/tests/rustdoc/merge-cross-crate-info/cargo-transitive-read-write/sierra.rs
index 665f9567ba2..26292c50d35 100644
--- a/tests/rustdoc/merge-cross-crate-info/cargo-transitive-read-write/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/cargo-transitive-read-write/sierra.rs
@@ -14,9 +14,9 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // similar to cargo-workflow-transitive, but we use --merge=read-write,
 // which is the default.
diff --git a/tests/rustdoc/merge-cross-crate-info/kitchen-sink-separate-dirs/indigo.rs b/tests/rustdoc/merge-cross-crate-info/kitchen-sink-separate-dirs/indigo.rs
index f03f6bd6026..fd6ee0cbf24 100644
--- a/tests/rustdoc/merge-cross-crate-info/kitchen-sink-separate-dirs/indigo.rs
+++ b/tests/rustdoc/merge-cross-crate-info/kitchen-sink-separate-dirs/indigo.rs
@@ -23,10 +23,10 @@
 //@ !has sierra/struct.Sierra.html
 //@ !has tango/trait.Tango.html
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Quebec'
-//@ hasraw search-index.js 'Romeo'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Tango'
+//@ hasraw search.index/name/*.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Romeo'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Tango'
 //@ has type.impl/sierra/struct.Sierra.js
 //@ hasraw type.impl/sierra/struct.Sierra.js 'Tango'
 //@ hasraw type.impl/sierra/struct.Sierra.js 'Romeo'
diff --git a/tests/rustdoc/merge-cross-crate-info/no-merge-separate/sierra.rs b/tests/rustdoc/merge-cross-crate-info/no-merge-separate/sierra.rs
index 7eac207e518..c3b8200f151 100644
--- a/tests/rustdoc/merge-cross-crate-info/no-merge-separate/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/no-merge-separate/sierra.rs
@@ -8,7 +8,7 @@
 //@ has sierra/struct.Sierra.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ !has trait.impl/tango/trait.Tango.js
-//@ !has search-index.js
+//@ !has search.index/name/*.js
 
 // we don't generate any cross-crate info if --merge=none, even if we
 // document crates separately
diff --git a/tests/rustdoc/merge-cross-crate-info/no-merge-write-anyway/sierra.rs b/tests/rustdoc/merge-cross-crate-info/no-merge-write-anyway/sierra.rs
index f3340a80c84..2e47d42daff 100644
--- a/tests/rustdoc/merge-cross-crate-info/no-merge-write-anyway/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/no-merge-write-anyway/sierra.rs
@@ -10,7 +10,7 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ !has trait.impl/tango/trait.Tango.js
-//@ !has search-index.js
+//@ !has search.index/name/*.js
 
 // we --merge=none, so --parts-out-dir doesn't do anything
 extern crate tango;
diff --git a/tests/rustdoc/merge-cross-crate-info/overwrite-but-include/sierra.rs b/tests/rustdoc/merge-cross-crate-info/overwrite-but-include/sierra.rs
index 8eb0f1d0498..337dc558f35 100644
--- a/tests/rustdoc/merge-cross-crate-info/overwrite-but-include/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/overwrite-but-include/sierra.rs
@@ -10,9 +10,9 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ !hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ !hasraw search.index/name/*.js 'Quebec'
 
 // we overwrite quebec and tango's cross-crate information, but we
 // include the info from tango meaning that it should appear in the out
diff --git a/tests/rustdoc/merge-cross-crate-info/overwrite-but-separate/sierra.rs b/tests/rustdoc/merge-cross-crate-info/overwrite-but-separate/sierra.rs
index 4ee036238b4..c07b30d2aa0 100644
--- a/tests/rustdoc/merge-cross-crate-info/overwrite-but-separate/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/overwrite-but-separate/sierra.rs
@@ -13,9 +13,9 @@
 //@ has index.html '//ul[@class="all-items"]//a[@href="tango/index.html"]' 'tango'
 //@ has sierra/struct.Sierra.html
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // If these were documeted into the same directory, the info would be
 // overwritten. However, since they are merged, we can still recover all
diff --git a/tests/rustdoc/merge-cross-crate-info/overwrite/sierra.rs b/tests/rustdoc/merge-cross-crate-info/overwrite/sierra.rs
index 11e61dd2744..cac978f3bb2 100644
--- a/tests/rustdoc/merge-cross-crate-info/overwrite/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/overwrite/sierra.rs
@@ -9,9 +9,9 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ !hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ !hasraw search.index/name/*.js 'Quebec'
 
 // since tango is documented with --merge=finalize, we overwrite q's
 // cross-crate information
diff --git a/tests/rustdoc/merge-cross-crate-info/single-crate-finalize/quebec.rs b/tests/rustdoc/merge-cross-crate-info/single-crate-finalize/quebec.rs
index 09bb78c06f1..2ab08c112a1 100644
--- a/tests/rustdoc/merge-cross-crate-info/single-crate-finalize/quebec.rs
+++ b/tests/rustdoc/merge-cross-crate-info/single-crate-finalize/quebec.rs
@@ -6,7 +6,7 @@
 //@ has index.html '//h1' 'List of all crates'
 //@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec'
 //@ has quebec/struct.Quebec.html
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // there is nothing to read from the output directory if we use a single
 // crate
diff --git a/tests/rustdoc/merge-cross-crate-info/single-crate-read-write/quebec.rs b/tests/rustdoc/merge-cross-crate-info/single-crate-read-write/quebec.rs
index 72475426f6e..1b9e8a3db08 100644
--- a/tests/rustdoc/merge-cross-crate-info/single-crate-read-write/quebec.rs
+++ b/tests/rustdoc/merge-cross-crate-info/single-crate-read-write/quebec.rs
@@ -6,7 +6,7 @@
 //@ has index.html '//h1' 'List of all crates'
 //@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec'
 //@ has quebec/struct.Quebec.html
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // read-write is the default and this does the same as `single-crate`
 pub struct Quebec;
diff --git a/tests/rustdoc/merge-cross-crate-info/single-crate-write-anyway/quebec.rs b/tests/rustdoc/merge-cross-crate-info/single-crate-write-anyway/quebec.rs
index b20e173a830..6b72615eb9d 100644
--- a/tests/rustdoc/merge-cross-crate-info/single-crate-write-anyway/quebec.rs
+++ b/tests/rustdoc/merge-cross-crate-info/single-crate-write-anyway/quebec.rs
@@ -6,7 +6,7 @@
 //@ has index.html '//h1' 'List of all crates'
 //@ has index.html '//ul[@class="all-items"]//a[@href="quebec/index.html"]' 'quebec'
 //@ has quebec/struct.Quebec.html
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // we can --parts-out-dir, but that doesn't do anything other than create
 // the file
diff --git a/tests/rustdoc/merge-cross-crate-info/single-merge-none-useless-write/quebec.rs b/tests/rustdoc/merge-cross-crate-info/single-merge-none-useless-write/quebec.rs
index e888a43c460..bfde21c9ed3 100644
--- a/tests/rustdoc/merge-cross-crate-info/single-merge-none-useless-write/quebec.rs
+++ b/tests/rustdoc/merge-cross-crate-info/single-merge-none-useless-write/quebec.rs
@@ -5,7 +5,7 @@
 
 //@ !has index.html
 //@ has quebec/struct.Quebec.html
-//@ !has search-index.js
+//@ !has search.index/name/*.js
 
 // --merge=none doesn't write anything, despite --parts-out-dir
 pub struct Quebec;
diff --git a/tests/rustdoc/merge-cross-crate-info/transitive-finalize/sierra.rs b/tests/rustdoc/merge-cross-crate-info/transitive-finalize/sierra.rs
index 68fc4b13fa8..b45895a40a1 100644
--- a/tests/rustdoc/merge-cross-crate-info/transitive-finalize/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/transitive-finalize/sierra.rs
@@ -12,7 +12,7 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Sierra'
 
 // write only overwrites stuff in the output directory
 extern crate tango;
diff --git a/tests/rustdoc/merge-cross-crate-info/transitive-merge-none/sierra.rs b/tests/rustdoc/merge-cross-crate-info/transitive-merge-none/sierra.rs
index b407228085e..be371376179 100644
--- a/tests/rustdoc/merge-cross-crate-info/transitive-merge-none/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/transitive-merge-none/sierra.rs
@@ -16,9 +16,9 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // We avoid writing any cross-crate information, preferring to include it
 // with --include-parts-dir.
diff --git a/tests/rustdoc/merge-cross-crate-info/transitive-merge-read-write/sierra.rs b/tests/rustdoc/merge-cross-crate-info/transitive-merge-read-write/sierra.rs
index 15e32d5941f..dc10ec3de35 100644
--- a/tests/rustdoc/merge-cross-crate-info/transitive-merge-read-write/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/transitive-merge-read-write/sierra.rs
@@ -14,9 +14,9 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ hasraw trait.impl/tango/trait.Tango.js 'struct.Sierra.html'
-//@ hasraw search-index.js 'Tango'
-//@ hasraw search-index.js 'Sierra'
-//@ hasraw search-index.js 'Quebec'
+//@ hasraw search.index/name/*.js 'Tango'
+//@ hasraw search.index/name/*.js 'Sierra'
+//@ hasraw search.index/name/*.js 'Quebec'
 
 // We can use read-write to emulate the default behavior of rustdoc, when
 // --merge is left out.
diff --git a/tests/rustdoc/merge-cross-crate-info/transitive-no-info/sierra.rs b/tests/rustdoc/merge-cross-crate-info/transitive-no-info/sierra.rs
index 3eb2cebd743..9eaa627419b 100644
--- a/tests/rustdoc/merge-cross-crate-info/transitive-no-info/sierra.rs
+++ b/tests/rustdoc/merge-cross-crate-info/transitive-no-info/sierra.rs
@@ -9,7 +9,7 @@
 //@ has tango/trait.Tango.html
 //@ hasraw sierra/struct.Sierra.html 'Tango'
 //@ !has trait.impl/tango/trait.Tango.js
-//@ !has search-index.js
+//@ !has search.index/name/*.js
 
 // --merge=none on all crates does not generate any cross-crate info
 extern crate tango;
diff --git a/tests/rustdoc/merge-cross-crate-info/two-separate-out-dir/echo.rs b/tests/rustdoc/merge-cross-crate-info/two-separate-out-dir/echo.rs
index ee2b646e43c..d79302e62cd 100644
--- a/tests/rustdoc/merge-cross-crate-info/two-separate-out-dir/echo.rs
+++ b/tests/rustdoc/merge-cross-crate-info/two-separate-out-dir/echo.rs
@@ -6,8 +6,8 @@
 //@ has echo/enum.Echo.html
 //@ hasraw echo/enum.Echo.html 'Foxtrot'
 //@ hasraw trait.impl/foxtrot/trait.Foxtrot.js 'enum.Echo.html'
-//@ hasraw search-index.js 'Foxtrot'
-//@ hasraw search-index.js 'Echo'
+//@ hasraw search.index/name/*.js 'Foxtrot'
+//@ hasraw search.index/name/*.js 'Echo'
 
 // document two crates in different places, and merge their docs after
 // they are generated
diff --git a/tests/rustdoc/no-unit-struct-field.rs b/tests/rustdoc/no-unit-struct-field.rs
index 6ac44037cea..cb74a9d19ad 100644
--- a/tests/rustdoc/no-unit-struct-field.rs
+++ b/tests/rustdoc/no-unit-struct-field.rs
@@ -1,10 +1,11 @@
 // This test ensures that the tuple struct fields are not generated in the
 // search index.
 
-//@ !hasraw search-index.js '"0"'
-//@ !hasraw search-index.js '"1"'
-//@ hasraw search-index.js '"foo_a"'
-//@ hasraw search-index.js '"bar_a"'
+// vlqhex encoding ` = 0, a = 1, e = 5
+//@ !hasraw search.index/name/*.js 'a0'
+//@ !hasraw search.index/name/*.js 'a1'
+//@ hasraw search.index/name/*.js 'efoo_a'
+//@ hasraw search.index/name/*.js 'ebar_a'
 
 pub struct Bar(pub u32, pub u8);
 pub struct Foo {
diff --git a/tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs b/tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs
index 6054d8f12f5..ea828e08d82 100644
--- a/tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs
+++ b/tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs
@@ -9,7 +9,7 @@ pub mod str {
     #![rustc_doc_primitive = "str"]
 
     impl str {
-        //@ hasraw search-index.js foo
+        //@ hasraw search.index/name/*.js foo
         #[rustc_allow_incoherent_impl]
         pub fn foo(&self) {}
     }
diff --git a/tests/rustdoc/search-index-summaries.rs b/tests/rustdoc/search-index-summaries.rs
index 55db04340a6..e680a9d57c1 100644
--- a/tests/rustdoc/search-index-summaries.rs
+++ b/tests/rustdoc/search-index-summaries.rs
@@ -1,6 +1,6 @@
 #![crate_name = "foo"]
 
-//@ hasraw 'search.desc/foo/foo-desc-0-.js' 'Foo short link.'
+//@ hasraw 'search.index/desc/*.js' 'Foo short link.'
 //@ !hasraw - 'www.example.com'
 //@ !hasraw - 'More Foo.'
 
diff --git a/tests/rustdoc/search-index.rs b/tests/rustdoc/search-index.rs
index f53862ede38..49ccacd0a5c 100644
--- a/tests/rustdoc/search-index.rs
+++ b/tests/rustdoc/search-index.rs
@@ -2,7 +2,7 @@
 
 use std::ops::Deref;
 
-//@ hasraw search-index.js Foo
+//@ hasraw search.index/name/*.js Foo
 pub use private::Foo;
 
 mod private {
@@ -20,7 +20,7 @@ mod private {
 pub struct Bar;
 
 impl Deref for Bar {
-    //@ !hasraw search-index.js Target
+    //@ !hasraw search.index/name/*.js Target
     type Target = Bar;
     fn deref(&self) -> &Bar { self }
 }
diff --git a/tests/ui/array-slice-vec/slice-mut-2.stderr b/tests/ui/array-slice-vec/slice-mut-2.stderr
index 8cc2c6e0397..228417c873d 100644
--- a/tests/ui/array-slice-vec/slice-mut-2.stderr
+++ b/tests/ui/array-slice-vec/slice-mut-2.stderr
@@ -4,10 +4,10 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
 LL |     let _ = &mut x[2..4];
    |                  ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
    |
-help: consider changing this to be a mutable reference
+help: consider changing this binding's type
    |
-LL |     let x: &[isize] = &mut [1, 2, 3, 4, 5];
-   |                        +++
+LL |     let x: &mut [isize] = &[1, 2, 3, 4, 5];
+   |             +++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs b/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs
new file mode 100644
index 00000000000..9681f66412a
--- /dev/null
+++ b/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs
@@ -0,0 +1,17 @@
+// Regression test for #145288. This is the same issue as #145151
+// which we fixed in #145194. However in that PR we accidentally created
+// a `CoroutineWitness` which referenced all generic arguments of the
+// coroutine, including upvars and the signature.
+
+//@ edition: 2024
+//@ check-pass
+
+async fn process<'a>(x: &'a u32) {
+    Box::pin(process(x)).await;
+}
+
+fn require_send(_: impl Send) {}
+
+fn main() {
+    require_send(process(&1));
+}
diff --git a/tests/ui/attributes/lint_on_root.rs b/tests/ui/attributes/lint_on_root.rs
index bafdb46883f..6cec7508560 100644
--- a/tests/ui/attributes/lint_on_root.rs
+++ b/tests/ui/attributes/lint_on_root.rs
@@ -1,7 +1,7 @@
 // NOTE: this used to panic in debug builds (by a sanity assertion)
 // and not emit any lint on release builds. See https://github.com/rust-lang/rust/issues/142891.
 #![inline = ""]
-//~^ ERROR: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` [ill_formed_attribute_input]
+//~^ ERROR: valid forms for the attribute are `#![inline(always)]`, `#![inline(never)]`, and `#![inline]` [ill_formed_attribute_input]
 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 //~| ERROR attribute cannot be used on
 
diff --git a/tests/ui/attributes/lint_on_root.stderr b/tests/ui/attributes/lint_on_root.stderr
index 9d8d1495c1b..f6eafc33d69 100644
--- a/tests/ui/attributes/lint_on_root.stderr
+++ b/tests/ui/attributes/lint_on_root.stderr
@@ -6,7 +6,7 @@ LL | #![inline = ""]
    |
    = help: `#[inline]` can only be applied to functions
 
-error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+error: valid forms for the attribute are `#![inline(always)]`, `#![inline(never)]`, and `#![inline]`
   --> $DIR/lint_on_root.rs:3:1
    |
 LL | #![inline = ""]
@@ -19,7 +19,7 @@ LL | #![inline = ""]
 error: aborting due to 2 previous errors
 
 Future incompatibility report: Future breakage diagnostic:
-error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
+error: valid forms for the attribute are `#![inline(always)]`, `#![inline(never)]`, and `#![inline]`
   --> $DIR/lint_on_root.rs:3:1
    |
 LL | #![inline = ""]
diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs
index 3293f75fba9..90ca007451e 100644
--- a/tests/ui/attributes/malformed-attrs.rs
+++ b/tests/ui/attributes/malformed-attrs.rs
@@ -12,7 +12,7 @@
 #![feature(min_generic_const_args)]
 #![feature(ffi_const, ffi_pure)]
 #![feature(coverage_attribute)]
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 #![feature(marker_trait_attr)]
 #![feature(thread_local)]
 #![feature(must_not_suspend)]
@@ -89,7 +89,7 @@
 //~^ ERROR malformed
 #[coverage]
 //~^ ERROR malformed `coverage` attribute input
-#[no_sanitize]
+#[sanitize]
 //~^ ERROR malformed
 #[ignore()]
 //~^ ERROR valid forms for the attribute are
diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr
index 9c31765149b..d1d9fef2a40 100644
--- a/tests/ui/attributes/malformed-attrs.stderr
+++ b/tests/ui/attributes/malformed-attrs.stderr
@@ -49,11 +49,23 @@ LL | #[crate_name]
    |
    = note: for more information, visit <https://doc.rust-lang.org/reference/crates-and-source-files.html#the-crate_name-attribute>
 
-error: malformed `no_sanitize` attribute input
+error: malformed `sanitize` attribute input
   --> $DIR/malformed-attrs.rs:92:1
    |
-LL | #[no_sanitize]
-   | ^^^^^^^^^^^^^^ help: must be of the form: `#[no_sanitize(address, kcfi, memory, thread)]`
+LL | #[sanitize]
+   | ^^^^^^^^^^^
+   |
+help: the following are the possible correct uses
+   |
+LL | #[sanitize(address = "on|off")]
+   |           ++++++++++++++++++++
+LL | #[sanitize(cfi = "on|off")]
+   |           ++++++++++++++++
+LL | #[sanitize(hwaddress = "on|off")]
+   |           ++++++++++++++++++++++
+LL | #[sanitize(kcfi = "on|off")]
+   |           +++++++++++++++++
+   = and 5 other candidates
 
 error: malformed `instruction_set` attribute input
   --> $DIR/malformed-attrs.rs:106:1
diff --git a/tests/ui/attributes/malformed-reprs.stderr b/tests/ui/attributes/malformed-reprs.stderr
index 43085b9c341..3a788999542 100644
--- a/tests/ui/attributes/malformed-reprs.stderr
+++ b/tests/ui/attributes/malformed-reprs.stderr
@@ -7,18 +7,14 @@ LL | #![repr]
    = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
 help: try changing it to one of the following valid forms of the attribute
    |
-LL - #![repr]
-LL + #[repr(<integer type>)]
-   |
-LL - #![repr]
-LL + #[repr(C)]
-   |
-LL - #![repr]
-LL + #[repr(Rust)]
-   |
-LL - #![repr]
-LL + #[repr(align(...))]
-   |
+LL | #![repr(<integer type>)]
+   |        ++++++++++++++++
+LL | #![repr(C)]
+   |        +++
+LL | #![repr(Rust)]
+   |        ++++++
+LL | #![repr(align(...))]
+   |        ++++++++++++
    = and 2 other candidates
 
 error[E0589]: invalid `repr(align)` attribute: not a power of two
diff --git a/tests/ui/attributes/no-sanitize.rs b/tests/ui/attributes/no-sanitize.rs
deleted file mode 100644
index ddf909be63a..00000000000
--- a/tests/ui/attributes/no-sanitize.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-#![feature(no_sanitize)]
-#![feature(stmt_expr_attributes)]
-#![deny(unused_attributes)]
-#![allow(dead_code)]
-
-fn invalid() {
-    #[no_sanitize(memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-    {
-        1
-    };
-}
-
-#[no_sanitize(memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-type InvalidTy = ();
-
-#[no_sanitize(memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-mod invalid_module {}
-
-fn main() {
-    let _ = #[no_sanitize(memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-    (|| 1);
-}
-
-#[no_sanitize(memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-struct F;
-
-#[no_sanitize(memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-impl F {
-    #[no_sanitize(memory)]
-    fn valid(&self) {}
-}
-
-#[no_sanitize(address, memory)] //~ ERROR `#[no_sanitize(memory)]` should be applied to a function
-static INVALID : i32 = 0;
-
-#[no_sanitize(memory)]
-fn valid() {}
-
-#[no_sanitize(address)]
-static VALID : i32 = 0;
-
-#[no_sanitize("address")]
-//~^ ERROR `#[no_sanitize(...)]` should be applied to a function
-//~| ERROR invalid argument for `no_sanitize`
-static VALID2 : i32 = 0;
diff --git a/tests/ui/attributes/no-sanitize.stderr b/tests/ui/attributes/no-sanitize.stderr
deleted file mode 100644
index 8d5fbb109ea..00000000000
--- a/tests/ui/attributes/no-sanitize.stderr
+++ /dev/null
@@ -1,80 +0,0 @@
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:7:19
-   |
-LL |       #[no_sanitize(memory)]
-   |                     ^^^^^^
-LL | /     {
-LL | |         1
-LL | |     };
-   | |_____- not a function
-
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:13:15
-   |
-LL | #[no_sanitize(memory)]
-   |               ^^^^^^
-LL | type InvalidTy = ();
-   | -------------------- not a function
-
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:16:15
-   |
-LL | #[no_sanitize(memory)]
-   |               ^^^^^^
-LL | mod invalid_module {}
-   | --------------------- not a function
-
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:20:27
-   |
-LL |     let _ = #[no_sanitize(memory)]
-   |                           ^^^^^^
-LL |     (|| 1);
-   |     ------ not a function
-
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:24:15
-   |
-LL | #[no_sanitize(memory)]
-   |               ^^^^^^
-LL | struct F;
-   | --------- not a function
-
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:27:15
-   |
-LL |   #[no_sanitize(memory)]
-   |                 ^^^^^^
-LL | / impl F {
-LL | |     #[no_sanitize(memory)]
-LL | |     fn valid(&self) {}
-LL | | }
-   | |_- not a function
-
-error: `#[no_sanitize(memory)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:33:24
-   |
-LL | #[no_sanitize(address, memory)]
-   |                        ^^^^^^
-LL | static INVALID : i32 = 0;
-   | ------------------------- not a function
-
-error: `#[no_sanitize(...)]` should be applied to a function
-  --> $DIR/no-sanitize.rs:42:15
-   |
-LL | #[no_sanitize("address")]
-   |               ^^^^^^^^^
-...
-LL | static VALID2 : i32 = 0;
-   | ------------------------ not a function
-
-error: invalid argument for `no_sanitize`
-  --> $DIR/no-sanitize.rs:42:15
-   |
-LL | #[no_sanitize("address")]
-   |               ^^^^^^^^^
-   |
-   = note: expected one of: `address`, `cfi`, `hwaddress`, `kcfi`, `memory`, `memtag`, `shadow-call-stack`, or `thread`
-
-error: aborting due to 9 previous errors
-
diff --git a/tests/ui/attributes/rustc_confusables.rs b/tests/ui/attributes/rustc_confusables.rs
index 91c66a75cc3..14aed092694 100644
--- a/tests/ui/attributes/rustc_confusables.rs
+++ b/tests/ui/attributes/rustc_confusables.rs
@@ -45,4 +45,5 @@ impl Bar {
 #[rustc_confusables("blah")]
 //~^ ERROR attribute cannot be used on
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 fn not_inherent_impl_method() {}
diff --git a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr
index ac0241cf9a7..0a32cccff1d 100644
--- a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr
+++ b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr
@@ -15,10 +15,10 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer
 LL |     let q = &raw mut *x;
    |             ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable
    |
-help: consider changing this to be a mutable pointer
+help: consider specifying this binding's type
    |
-LL |     let x = &mut 0 as *const i32;
-   |              +++
+LL |     let x: *mut i32 = &0 as *const i32;
+   |          ++++++++++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/borrowck/borrowck-access-permissions.stderr b/tests/ui/borrowck/borrowck-access-permissions.stderr
index ade10dbbfbd..87717a53290 100644
--- a/tests/ui/borrowck/borrowck-access-permissions.stderr
+++ b/tests/ui/borrowck/borrowck-access-permissions.stderr
@@ -43,10 +43,11 @@ error[E0596]: cannot borrow `*ptr_x` as mutable, as it is behind a `*const` poin
 LL |             let _y1 = &mut *ptr_x;
    |                       ^^^^^^^^^^^ `ptr_x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable
    |
-help: consider changing this to be a mutable pointer
+help: consider changing this binding's type
+   |
+LL -         let ptr_x: *const _ = &x;
+LL +         let ptr_x: *mut i32 = &x;
    |
-LL |         let ptr_x: *const _ = &mut x;
-   |                                +++
 
 error[E0596]: cannot borrow `*foo_ref.f` as mutable, as it is behind a `&` reference
   --> $DIR/borrowck-access-permissions.rs:59:18
diff --git a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
index 4ec4d2138db..5389226f7a7 100644
--- a/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
+++ b/tests/ui/borrowck/implementation-not-general-enough-ice-133252.stderr
@@ -22,12 +22,6 @@ LL |         force_send(async_load(&not_static));
 ...
 LL |     }
    |     - `not_static` dropped here while still borrowed
-   |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/implementation-not-general-enough-ice-133252.rs:16:18
-   |
-LL | fn force_send<T: Send>(_: T) {}
-   |                  ^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.fixed b/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.fixed
new file mode 100644
index 00000000000..6303733967b
--- /dev/null
+++ b/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.fixed
@@ -0,0 +1,21 @@
+//@ run-rustfix
+fn main() {
+    let mut map = std::collections::BTreeMap::new();
+    map.insert(0, "string".to_owned());
+
+    let string = map.get_mut(&0).unwrap();
+    string.push_str("test");
+    //~^ ERROR cannot borrow `*string` as mutable, as it is behind a `&` reference
+
+    let mut map = std::collections::HashMap::new();
+    map.insert(0, "string".to_owned());
+
+    let string = map.get_mut(&0).unwrap();
+    string.push_str("test");
+    //~^ ERROR cannot borrow `*string` as mutable, as it is behind a `&` reference
+
+    let mut vec = vec![String::new(), String::new()];
+    let string = &mut vec[0];
+    string.push_str("test");
+    //~^ ERROR cannot borrow `*string` as mutable, as it is behind a `&` reference
+}
diff --git a/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.rs b/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.rs
new file mode 100644
index 00000000000..be1a63a5e69
--- /dev/null
+++ b/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.rs
@@ -0,0 +1,21 @@
+//@ run-rustfix
+fn main() {
+    let mut map = std::collections::BTreeMap::new();
+    map.insert(0, "string".to_owned());
+
+    let string = &map[&0];
+    string.push_str("test");
+    //~^ ERROR cannot borrow `*string` as mutable, as it is behind a `&` reference
+
+    let mut map = std::collections::HashMap::new();
+    map.insert(0, "string".to_owned());
+
+    let string = &map[&0];
+    string.push_str("test");
+    //~^ ERROR cannot borrow `*string` as mutable, as it is behind a `&` reference
+
+    let mut vec = vec![String::new(), String::new()];
+    let string = &vec[0];
+    string.push_str("test");
+    //~^ ERROR cannot borrow `*string` as mutable, as it is behind a `&` reference
+}
diff --git a/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.stderr b/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.stderr
new file mode 100644
index 00000000000..44cc9aefcf1
--- /dev/null
+++ b/tests/ui/borrowck/suggestions/overloaded-index-not-mut-but-should-be-mut.stderr
@@ -0,0 +1,38 @@
+error[E0596]: cannot borrow `*string` as mutable, as it is behind a `&` reference
+  --> $DIR/overloaded-index-not-mut-but-should-be-mut.rs:7:5
+   |
+LL |     string.push_str("test");
+   |     ^^^^^^ `string` is a `&` reference, so the data it refers to cannot be borrowed as mutable
+   |
+help: consider using `get_mut`
+   |
+LL -     let string = &map[&0];
+LL +     let string = map.get_mut(&0).unwrap();
+   |
+
+error[E0596]: cannot borrow `*string` as mutable, as it is behind a `&` reference
+  --> $DIR/overloaded-index-not-mut-but-should-be-mut.rs:14:5
+   |
+LL |     string.push_str("test");
+   |     ^^^^^^ `string` is a `&` reference, so the data it refers to cannot be borrowed as mutable
+   |
+help: consider using `get_mut`
+   |
+LL -     let string = &map[&0];
+LL +     let string = map.get_mut(&0).unwrap();
+   |
+
+error[E0596]: cannot borrow `*string` as mutable, as it is behind a `&` reference
+  --> $DIR/overloaded-index-not-mut-but-should-be-mut.rs:19:5
+   |
+LL |     string.push_str("test");
+   |     ^^^^^^ `string` is a `&` reference, so the data it refers to cannot be borrowed as mutable
+   |
+help: consider changing this to be a mutable reference
+   |
+LL |     let string = &mut vec[0];
+   |                   +++
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.rs b/tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.rs
new file mode 100644
index 00000000000..06eb5b52e5f
--- /dev/null
+++ b/tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.rs
@@ -0,0 +1,16 @@
+use std::ops::Index;
+
+struct MyType;
+impl Index<usize> for MyType {
+    type Output = String;
+    fn index(&self, _idx: usize) -> &String {
+        const { &String::new() }
+    }
+}
+
+fn main() {
+    let x = MyType;
+    let y = &x[0];
+    y.push_str("");
+    //~^ ERROR cannot borrow `*y` as mutable, as it is behind a `&` reference
+}
diff --git a/tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.stderr b/tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.stderr
new file mode 100644
index 00000000000..6a46332a5d7
--- /dev/null
+++ b/tests/ui/borrowck/suggestions/overloaded-index-without-indexmut.stderr
@@ -0,0 +1,9 @@
+error[E0596]: cannot borrow `*y` as mutable, as it is behind a `&` reference
+  --> $DIR/overloaded-index-without-indexmut.rs:14:5
+   |
+LL |     y.push_str("");
+   |     ^ `y` is a `&` reference, so the data it refers to cannot be borrowed as mutable
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0596`.
diff --git a/tests/ui/consts/const-eval/heap/ptr_not_made_global.stderr b/tests/ui/consts/const-eval/heap/ptr_not_made_global.stderr
index cb2bb1e8cd8..e5b108df298 100644
--- a/tests/ui/consts/const-eval/heap/ptr_not_made_global.stderr
+++ b/tests/ui/consts/const-eval/heap/ptr_not_made_global.stderr
@@ -4,7 +4,7 @@ error: encountered `const_allocate` pointer in final value that was not made glo
 LL | const FOO: &i32 = foo();
    | ^^^^^^^^^^^^^^^
    |
-   = note: use `const_make_global` to make allocated pointers immutable before returning
+   = note: use `const_make_global` to turn allocated pointers into immutable globals before returning
 
 error: encountered `const_allocate` pointer in final value that was not made global
   --> $DIR/ptr_not_made_global.rs:12:1
@@ -12,7 +12,7 @@ error: encountered `const_allocate` pointer in final value that was not made glo
 LL | const FOO_RAW: *const i32 = foo();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: use `const_make_global` to make allocated pointers immutable before returning
+   = note: use `const_make_global` to turn allocated pointers into immutable globals before returning
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/heap/ptr_not_made_global_mut.stderr b/tests/ui/consts/const-eval/heap/ptr_not_made_global_mut.stderr
index 2445ce633d6..2d1993f96d3 100644
--- a/tests/ui/consts/const-eval/heap/ptr_not_made_global_mut.stderr
+++ b/tests/ui/consts/const-eval/heap/ptr_not_made_global_mut.stderr
@@ -4,7 +4,7 @@ error: encountered `const_allocate` pointer in final value that was not made glo
 LL | const BAR: *mut i32 = unsafe { intrinsics::const_allocate(4, 4) as *mut i32 };
    | ^^^^^^^^^^^^^^^^^^^
    |
-   = note: use `const_make_global` to make allocated pointers immutable before returning
+   = note: use `const_make_global` to turn allocated pointers into immutable globals before returning
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/consts/const-eval/partial_ptr_overwrite.rs b/tests/ui/consts/const-eval/partial_ptr_overwrite.rs
deleted file mode 100644
index bd97bec0f71..00000000000
--- a/tests/ui/consts/const-eval/partial_ptr_overwrite.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Test for the behavior described in <https://github.com/rust-lang/rust/issues/87184>.
-
-const PARTIAL_OVERWRITE: () = {
-    let mut p = &42;
-    unsafe {
-        let ptr: *mut _ = &mut p;
-        *(ptr as *mut u8) = 123; //~ ERROR unable to overwrite parts of a pointer
-    }
-    let x = *p;
-};
-
-fn main() {}
diff --git a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
deleted file mode 100644
index 6ef1cfd35c8..00000000000
--- a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0080]: unable to overwrite parts of a pointer in memory at ALLOC0
-  --> $DIR/partial_ptr_overwrite.rs:7:9
-   |
-LL |         *(ptr as *mut u8) = 123;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `PARTIAL_OVERWRITE` failed here
-   |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
-
-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/ptr_fragments.rs b/tests/ui/consts/const-eval/ptr_fragments.rs
new file mode 100644
index 00000000000..04dcbe55590
--- /dev/null
+++ b/tests/ui/consts/const-eval/ptr_fragments.rs
@@ -0,0 +1,63 @@
+//! Test that various operations involving pointer fragments work as expected.
+//@ run-pass
+
+use std::mem::{self, MaybeUninit, transmute};
+use std::ptr;
+
+type Byte = MaybeUninit<u8>;
+
+const unsafe fn memcpy(dst: *mut Byte, src: *const Byte, n: usize) {
+    let mut i = 0;
+    while i < n {
+        *dst.add(i) = *src.add(i);
+        i += 1;
+    }
+}
+
+const _MEMCPY: () = unsafe {
+    let ptr = &42;
+    let mut ptr2 = ptr::null::<i32>();
+    memcpy(&mut ptr2 as *mut _ as *mut _, &ptr as *const _ as *const _, mem::size_of::<&i32>());
+    assert!(*ptr2 == 42);
+};
+const _MEMCPY_OFFSET: () = unsafe {
+    // Same as above, but the pointer has a non-zero offset so not all the data bytes are the same.
+    let ptr = &(42, 18);
+    let ptr = &ptr.1;
+    let mut ptr2 = ptr::null::<i32>();
+    memcpy(&mut ptr2 as *mut _ as *mut _, &ptr as *const _ as *const _, mem::size_of::<&i32>());
+    assert!(*ptr2 == 18);
+};
+
+const MEMCPY_RET: MaybeUninit<*const i32> = unsafe {
+    let ptr = &42;
+    let mut ptr2 = MaybeUninit::new(ptr::null::<i32>());
+    memcpy(&mut ptr2 as *mut _ as *mut _, &ptr as *const _ as *const _, mem::size_of::<&i32>());
+    // Return in a MaybeUninit so it does not get treated as a scalar.
+    ptr2
+};
+
+#[allow(dead_code)]
+fn reassemble_ptr_fragments_in_static() {
+    static DATA: i32 = 1i32;
+
+    #[cfg(target_pointer_width = "64")]
+    struct Thing {
+        x: MaybeUninit<u32>,
+        y: MaybeUninit<u32>,
+    }
+    #[cfg(target_pointer_width = "32")]
+    struct Thing {
+        x: MaybeUninit<u16>,
+        y: MaybeUninit<u16>,
+    }
+
+    static X: Thing = unsafe {
+        let Thing { x, y } = transmute(&raw const DATA);
+        Thing { x, y }
+    };
+}
+
+fn main() {
+    assert_eq!(unsafe { MEMCPY_RET.assume_init().read() }, 42);
+}
diff --git a/tests/ui/consts/const-eval/ptr_fragments_in_final.rs b/tests/ui/consts/const-eval/ptr_fragments_in_final.rs
new file mode 100644
index 00000000000..e2f3f51b086
--- /dev/null
+++ b/tests/ui/consts/const-eval/ptr_fragments_in_final.rs
@@ -0,0 +1,25 @@
+//! Test that we properly error when there is a pointer fragment in the final value.
+
+use std::{mem::{self, MaybeUninit}, ptr};
+
+type Byte = MaybeUninit<u8>;
+
+const unsafe fn memcpy(dst: *mut Byte, src: *const Byte, n: usize) {
+    let mut i = 0;
+    while i < n {
+        dst.add(i).write(src.add(i).read());
+        i += 1;
+    }
+}
+
+const MEMCPY_RET: MaybeUninit<*const i32> = unsafe { //~ERROR: partial pointer in final value
+    let ptr = &42;
+    let mut ptr2 = MaybeUninit::new(ptr::null::<i32>());
+    memcpy(&mut ptr2 as *mut _ as *mut _, &ptr as *const _ as *const _, mem::size_of::<&i32>() / 2);
+    // Return in a MaybeUninit so it does not get treated as a scalar.
+    ptr2
+};
+
+fn main() {
+    assert_eq!(unsafe { MEMCPY_RET.assume_init().read() }, 42);
+}
diff --git a/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr b/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr
new file mode 100644
index 00000000000..628bf2566e5
--- /dev/null
+++ b/tests/ui/consts/const-eval/ptr_fragments_in_final.stderr
@@ -0,0 +1,10 @@
+error: encountered partial pointer in final value of constant
+  --> $DIR/ptr_fragments_in_final.rs:15:1
+   |
+LL | const MEMCPY_RET: MaybeUninit<*const i32> = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/consts/const-eval/read_partial_ptr.rs b/tests/ui/consts/const-eval/read_partial_ptr.rs
new file mode 100644
index 00000000000..bccef9c0bc6
--- /dev/null
+++ b/tests/ui/consts/const-eval/read_partial_ptr.rs
@@ -0,0 +1,49 @@
+//! Ensure we error when trying to load from a pointer whose provenance has been messed with.
+
+const PARTIAL_OVERWRITE: () = {
+    let mut p = &42;
+    // Overwrite one byte with a no-provenance value.
+    unsafe {
+        let ptr: *mut _ = &mut p;
+        *(ptr as *mut u8) = 123;
+    }
+    let x = *p; //~ ERROR: unable to read parts of a pointer
+};
+
+const PTR_BYTES_SWAP: () = {
+    let mut p = &42;
+    // Swap the first two bytes.
+    unsafe {
+        let ptr = &mut p as *mut _ as *mut std::mem::MaybeUninit<u8>;
+        let byte0 = ptr.read();
+        let byte1 = ptr.add(1).read();
+        ptr.write(byte1);
+        ptr.add(1).write(byte0);
+    }
+    let x = *p; //~ ERROR: unable to read parts of a pointer
+};
+
+const PTR_BYTES_REPEAT: () = {
+    let mut p = &42;
+    // Duplicate the first byte over the second.
+    unsafe {
+        let ptr = &mut p as *mut _ as *mut std::mem::MaybeUninit<u8>;
+        let byte0 = ptr.read();
+        ptr.add(1).write(byte0);
+    }
+    let x = *p; //~ ERROR: unable to read parts of a pointer
+};
+
+const PTR_BYTES_MIX: () = {
+    let mut p = &42;
+    let q = &43;
+    // Overwrite the first byte of p with the first byte of q.
+    unsafe {
+        let ptr = &mut p as *mut _ as *mut std::mem::MaybeUninit<u8>;
+        let qtr = &q as *const _ as *const std::mem::MaybeUninit<u8>;
+        ptr.write(qtr.read());
+    }
+    let x = *p; //~ ERROR: unable to read parts of a pointer
+};
+
+fn main() {}
diff --git a/tests/ui/consts/const-eval/read_partial_ptr.stderr b/tests/ui/consts/const-eval/read_partial_ptr.stderr
new file mode 100644
index 00000000000..196606c77a3
--- /dev/null
+++ b/tests/ui/consts/const-eval/read_partial_ptr.stderr
@@ -0,0 +1,39 @@
+error[E0080]: unable to read parts of a pointer from memory at ALLOC0
+  --> $DIR/read_partial_ptr.rs:10:13
+   |
+LL |     let x = *p;
+   |             ^^ evaluation of `PARTIAL_OVERWRITE` failed here
+   |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
+
+error[E0080]: unable to read parts of a pointer from memory at ALLOC1
+  --> $DIR/read_partial_ptr.rs:23:13
+   |
+LL |     let x = *p;
+   |             ^^ evaluation of `PTR_BYTES_SWAP` failed here
+   |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
+
+error[E0080]: unable to read parts of a pointer from memory at ALLOC2
+  --> $DIR/read_partial_ptr.rs:34:13
+   |
+LL |     let x = *p;
+   |             ^^ evaluation of `PTR_BYTES_REPEAT` failed here
+   |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
+
+error[E0080]: unable to read parts of a pointer from memory at ALLOC3
+  --> $DIR/read_partial_ptr.rs:46:13
+   |
+LL |     let x = *p;
+   |             ^^ evaluation of `PTR_BYTES_MIX` failed here
+   |
+   = help: this code performed an operation that depends on the underlying bytes representing a pointer
+   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs
index 4f3f9aa6ada..09a11c75fd7 100644
--- a/tests/ui/consts/missing_span_in_backtrace.rs
+++ b/tests/ui/consts/missing_span_in_backtrace.rs
@@ -1,3 +1,4 @@
+//! Check what happens when the error occurs inside a std function that we can't print the span of.
 //@ ignore-backends: gcc
 //@ compile-flags: -Z ui-testing=no
 
@@ -7,15 +8,15 @@ use std::{
 };
 
 const X: () = {
-    let mut ptr1 = &1;
-    let mut ptr2 = &2;
+    let mut x1 = 1;
+    let mut x2 = 2;
 
     // Swap them, bytewise.
     unsafe {
-        ptr::swap_nonoverlapping( //~ ERROR unable to copy parts of a pointer
-            &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
-            &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
-            mem::size_of::<&i32>(),
+        ptr::swap_nonoverlapping( //~ ERROR beyond the end of the allocation
+            &mut x1 as *mut _ as *mut MaybeUninit<u8>,
+            &mut x2 as *mut _ as *mut MaybeUninit<u8>,
+            10,
         );
     }
 };
diff --git a/tests/ui/consts/missing_span_in_backtrace.stderr b/tests/ui/consts/missing_span_in_backtrace.stderr
index 0ac1e281107..55dde635828 100644
--- a/tests/ui/consts/missing_span_in_backtrace.stderr
+++ b/tests/ui/consts/missing_span_in_backtrace.stderr
@@ -1,15 +1,13 @@
-error[E0080]: unable to copy parts of a pointer from memory at ALLOC0
-  --> $DIR/missing_span_in_backtrace.rs:15:9
+error[E0080]: memory access failed: attempting to access 1 byte, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
+  --> $DIR/missing_span_in_backtrace.rs:16:9
    |
-15 | /         ptr::swap_nonoverlapping(
-16 | |             &mut ptr1 as *mut _ as *mut MaybeUninit<u8>,
-17 | |             &mut ptr2 as *mut _ as *mut MaybeUninit<u8>,
-18 | |             mem::size_of::<&i32>(),
-19 | |         );
+16 | /         ptr::swap_nonoverlapping(
+17 | |             &mut x1 as *mut _ as *mut MaybeUninit<u8>,
+18 | |             &mut x2 as *mut _ as *mut MaybeUninit<u8>,
+19 | |             10,
+20 | |         );
    | |_________^ evaluation of `X` failed inside this call
    |
-   = help: this code performed an operation that depends on the underlying bytes representing a pointer
-   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 note: inside `swap_nonoverlapping::compiletime::<MaybeUninit<u8>>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 note: inside `std::ptr::swap_nonoverlapping_const::<MaybeUninit<u8>>`
diff --git a/tests/ui/coverage-attr/name-value.stderr b/tests/ui/coverage-attr/name-value.stderr
index 2dac2401e3c..d1527ec810c 100644
--- a/tests/ui/coverage-attr/name-value.stderr
+++ b/tests/ui/coverage-attr/name-value.stderr
@@ -22,10 +22,10 @@ LL |     #![coverage = "off"]
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #![coverage = "off"]
-LL +     #[coverage(off)]
+LL +     #![coverage(off)]
    |
 LL -     #![coverage = "off"]
-LL +     #[coverage(on)]
+LL +     #![coverage(on)]
    |
 
 error[E0539]: malformed `coverage` attribute input
diff --git a/tests/ui/coverage-attr/word-only.stderr b/tests/ui/coverage-attr/word-only.stderr
index e916a817e36..880ad080953 100644
--- a/tests/ui/coverage-attr/word-only.stderr
+++ b/tests/ui/coverage-attr/word-only.stderr
@@ -19,12 +19,10 @@ LL |     #![coverage]
    |
 help: try changing it to one of the following valid forms of the attribute
    |
-LL -     #![coverage]
-LL +     #[coverage(off)]
-   |
-LL -     #![coverage]
-LL +     #[coverage(on)]
-   |
+LL |     #![coverage(off)]
+   |                +++++
+LL |     #![coverage(on)]
+   |                ++++
 
 error[E0539]: malformed `coverage` attribute input
   --> $DIR/word-only.rs:21:1
diff --git a/tests/ui/deprecation/deprecation-sanity.rs b/tests/ui/deprecation/deprecation-sanity.rs
index 9698a376025..45ee91741e5 100644
--- a/tests/ui/deprecation/deprecation-sanity.rs
+++ b/tests/ui/deprecation/deprecation-sanity.rs
@@ -42,4 +42,9 @@ impl Default for X {
     }
 }
 
+unsafe extern "C" {
+    #[deprecated]
+    static FOO: std::ffi::c_int;
+}
+
 fn main() { }
diff --git a/tests/ui/deprecation/deprecation-sanity.stderr b/tests/ui/deprecation/deprecation-sanity.stderr
index 1d44215731d..57af76d8f24 100644
--- a/tests/ui/deprecation/deprecation-sanity.stderr
+++ b/tests/ui/deprecation/deprecation-sanity.stderr
@@ -177,7 +177,7 @@ LL | #[deprecated = "hello"]
    | ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, crates
+   = help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, foreign statics, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, crates
    = note: `#[deny(useless_deprecated)]` on by default
 
 error: aborting due to 10 previous errors
diff --git a/tests/ui/deriving/deriving-all-codegen.rs b/tests/ui/deriving/deriving-all-codegen.rs
index 00a269ccb5c..db58f12d60c 100644
--- a/tests/ui/deriving/deriving-all-codegen.rs
+++ b/tests/ui/deriving/deriving-all-codegen.rs
@@ -18,6 +18,8 @@
 #![allow(deprecated)]
 #![feature(derive_from)]
 
+use std::from::From;
+
 // Empty struct.
 #[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
 struct Empty;
@@ -51,7 +53,14 @@ struct SingleField {
 // `clone` implemention that just does `*self`.
 #[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
 struct Big {
-    b1: u32, b2: u32, b3: u32, b4: u32, b5: u32, b6: u32, b7: u32, b8: u32,
+    b1: u32,
+    b2: u32,
+    b3: u32,
+    b4: u32,
+    b5: u32,
+    b6: u32,
+    b7: u32,
+    b8: u32,
 }
 
 // It is more efficient to compare scalar types before non-scalar types.
@@ -126,7 +135,7 @@ enum Enum0 {}
 // A single-variant enum.
 #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
 enum Enum1 {
-    Single { x: u32 }
+    Single { x: u32 },
 }
 
 // A C-like, fieldless enum with a single variant.
@@ -152,7 +161,10 @@ enum Mixed {
     P,
     Q,
     R(u32),
-    S { d1: Option<u32>, d2: Option<i32> },
+    S {
+        d1: Option<u32>,
+        d2: Option<i32>,
+    },
 }
 
 // When comparing enum variant it is more efficient to compare scalar types before non-scalar types.
diff --git a/tests/ui/deriving/deriving-all-codegen.stdout b/tests/ui/deriving/deriving-all-codegen.stdout
index 78b93f39b9e..4c60b1cf427 100644
--- a/tests/ui/deriving/deriving-all-codegen.stdout
+++ b/tests/ui/deriving/deriving-all-codegen.stdout
@@ -23,6 +23,8 @@ extern crate std;
 #[prelude_import]
 use std::prelude::rust_2021::*;
 
+use std::from::From;
+
 // Empty struct.
 struct Empty;
 #[automatically_derived]
diff --git a/tests/ui/deriving/deriving-from-wrong-target.rs b/tests/ui/deriving/deriving-from-wrong-target.rs
index 57e009cae69..37c9300e28b 100644
--- a/tests/ui/deriving/deriving-from-wrong-target.rs
+++ b/tests/ui/deriving/deriving-from-wrong-target.rs
@@ -1,9 +1,10 @@
-//@ edition: 2021
 //@ check-fail
 
 #![feature(derive_from)]
 #![allow(dead_code)]
 
+use std::from::From;
+
 #[derive(From)]
 //~^ ERROR `#[derive(From)]` used on a struct with no fields
 struct S1;
diff --git a/tests/ui/deriving/deriving-from-wrong-target.stderr b/tests/ui/deriving/deriving-from-wrong-target.stderr
index 13593c95973..63eb8ec7b6e 100644
--- a/tests/ui/deriving/deriving-from-wrong-target.stderr
+++ b/tests/ui/deriving/deriving-from-wrong-target.stderr
@@ -1,5 +1,5 @@
 error: `#[derive(From)]` used on a struct with no fields
-  --> $DIR/deriving-from-wrong-target.rs:7:10
+  --> $DIR/deriving-from-wrong-target.rs:8:10
    |
 LL | #[derive(From)]
    |          ^^^^
@@ -10,7 +10,7 @@ LL | struct S1;
    = note: `#[derive(From)]` can only be used on structs with exactly one field
 
 error: `#[derive(From)]` used on a struct with no fields
-  --> $DIR/deriving-from-wrong-target.rs:11:10
+  --> $DIR/deriving-from-wrong-target.rs:12:10
    |
 LL | #[derive(From)]
    |          ^^^^
@@ -21,7 +21,7 @@ LL | struct S2 {}
    = note: `#[derive(From)]` can only be used on structs with exactly one field
 
 error: `#[derive(From)]` used on a struct with multiple fields
-  --> $DIR/deriving-from-wrong-target.rs:15:10
+  --> $DIR/deriving-from-wrong-target.rs:16:10
    |
 LL | #[derive(From)]
    |          ^^^^
@@ -32,7 +32,7 @@ LL | struct S3(u32, bool);
    = note: `#[derive(From)]` can only be used on structs with exactly one field
 
 error: `#[derive(From)]` used on a struct with multiple fields
-  --> $DIR/deriving-from-wrong-target.rs:19:10
+  --> $DIR/deriving-from-wrong-target.rs:20:10
    |
 LL | #[derive(From)]
    |          ^^^^
@@ -43,7 +43,7 @@ LL | struct S4 {
    = note: `#[derive(From)]` can only be used on structs with exactly one field
 
 error: `#[derive(From)]` used on an enum
-  --> $DIR/deriving-from-wrong-target.rs:26:10
+  --> $DIR/deriving-from-wrong-target.rs:27:10
    |
 LL | #[derive(From)]
    |          ^^^^
@@ -54,7 +54,7 @@ LL | enum E1 {}
    = note: `#[derive(From)]` can only be used on structs with exactly one field
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
-  --> $DIR/deriving-from-wrong-target.rs:30:10
+  --> $DIR/deriving-from-wrong-target.rs:31:10
    |
 LL | #[derive(From)]
    |          ^^^^ doesn't have a size known at compile-time
@@ -71,7 +71,7 @@ LL + struct SUnsizedField<T> {
    |
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
-  --> $DIR/deriving-from-wrong-target.rs:30:10
+  --> $DIR/deriving-from-wrong-target.rs:31:10
    |
 LL | #[derive(From)]
    |          ^^^^ doesn't have a size known at compile-time
@@ -80,7 +80,7 @@ LL | struct SUnsizedField<T: ?Sized> {
    |                      - this type parameter needs to be `Sized`
    |
 note: required because it appears within the type `SUnsizedField<T>`
-  --> $DIR/deriving-from-wrong-target.rs:33:8
+  --> $DIR/deriving-from-wrong-target.rs:34:8
    |
 LL | struct SUnsizedField<T: ?Sized> {
    |        ^^^^^^^^^^^^^
@@ -92,7 +92,7 @@ LL + struct SUnsizedField<T> {
    |
 
 error[E0277]: the size for values of type `T` cannot be known at compilation time
-  --> $DIR/deriving-from-wrong-target.rs:34:11
+  --> $DIR/deriving-from-wrong-target.rs:35:11
    |
 LL | struct SUnsizedField<T: ?Sized> {
    |                      - this type parameter needs to be `Sized`
diff --git a/tests/ui/deriving/deriving-from.rs b/tests/ui/deriving/deriving-from.rs
index ff4c5b4c426..75988ba974d 100644
--- a/tests/ui/deriving/deriving-from.rs
+++ b/tests/ui/deriving/deriving-from.rs
@@ -3,6 +3,8 @@
 
 #![feature(derive_from)]
 
+use core::from::From;
+
 #[derive(From)]
 struct TupleSimple(u32);
 
diff --git a/tests/ui/extern/issue-47725.rs b/tests/ui/extern/issue-47725.rs
index b0a0af930de..6b4d0dd30e0 100644
--- a/tests/ui/extern/issue-47725.rs
+++ b/tests/ui/extern/issue-47725.rs
@@ -4,12 +4,14 @@
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 struct Foo;
 
 #[link_name = "foobar"]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 extern "C" {
     fn foo() -> u32;
 }
@@ -19,6 +21,7 @@ extern "C" {
 //~| HELP must be of the form
 //~| WARN attribute cannot be used on
 //~| WARN previously accepted
+//~| HELP remove the attribute
 //~| HELP can be applied to
 //~| NOTE for more information, visit
 extern "C" {
diff --git a/tests/ui/extern/issue-47725.stderr b/tests/ui/extern/issue-47725.stderr
index 704b1d81b63..43362ea655b 100644
--- a/tests/ui/extern/issue-47725.stderr
+++ b/tests/ui/extern/issue-47725.stderr
@@ -1,5 +1,5 @@
 error[E0539]: malformed `link_name` attribute input
-  --> $DIR/issue-47725.rs:17:1
+  --> $DIR/issue-47725.rs:19:1
    |
 LL | #[link_name]
    | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
@@ -21,7 +21,7 @@ LL | #![warn(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
 warning: `#[link_name]` attribute cannot be used on foreign modules
-  --> $DIR/issue-47725.rs:9:1
+  --> $DIR/issue-47725.rs:10:1
    |
 LL | #[link_name = "foobar"]
    | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -30,7 +30,7 @@ LL | #[link_name = "foobar"]
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on foreign modules
-  --> $DIR/issue-47725.rs:17:1
+  --> $DIR/issue-47725.rs:19:1
    |
 LL | #[link_name]
    | ^^^^^^^^^^^^
diff --git a/tests/ui/feature-gates/feature-gate-derive-from.rs b/tests/ui/feature-gates/feature-gate-derive-from.rs
index 12440356ddf..0e8c5e4af37 100644
--- a/tests/ui/feature-gates/feature-gate-derive-from.rs
+++ b/tests/ui/feature-gates/feature-gate-derive-from.rs
@@ -1,4 +1,4 @@
-//@ edition: 2021
+use std::from::From; //~ ERROR use of unstable library feature `derive_from
 
 #[derive(From)] //~ ERROR use of unstable library feature `derive_from`
 struct Foo(u32);
diff --git a/tests/ui/feature-gates/feature-gate-derive-from.stderr b/tests/ui/feature-gates/feature-gate-derive-from.stderr
index d58dcdd7541..63216a4cccd 100644
--- a/tests/ui/feature-gates/feature-gate-derive-from.stderr
+++ b/tests/ui/feature-gates/feature-gate-derive-from.stderr
@@ -8,6 +8,16 @@ LL | #[derive(From)]
    = help: add `#![feature(derive_from)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error: aborting due to 1 previous error
+error[E0658]: use of unstable library feature `derive_from`
+  --> $DIR/feature-gate-derive-from.rs:1:5
+   |
+LL | use std::from::From;
+   |     ^^^^^^^^^^^^^^^
+   |
+   = note: see issue #144889 <https://github.com/rust-lang/rust/issues/144889> for more information
+   = help: add `#![feature(derive_from)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-macro-derive.rs b/tests/ui/feature-gates/feature-gate-macro-derive.rs
new file mode 100644
index 00000000000..b9d63423061
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-macro-derive.rs
@@ -0,0 +1,4 @@
+#![crate_type = "lib"]
+
+macro_rules! MyDerive { derive() {} => {} }
+//~^ ERROR `macro_rules!` derives are unstable
diff --git a/tests/ui/feature-gates/feature-gate-macro-derive.stderr b/tests/ui/feature-gates/feature-gate-macro-derive.stderr
new file mode 100644
index 00000000000..b7ca6717bd5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-macro-derive.stderr
@@ -0,0 +1,13 @@
+error[E0658]: `macro_rules!` derives are unstable
+  --> $DIR/feature-gate-macro-derive.rs:3:1
+   |
+LL | macro_rules! MyDerive { derive() {} => {} }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information
+   = help: add `#![feature(macro_attr)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-no_sanitize.rs b/tests/ui/feature-gates/feature-gate-no_sanitize.rs
deleted file mode 100644
index 5ac014f1c5b..00000000000
--- a/tests/ui/feature-gates/feature-gate-no_sanitize.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#[no_sanitize(address)]
-//~^ ERROR the `#[no_sanitize]` attribute is an experimental feature
-fn main() {
-}
diff --git a/tests/ui/feature-gates/feature-gate-no_sanitize.stderr b/tests/ui/feature-gates/feature-gate-no_sanitize.stderr
deleted file mode 100644
index a33bf6a9e40..00000000000
--- a/tests/ui/feature-gates/feature-gate-no_sanitize.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: the `#[no_sanitize]` attribute is an experimental feature
-  --> $DIR/feature-gate-no_sanitize.rs:1:1
-   |
-LL | #[no_sanitize(address)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #39699 <https://github.com/rust-lang/rust/issues/39699> for more information
-   = help: add `#![feature(no_sanitize)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-sanitize.rs b/tests/ui/feature-gates/feature-gate-sanitize.rs
new file mode 100644
index 00000000000..40098d93272
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-sanitize.rs
@@ -0,0 +1,7 @@
+//@ normalize-stderr: "you are using [0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?( \([^)]*\))?" -> "you are using $$RUSTC_VERSION"
+#![feature(no_sanitize)] //~ ERROR feature has been removed
+
+#[sanitize(address = "on")]
+//~^ ERROR the `#[sanitize]` attribute is an experimental feature
+fn main() {
+}
diff --git a/tests/ui/feature-gates/feature-gate-sanitize.stderr b/tests/ui/feature-gates/feature-gate-sanitize.stderr
new file mode 100644
index 00000000000..7c38b351916
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-sanitize.stderr
@@ -0,0 +1,23 @@
+error[E0557]: feature has been removed
+  --> $DIR/feature-gate-sanitize.rs:2:12
+   |
+LL | #![feature(no_sanitize)]
+   |            ^^^^^^^^^^^ feature has been removed
+   |
+   = note: removed in CURRENT_RUSTC_VERSION; see <https://github.com/rust-lang/rust/pull/142681> for more information
+   = note: renamed to sanitize(xyz = "on|off")
+
+error[E0658]: the `#[sanitize]` attribute is an experimental feature
+  --> $DIR/feature-gate-sanitize.rs:4:1
+   |
+LL | #[sanitize(address = "on")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #39699 <https://github.com/rust-lang/rust/issues/39699> for more information
+   = help: add `#![feature(sanitize)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0557, E0658.
+For more information about an error, try `rustc --explain E0557`.
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
index 8702d852a89..60666481bec 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs
@@ -50,9 +50,11 @@
 #![should_panic] //~ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 #![ignore] //~ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 #![no_implicit_prelude]
 #![reexport_test_harness_main = "2900"]
 // see gated-link-args.rs
@@ -61,22 +63,28 @@
 #![proc_macro_derive(Test)] //~ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 #![doc = "2400"]
 #![cold] //~ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 #![link()] //~ WARN attribute should be applied to an `extern` block
 //~^ WARN this was previously accepted
 #![link_name = "1900"]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 #![link_section = "1800"]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 #![must_use]
-//~^ WARN `#[must_use]` has no effect
+//~^ WARN attribute cannot be used on
+//~| WARN previously accepted
+//~| HELP can be applied to
 //~| HELP remove the attribute
 // see issue-43106-gating-of-stable.rs
 // see issue-43106-gating-of-unstable.rs
@@ -184,21 +192,25 @@ mod macro_use {
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[macro_use] struct S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[macro_use] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[macro_use] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 }
 
 #[macro_export]
@@ -260,57 +272,68 @@ mod path {
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[path = "3800"]  struct S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[path = "3800"] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[path = "3800"] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 }
 
 #[automatically_derived]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 mod automatically_derived {
     mod inner { #![automatically_derived] }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[automatically_derived] fn f() { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[automatically_derived] struct S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[automatically_derived] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[automatically_derived] trait W { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[automatically_derived] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[automatically_derived] impl W for S { }
 }
@@ -319,11 +342,13 @@ mod automatically_derived {
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 mod no_mangle {
     mod inner { #![no_mangle] }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[no_mangle] fn f() { }
 
@@ -331,27 +356,32 @@ mod no_mangle {
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[no_mangle] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[no_mangle] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     trait Tr {
         #[no_mangle] fn foo();
         //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
         //~| HELP can be applied to
+        //~| HELP remove the attribute
 
         #[no_mangle] fn bar() {}
         //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
         //~| HELP can be applied to
+        //~| HELP remove the attribute
     }
 }
 
@@ -359,11 +389,13 @@ mod no_mangle {
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 mod should_panic {
     mod inner { #![should_panic] }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[should_panic] fn f() { }
 
@@ -371,27 +403,32 @@ mod should_panic {
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[should_panic] type T = S;
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[should_panic] impl S { }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 }
 
 #[ignore]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 mod ignore {
     mod inner { #![ignore] }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[ignore] fn f() { }
 
@@ -399,16 +436,19 @@ mod ignore {
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[ignore] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[ignore] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 }
 
 #[no_implicit_prelude]
@@ -419,21 +459,25 @@ mod no_implicit_prelude {
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[no_implicit_prelude] struct S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[no_implicit_prelude] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[no_implicit_prelude] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 }
 
 #[reexport_test_harness_main = "2900"]
@@ -467,21 +511,25 @@ mod macro_escape {
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[macro_escape] struct S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[macro_escape] type T = S;
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[macro_escape] impl S { }
     //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 }
 
 #[no_std]
@@ -524,12 +572,14 @@ mod doc {
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can only be applied to
+//~| HELP remove the attribute
 mod cold {
 
     mod inner { #![cold] }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[cold] fn f() { }
 
@@ -537,64 +587,76 @@ mod cold {
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[cold] type T = S;
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 
     #[cold] impl S { }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can only be applied to
+    //~| HELP remove the attribute
 }
 
 #[link_name = "1900"]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 mod link_name {
     #[link_name = "1900"]
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
     extern "C" { }
 
     mod inner { #![link_name="1900"] }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_name = "1900"] fn f() { }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_name = "1900"] struct S;
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_name = "1900"] type T = S;
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_name = "1900"] impl S { }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 }
 
 #[link_section = "1800"]
 //~^ WARN attribute cannot be used on
 //~| WARN previously accepted
 //~| HELP can be applied to
+//~| HELP remove the attribute
 mod link_section {
     mod inner { #![link_section="1800"] }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_section = "1800"] fn f() { }
 
@@ -602,16 +664,19 @@ mod link_section {
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_section = "1800"] type T = S;
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[link_section = "1800"] impl S { }
     //~^ WARN attribute cannot be used on
     //~| WARN previously accepted
     //~| HELP can be applied to
+    //~| HELP remove the attribute
 }
 
 
@@ -668,21 +733,29 @@ mod deprecated {
     #[deprecated] impl super::StructForDeprecated { }
 }
 
-#[must_use] //~ WARN `#[must_use]` has no effect
-//~^ HELP remove the attribute
+#[must_use] //~ WARN attribute cannot be used on
+//~| WARN previously accepted
+//~| HELP can be applied to
+//~| HELP remove the attribute
 mod must_use {
-    mod inner { #![must_use] } //~ WARN `#[must_use]` has no effect
-    //~^ HELP remove the attribute
+    mod inner { #![must_use] } //~ WARN attribute cannot be used on
+    //~| WARN previously accepted
+    //~| HELP can be applied to
+    //~| HELP remove the attribute
 
     #[must_use] fn f() { }
 
     #[must_use] struct S;
 
-    #[must_use] type T = S; //~ WARN `#[must_use]` has no effect
-    //~^ HELP remove the attribute
+    #[must_use] type T = S; //~ WARN attribute cannot be used on
+    //~| WARN previously accepted
+    //~| HELP can be applied to
+    //~| HELP remove the attribute
 
-    #[must_use] impl S { } //~ WARN `#[must_use]` has no effect
-    //~^ HELP remove the attribute
+    #[must_use] impl S { } //~ WARN attribute cannot be used on
+    //~| WARN previously accepted
+    //~| HELP can be applied to
+    //~| HELP remove the attribute
 }
 
 #[windows_subsystem = "windows"]
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
index 8e2bffb91ca..a633ac0aadb 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr
@@ -1,5 +1,5 @@
 warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:462:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:506:17
    |
 LL |     mod inner { #![macro_escape] }
    |                 ^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     mod inner { #![macro_escape] }
    = help: try an outer attribute: `#[macro_use]`
 
 warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:459:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:503:1
    |
 LL | #[macro_escape]
    | ^^^^^^^^^^^^^^^
@@ -43,151 +43,151 @@ LL | #![deny(x5100)]
    |         ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:103:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:111:8
    |
 LL | #[warn(x5400)]
    |        ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:106:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:114:25
    |
 LL |     mod inner { #![warn(x5400)] }
    |                         ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:109:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:117:12
    |
 LL |     #[warn(x5400)] fn f() { }
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:112:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:120:12
    |
 LL |     #[warn(x5400)] struct S;
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:115:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:123:12
    |
 LL |     #[warn(x5400)] type T = S;
    |            ^^^^^
 
 warning: unknown lint: `x5400`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:118:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:126:12
    |
 LL |     #[warn(x5400)] impl S { }
    |            ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:122:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:130:9
    |
 LL | #[allow(x5300)]
    |         ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:125:26
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:133:26
    |
 LL |     mod inner { #![allow(x5300)] }
    |                          ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:128:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:136:13
    |
 LL |     #[allow(x5300)] fn f() { }
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:131:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:139:13
    |
 LL |     #[allow(x5300)] struct S;
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:134:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:142:13
    |
 LL |     #[allow(x5300)] type T = S;
    |             ^^^^^
 
 warning: unknown lint: `x5300`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:137:13
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:145:13
    |
 LL |     #[allow(x5300)] impl S { }
    |             ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:141:10
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:149:10
    |
 LL | #[forbid(x5200)]
    |          ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:144:27
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:152:27
    |
 LL |     mod inner { #![forbid(x5200)] }
    |                           ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:147:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:155:14
    |
 LL |     #[forbid(x5200)] fn f() { }
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:150:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:158:14
    |
 LL |     #[forbid(x5200)] struct S;
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:153:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:161:14
    |
 LL |     #[forbid(x5200)] type T = S;
    |              ^^^^^
 
 warning: unknown lint: `x5200`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:156:14
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:164:14
    |
 LL |     #[forbid(x5200)] impl S { }
    |              ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:160:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:168:8
    |
 LL | #[deny(x5100)]
    |        ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:163:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:171:25
    |
 LL |     mod inner { #![deny(x5100)] }
    |                         ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:166:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:174:12
    |
 LL |     #[deny(x5100)] fn f() { }
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:169:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:177:12
    |
 LL |     #[deny(x5100)] struct S;
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:172:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:180:12
    |
 LL |     #[deny(x5100)] type T = S;
    |            ^^^^^
 
 warning: unknown lint: `x5100`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:175:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:183:12
    |
 LL |     #[deny(x5100)] impl S { }
    |            ^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:204:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:216:1
    |
 LL | #[macro_export]
    | ^^^^^^^^^^^^^^^
@@ -199,19 +199,19 @@ LL | #![warn(unused_attributes, unknown_lints)]
    |         ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:1
    |
 LL | #[reexport_test_harness_main = "2900"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:487:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:535:1
    |
 LL | #[no_std]
    | ^^^^^^^^^
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:620:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:685:1
    |
 LL |   #[link()]
    |   ^^^^^^^^^
@@ -226,76 +226,64 @@ LL | | }
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
-warning: `#[must_use]` has no effect when applied to modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:671:1
-   |
-LL | #[must_use]
-   | ^^^^^^^^^^^
-
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:688:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:1
    |
 LL | #[windows_subsystem = "windows"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:709:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:1
    |
 LL | #[crate_name = "0900"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:728:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:1
    |
 LL | #[crate_type = "0800"]
    | ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:747:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:820:1
    |
 LL | #[feature(x0600)]
    | ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:767:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:840:1
    |
 LL | #[no_main]
    | ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:786:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:859:1
    |
 LL | #[no_builtins]
    | ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:805:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:878:1
    |
 LL | #[recursion_limit="0200"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:824:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:897:1
    |
 LL | #[type_length_limit="0100"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:72:1
    |
 LL | #![link()]
    | ^^^^^^^^^^ not an `extern` block
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
-warning: `#[must_use]` has no effect when applied to modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:78:1
-   |
-LL | #![must_use]
-   | ^^^^^^^^^^^^
-
 warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:92:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:100:12
    |
 LL | #![feature(rust1)]
    |            ^^^^^
@@ -303,97 +291,97 @@ LL | #![feature(rust1)]
    = note: `#[warn(stable_features)]` on by default
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:207:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:219:17
    |
 LL |     mod inner { #![macro_export] }
    |                 ^^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:210:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:5
    |
 LL |     #[macro_export] fn f() { }
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:213:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:225:5
    |
 LL |     #[macro_export] struct S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:216:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:228:5
    |
 LL |     #[macro_export] type T = S;
    |     ^^^^^^^^^^^^^^^
 
 warning: `#[macro_export]` only has an effect on macro definitions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:219:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:231:5
    |
 LL |     #[macro_export] impl S { }
    |     ^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:17
    |
 LL |     mod inner { #![reexport_test_harness_main="2900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5
    |
 LL |     #[reexport_test_harness_main = "2900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:492:5
    |
 LL |     #[reexport_test_harness_main = "2900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:495:5
    |
 LL |     #[reexport_test_harness_main = "2900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:454:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:498:5
    |
 LL |     #[reexport_test_harness_main = "2900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:490:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:538:17
    |
 LL |     mod inner { #![no_std] }
    |                 ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:5
    |
 LL |     #[no_std] fn f() { }
    |     ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5
    |
 LL |     #[no_std] struct S;
    |     ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:547:5
    |
 LL |     #[no_std] type T = S;
    |     ^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:550:5
    |
 LL |     #[no_std] impl S { }
    |     ^^^^^^^^^
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:626:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:17
    |
 LL |     mod inner { #![link()] }
    |     ------------^^^^^^^^^^-- not an `extern` block
@@ -401,7 +389,7 @@ LL |     mod inner { #![link()] }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:631:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:696:5
    |
 LL |     #[link()] fn f() { }
    |     ^^^^^^^^^ ---------- not an `extern` block
@@ -409,7 +397,7 @@ LL |     #[link()] fn f() { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:636:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:701:5
    |
 LL |     #[link()] struct S;
    |     ^^^^^^^^^ --------- not an `extern` block
@@ -417,7 +405,7 @@ LL |     #[link()] struct S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:641:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:706:5
    |
 LL |     #[link()] type T = S;
    |     ^^^^^^^^^ ----------- not an `extern` block
@@ -425,7 +413,7 @@ LL |     #[link()] type T = S;
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:646:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:5
    |
 LL |     #[link()] impl S { }
    |     ^^^^^^^^^ ---------- not an `extern` block
@@ -433,273 +421,255 @@ LL |     #[link()] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
 warning: attribute should be applied to an `extern` block with non-Rust ABI
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:651:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:716:5
    |
 LL |     #[link()] extern "Rust" {}
    |     ^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
 
-warning: `#[must_use]` has no effect when applied to modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:674:17
-   |
-LL |     mod inner { #![must_use] }
-   |                 ^^^^^^^^^^^^
-
-warning: `#[must_use]` has no effect when applied to type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:681:5
-   |
-LL |     #[must_use] type T = S;
-   |     ^^^^^^^^^^^
-
-warning: `#[must_use]` has no effect when applied to inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:684:5
-   |
-LL |     #[must_use] impl S { }
-   |     ^^^^^^^^^^^
-
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:691:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:764:17
    |
 LL |     mod inner { #![windows_subsystem="windows"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:694:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:767:5
    |
 LL |     #[windows_subsystem = "windows"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:697:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:5
    |
 LL |     #[windows_subsystem = "windows"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:700:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:5
    |
 LL |     #[windows_subsystem = "windows"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:703:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5
    |
 LL |     #[windows_subsystem = "windows"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:712:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:785:17
    |
 LL |     mod inner { #![crate_name="0900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:788:5
    |
 LL |     #[crate_name = "0900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:718:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:791:5
    |
 LL |     #[crate_name = "0900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:721:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:794:5
    |
 LL |     #[crate_name = "0900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:724:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:797:5
    |
 LL |     #[crate_name = "0900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:731:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:804:17
    |
 LL |     mod inner { #![crate_type="0800"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:734:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:807:5
    |
 LL |     #[crate_type = "0800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:737:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:810:5
    |
 LL |     #[crate_type = "0800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:740:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:813:5
    |
 LL |     #[crate_type = "0800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:743:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:816:5
    |
 LL |     #[crate_type = "0800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:823:17
    |
 LL |     mod inner { #![feature(x0600)] }
    |                 ^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:753:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:826:5
    |
 LL |     #[feature(x0600)] fn f() { }
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:756:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:829:5
    |
 LL |     #[feature(x0600)] struct S;
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:759:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:832:5
    |
 LL |     #[feature(x0600)] type T = S;
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:762:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:835:5
    |
 LL |     #[feature(x0600)] impl S { }
    |     ^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:770:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:843:17
    |
 LL |     mod inner { #![no_main] }
    |                 ^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:5
    |
 LL |     #[no_main] fn f() { }
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:776:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:849:5
    |
 LL |     #[no_main] struct S;
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:779:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:852:5
    |
 LL |     #[no_main] type T = S;
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:782:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:855:5
    |
 LL |     #[no_main] impl S { }
    |     ^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:789:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:17
    |
 LL |     mod inner { #![no_builtins] }
    |                 ^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:792:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:865:5
    |
 LL |     #[no_builtins] fn f() { }
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:868:5
    |
 LL |     #[no_builtins] struct S;
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:798:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:871:5
    |
 LL |     #[no_builtins] type T = S;
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:801:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:874:5
    |
 LL |     #[no_builtins] impl S { }
    |     ^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:808:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:881:17
    |
 LL |     mod inner { #![recursion_limit="0200"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:811:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:884:5
    |
 LL |     #[recursion_limit="0200"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:814:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:887:5
    |
 LL |     #[recursion_limit="0200"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:817:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:890:5
    |
 LL |     #[recursion_limit="0200"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:820:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:893:5
    |
 LL |     #[recursion_limit="0200"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be in the root module
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:827:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:900:17
    |
 LL |     mod inner { #![type_length_limit="0100"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:830:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:903:5
    |
 LL |     #[type_length_limit="0100"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:833:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:906:5
    |
 LL |     #[type_length_limit="0100"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:836:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:909:5
    |
 LL |     #[type_length_limit="0100"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:839:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:912:5
    |
 LL |     #[type_length_limit="0100"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: `#[macro_use]` attribute cannot be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:183:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:191:5
    |
 LL |     #[macro_use] fn f() { }
    |     ^^^^^^^^^^^^
@@ -708,7 +678,7 @@ LL |     #[macro_use] fn f() { }
    = help: `#[macro_use]` can be applied to modules, extern crates, crates
 
 warning: `#[macro_use]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:188:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:197:5
    |
 LL |     #[macro_use] struct S;
    |     ^^^^^^^^^^^^
@@ -717,7 +687,7 @@ LL |     #[macro_use] struct S;
    = help: `#[macro_use]` can be applied to modules, extern crates, crates
 
 warning: `#[macro_use]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:203:5
    |
 LL |     #[macro_use] type T = S;
    |     ^^^^^^^^^^^^
@@ -726,7 +696,7 @@ LL |     #[macro_use] type T = S;
    = help: `#[macro_use]` can be applied to modules, extern crates, crates
 
 warning: `#[macro_use]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:198:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:209:5
    |
 LL |     #[macro_use] impl S { }
    |     ^^^^^^^^^^^^
@@ -735,7 +705,7 @@ LL |     #[macro_use] impl S { }
    = help: `#[macro_use]` can be applied to modules, extern crates, crates
 
 warning: `#[path]` attribute cannot be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:259:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5
    |
 LL |     #[path = "3800"] fn f() { }
    |     ^^^^^^^^^^^^^^^^
@@ -744,7 +714,7 @@ LL |     #[path = "3800"] fn f() { }
    = help: `#[path]` can only be applied to modules
 
 warning: `#[path]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:264:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:277:5
    |
 LL |     #[path = "3800"]  struct S;
    |     ^^^^^^^^^^^^^^^^
@@ -753,7 +723,7 @@ LL |     #[path = "3800"]  struct S;
    = help: `#[path]` can only be applied to modules
 
 warning: `#[path]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:269:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:283:5
    |
 LL |     #[path = "3800"] type T = S;
    |     ^^^^^^^^^^^^^^^^
@@ -762,7 +732,7 @@ LL |     #[path = "3800"] type T = S;
    = help: `#[path]` can only be applied to modules
 
 warning: `#[path]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:289:5
    |
 LL |     #[path = "3800"] impl S { }
    |     ^^^^^^^^^^^^^^^^
@@ -771,7 +741,7 @@ LL |     #[path = "3800"] impl S { }
    = help: `#[path]` can only be applied to modules
 
 warning: `#[automatically_derived]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:280:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:296:1
    |
 LL | #[automatically_derived]
    | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -780,7 +750,7 @@ LL | #[automatically_derived]
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[automatically_derived]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:285:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:302:17
    |
 LL |     mod inner { #![automatically_derived] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -789,7 +759,7 @@ LL |     mod inner { #![automatically_derived] }
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[automatically_derived]` attribute cannot be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:290:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:308:5
    |
 LL |     #[automatically_derived] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -798,7 +768,7 @@ LL |     #[automatically_derived] fn f() { }
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[automatically_derived]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:295:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:314:5
    |
 LL |     #[automatically_derived] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -807,7 +777,7 @@ LL |     #[automatically_derived] struct S;
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[automatically_derived]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:300:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:320:5
    |
 LL |     #[automatically_derived] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -816,7 +786,7 @@ LL |     #[automatically_derived] type T = S;
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[automatically_derived]` attribute cannot be used on traits
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:305:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:326:5
    |
 LL |     #[automatically_derived] trait W { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -825,7 +795,7 @@ LL |     #[automatically_derived] trait W { }
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[automatically_derived]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:310:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:332:5
    |
 LL |     #[automatically_derived] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -834,7 +804,7 @@ LL |     #[automatically_derived] impl S { }
    = help: `#[automatically_derived]` can only be applied to trait impl blocks
 
 warning: `#[no_mangle]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:318:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:341:1
    |
 LL | #[no_mangle]
    | ^^^^^^^^^^^^
@@ -843,7 +813,7 @@ LL | #[no_mangle]
    = help: `#[no_mangle]` can be applied to functions, statics
 
 warning: `#[no_mangle]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:323:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:347:17
    |
 LL |     mod inner { #![no_mangle] }
    |                 ^^^^^^^^^^^^^
@@ -852,7 +822,7 @@ LL |     mod inner { #![no_mangle] }
    = help: `#[no_mangle]` can be applied to functions, statics
 
 warning: `#[no_mangle]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:330:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5
    |
 LL |     #[no_mangle] struct S;
    |     ^^^^^^^^^^^^
@@ -861,7 +831,7 @@ LL |     #[no_mangle] struct S;
    = help: `#[no_mangle]` can be applied to functions, statics
 
 warning: `#[no_mangle]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:335:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:361:5
    |
 LL |     #[no_mangle] type T = S;
    |     ^^^^^^^^^^^^
@@ -870,7 +840,7 @@ LL |     #[no_mangle] type T = S;
    = help: `#[no_mangle]` can be applied to functions, statics
 
 warning: `#[no_mangle]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:340:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:367:5
    |
 LL |     #[no_mangle] impl S { }
    |     ^^^^^^^^^^^^
@@ -879,7 +849,7 @@ LL |     #[no_mangle] impl S { }
    = help: `#[no_mangle]` can be applied to functions, statics
 
 warning: `#[no_mangle]` attribute cannot be used on required trait methods
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:346:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:9
    |
 LL |         #[no_mangle] fn foo();
    |         ^^^^^^^^^^^^
@@ -888,7 +858,7 @@ LL |         #[no_mangle] fn foo();
    = help: `#[no_mangle]` can be applied to functions, statics, inherent methods, trait methods in impl blocks
 
 warning: `#[no_mangle]` attribute cannot be used on provided trait methods
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:351:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:9
    |
 LL |         #[no_mangle] fn bar() {}
    |         ^^^^^^^^^^^^
@@ -897,7 +867,7 @@ LL |         #[no_mangle] fn bar() {}
    = help: `#[no_mangle]` can be applied to functions, statics, inherent methods, trait methods in impl blocks
 
 warning: `#[should_panic]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:358:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:388:1
    |
 LL | #[should_panic]
    | ^^^^^^^^^^^^^^^
@@ -906,7 +876,7 @@ LL | #[should_panic]
    = help: `#[should_panic]` can only be applied to functions
 
 warning: `#[should_panic]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:394:17
    |
 LL |     mod inner { #![should_panic] }
    |                 ^^^^^^^^^^^^^^^^
@@ -915,7 +885,7 @@ LL |     mod inner { #![should_panic] }
    = help: `#[should_panic]` can only be applied to functions
 
 warning: `#[should_panic]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:370:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:402:5
    |
 LL |     #[should_panic] struct S;
    |     ^^^^^^^^^^^^^^^
@@ -924,7 +894,7 @@ LL |     #[should_panic] struct S;
    = help: `#[should_panic]` can only be applied to functions
 
 warning: `#[should_panic]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:375:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:408:5
    |
 LL |     #[should_panic] type T = S;
    |     ^^^^^^^^^^^^^^^
@@ -933,7 +903,7 @@ LL |     #[should_panic] type T = S;
    = help: `#[should_panic]` can only be applied to functions
 
 warning: `#[should_panic]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:414:5
    |
 LL |     #[should_panic] impl S { }
    |     ^^^^^^^^^^^^^^^
@@ -942,7 +912,7 @@ LL |     #[should_panic] impl S { }
    = help: `#[should_panic]` can only be applied to functions
 
 warning: `#[ignore]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:386:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:421:1
    |
 LL | #[ignore]
    | ^^^^^^^^^
@@ -951,7 +921,7 @@ LL | #[ignore]
    = help: `#[ignore]` can only be applied to functions
 
 warning: `#[ignore]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:391:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:427:17
    |
 LL |     mod inner { #![ignore] }
    |                 ^^^^^^^^^^
@@ -960,7 +930,7 @@ LL |     mod inner { #![ignore] }
    = help: `#[ignore]` can only be applied to functions
 
 warning: `#[ignore]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:398:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:435:5
    |
 LL |     #[ignore] struct S;
    |     ^^^^^^^^^
@@ -969,7 +939,7 @@ LL |     #[ignore] struct S;
    = help: `#[ignore]` can only be applied to functions
 
 warning: `#[ignore]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:403:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:441:5
    |
 LL |     #[ignore] type T = S;
    |     ^^^^^^^^^
@@ -978,7 +948,7 @@ LL |     #[ignore] type T = S;
    = help: `#[ignore]` can only be applied to functions
 
 warning: `#[ignore]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:408:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:447:5
    |
 LL |     #[ignore] impl S { }
    |     ^^^^^^^^^
@@ -987,7 +957,7 @@ LL |     #[ignore] impl S { }
    = help: `#[ignore]` can only be applied to functions
 
 warning: `#[no_implicit_prelude]` attribute cannot be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:5
    |
 LL |     #[no_implicit_prelude] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -996,7 +966,7 @@ LL |     #[no_implicit_prelude] fn f() { }
    = help: `#[no_implicit_prelude]` can be applied to modules, crates
 
 warning: `#[no_implicit_prelude]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:423:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5
    |
 LL |     #[no_implicit_prelude] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -1005,7 +975,7 @@ LL |     #[no_implicit_prelude] struct S;
    = help: `#[no_implicit_prelude]` can be applied to modules, crates
 
 warning: `#[no_implicit_prelude]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:428:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5
    |
 LL |     #[no_implicit_prelude] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -1014,7 +984,7 @@ LL |     #[no_implicit_prelude] type T = S;
    = help: `#[no_implicit_prelude]` can be applied to modules, crates
 
 warning: `#[no_implicit_prelude]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:433:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:476:5
    |
 LL |     #[no_implicit_prelude] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -1023,7 +993,7 @@ LL |     #[no_implicit_prelude] impl S { }
    = help: `#[no_implicit_prelude]` can be applied to modules, crates
 
 warning: `#[macro_escape]` attribute cannot be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:466:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:510:5
    |
 LL |     #[macro_escape] fn f() { }
    |     ^^^^^^^^^^^^^^^
@@ -1032,7 +1002,7 @@ LL |     #[macro_escape] fn f() { }
    = help: `#[macro_escape]` can be applied to modules, extern crates, crates
 
 warning: `#[macro_escape]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:471:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:516:5
    |
 LL |     #[macro_escape] struct S;
    |     ^^^^^^^^^^^^^^^
@@ -1041,7 +1011,7 @@ LL |     #[macro_escape] struct S;
    = help: `#[macro_escape]` can be applied to modules, extern crates, crates
 
 warning: `#[macro_escape]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:476:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:522:5
    |
 LL |     #[macro_escape] type T = S;
    |     ^^^^^^^^^^^^^^^
@@ -1050,7 +1020,7 @@ LL |     #[macro_escape] type T = S;
    = help: `#[macro_escape]` can be applied to modules, extern crates, crates
 
 warning: `#[macro_escape]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:481:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:528:5
    |
 LL |     #[macro_escape] impl S { }
    |     ^^^^^^^^^^^^^^^
@@ -1059,7 +1029,7 @@ LL |     #[macro_escape] impl S { }
    = help: `#[macro_escape]` can be applied to modules, extern crates, crates
 
 warning: `#[cold]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:523:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:1
    |
 LL | #[cold]
    | ^^^^^^^
@@ -1068,7 +1038,7 @@ LL | #[cold]
    = help: `#[cold]` can only be applied to functions
 
 warning: `#[cold]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:529:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:578:17
    |
 LL |     mod inner { #![cold] }
    |                 ^^^^^^^^
@@ -1077,7 +1047,7 @@ LL |     mod inner { #![cold] }
    = help: `#[cold]` can only be applied to functions
 
 warning: `#[cold]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:536:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:586:5
    |
 LL |     #[cold] struct S;
    |     ^^^^^^^
@@ -1086,7 +1056,7 @@ LL |     #[cold] struct S;
    = help: `#[cold]` can only be applied to functions
 
 warning: `#[cold]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:592:5
    |
 LL |     #[cold] type T = S;
    |     ^^^^^^^
@@ -1095,7 +1065,7 @@ LL |     #[cold] type T = S;
    = help: `#[cold]` can only be applied to functions
 
 warning: `#[cold]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:546:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:598:5
    |
 LL |     #[cold] impl S { }
    |     ^^^^^^^
@@ -1104,7 +1074,7 @@ LL |     #[cold] impl S { }
    = help: `#[cold]` can only be applied to functions
 
 warning: `#[link_name]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:552:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:605:1
    |
 LL | #[link_name = "1900"]
    | ^^^^^^^^^^^^^^^^^^^^^
@@ -1113,7 +1083,7 @@ LL | #[link_name = "1900"]
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on foreign modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:557:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:611:5
    |
 LL |     #[link_name = "1900"]
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -1122,7 +1092,7 @@ LL |     #[link_name = "1900"]
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:563:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:618:17
    |
 LL |     mod inner { #![link_name="1900"] }
    |                 ^^^^^^^^^^^^^^^^^^^^
@@ -1131,7 +1101,7 @@ LL |     mod inner { #![link_name="1900"] }
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:568:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:624:5
    |
 LL |     #[link_name = "1900"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -1140,7 +1110,7 @@ LL |     #[link_name = "1900"] fn f() { }
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:573:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:630:5
    |
 LL |     #[link_name = "1900"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -1149,7 +1119,7 @@ LL |     #[link_name = "1900"] struct S;
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:578:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:636:5
    |
 LL |     #[link_name = "1900"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -1158,7 +1128,7 @@ LL |     #[link_name = "1900"] type T = S;
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_name]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:583:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:642:5
    |
 LL |     #[link_name = "1900"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -1167,7 +1137,7 @@ LL |     #[link_name = "1900"] impl S { }
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_section]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:589:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:649:1
    |
 LL | #[link_section = "1800"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1176,7 +1146,7 @@ LL | #[link_section = "1800"]
    = help: `#[link_section]` can be applied to statics, functions
 
 warning: `#[link_section]` attribute cannot be used on modules
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:594:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:655:17
    |
 LL |     mod inner { #![link_section="1800"] }
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
@@ -1185,7 +1155,7 @@ LL |     mod inner { #![link_section="1800"] }
    = help: `#[link_section]` can be applied to statics, functions
 
 warning: `#[link_section]` attribute cannot be used on structs
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:601:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:663:5
    |
 LL |     #[link_section = "1800"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1194,7 +1164,7 @@ LL |     #[link_section = "1800"] struct S;
    = help: `#[link_section]` can be applied to statics, functions
 
 warning: `#[link_section]` attribute cannot be used on type aliases
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:606:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:669:5
    |
 LL |     #[link_section = "1800"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1203,7 +1173,7 @@ LL |     #[link_section = "1800"] type T = S;
    = help: `#[link_section]` can be applied to statics, functions
 
 warning: `#[link_section]` attribute cannot be used on inherent impl blocks
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:611:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:675:5
    |
 LL |     #[link_section = "1800"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1211,6 +1181,42 @@ LL |     #[link_section = "1800"] impl S { }
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = help: `#[link_section]` can be applied to statics, functions
 
+warning: `#[must_use]` attribute cannot be used on modules
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:736:1
+   |
+LL | #[must_use]
+   | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
+warning: `#[must_use]` attribute cannot be used on modules
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:741:17
+   |
+LL |     mod inner { #![must_use] }
+   |                 ^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
+warning: `#[must_use]` attribute cannot be used on type aliases
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:750:5
+   |
+LL |     #[must_use] type T = S;
+   |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
+warning: `#[must_use]` attribute cannot be used on inherent impl blocks
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:755:5
+   |
+LL |     #[must_use] impl S { }
+   |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
 warning: `#[should_panic]` attribute cannot be used on crates
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:50:1
    |
@@ -1221,7 +1227,7 @@ LL | #![should_panic]
    = help: `#[should_panic]` can only be applied to functions
 
 warning: `#[ignore]` attribute cannot be used on crates
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:54:1
    |
 LL | #![ignore]
    | ^^^^^^^^^^
@@ -1230,7 +1236,7 @@ LL | #![ignore]
    = help: `#[ignore]` can only be applied to functions
 
 warning: `#[proc_macro_derive]` attribute cannot be used on crates
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:61:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:63:1
    |
 LL | #![proc_macro_derive(Test)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1239,7 +1245,7 @@ LL | #![proc_macro_derive(Test)]
    = help: `#[proc_macro_derive]` can only be applied to functions
 
 warning: `#[cold]` attribute cannot be used on crates
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:68:1
    |
 LL | #![cold]
    | ^^^^^^^^
@@ -1248,7 +1254,7 @@ LL | #![cold]
    = help: `#[cold]` can only be applied to functions
 
 warning: `#[link_name]` attribute cannot be used on crates
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:70:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:74:1
    |
 LL | #![link_name = "1900"]
    | ^^^^^^^^^^^^^^^^^^^^^^
@@ -1257,7 +1263,7 @@ LL | #![link_name = "1900"]
    = help: `#[link_name]` can be applied to foreign functions, foreign statics
 
 warning: `#[link_section]` attribute cannot be used on crates
-  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:74:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:79:1
    |
 LL | #![link_section = "1800"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1265,5 +1271,14 @@ LL | #![link_section = "1800"]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = help: `#[link_section]` can be applied to statics, functions
 
+warning: `#[must_use]` attribute cannot be used on crates
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:84:1
+   |
+LL | #![must_use]
+   | ^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
 warning: 173 warnings emitted
 
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
index 5dfc42bc873..8bb72833e30 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
@@ -9,11 +9,11 @@ LL |     print_items::<WindowsMut<'_>>(windows);
 LL | }
    | - temporary value is freed at the end of this statement
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/hrtb-implied-1.rs:26:26
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/hrtb-implied-1.rs:26:5
    |
 LL |     for<'a> I::Item<'a>: Debug,
-   |                          ^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
index 9a1a09b29df..1a397f6cdb2 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-2.stderr
@@ -15,7 +15,11 @@ LL |     let _next = iter2.next();
    = note: requirement occurs because of a mutable reference to `Eat<&mut I, F>`
    = note: mutable references are invariant over their type parameter
    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-   = note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/hrtb-implied-2.rs:31:8
+   |
+LL |     F: FnMut(I::Item<'_>),
+   |        ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr b/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
index 77f363ee87d..aaafcb3b7af 100644
--- a/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
+++ b/tests/ui/generic-associated-types/bugs/hrtb-implied-3.stderr
@@ -11,11 +11,11 @@ LL |     trivial_bound(iter);
    |     `iter` escapes the function body here
    |     argument requires that `'1` must outlive `'static`
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/hrtb-implied-3.rs:14:26
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/hrtb-implied-3.rs:14:5
    |
 LL |     for<'a> I::Item<'a>: Sized,
-   |                          ^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-associated-types/collectivity-regression.stderr b/tests/ui/generic-associated-types/collectivity-regression.stderr
index 1c081ac644a..31349c8eb27 100644
--- a/tests/ui/generic-associated-types/collectivity-regression.stderr
+++ b/tests/ui/generic-associated-types/collectivity-regression.stderr
@@ -7,7 +7,7 @@ LL | |         let _x = x;
 LL | |     };
    | |_____^
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
   --> $DIR/collectivity-regression.rs:11:16
    |
 LL |     for<'a> T: Get<Value<'a> = ()>,
diff --git a/tests/ui/generic-associated-types/extended/lending_iterator.stderr b/tests/ui/generic-associated-types/extended/lending_iterator.stderr
index 84f5ed07bda..7af95dc96a1 100644
--- a/tests/ui/generic-associated-types/extended/lending_iterator.stderr
+++ b/tests/ui/generic-associated-types/extended/lending_iterator.stderr
@@ -12,6 +12,12 @@ error: `Self` does not live long enough
    |
 LL |         <B as FromLendingIterator<A>>::from_iter(self)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/lending_iterator.rs:4:21
+   |
+LL |     fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-just-for-static.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-just-for-static.stderr
index 1c077a9b906..697e85dc8c3 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-just-for-static.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-just-for-static.stderr
@@ -15,7 +15,7 @@ LL | fn give_some<'a>() {
 LL |     want_hrtb::<&'a u32>()
    |     ^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
   --> $DIR/hrtb-just-for-static.rs:9:15
    |
 LL |     where T : for<'a> Foo<&'a isize>
diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.stderr
index 727b9e6bec8..327c0faa482 100644
--- a/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/hrtb-perfect-forwarding.stderr
@@ -47,7 +47,7 @@ LL | fn foo_hrtb_bar_not<'b, T>(mut t: T)
 LL |     foo_hrtb_bar_not(&mut t);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
   --> $DIR/hrtb-perfect-forwarding.rs:37:8
    |
 LL |     T: for<'a> Foo<&'a isize> + Bar<&'b isize>,
diff --git a/tests/ui/impl-trait/precise-capturing/parenthesized.rs b/tests/ui/impl-trait/precise-capturing/parenthesized.rs
new file mode 100644
index 00000000000..e3f80fc1d9f
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/parenthesized.rs
@@ -0,0 +1,8 @@
+// Ensure that we forbid parenthesized use-bounds. In the future we might want
+// to lift this restriction but for now they bear no use whatsoever.
+
+fn f() -> impl Sized + (use<>) {}
+//~^ ERROR precise capturing lists may not be parenthesized
+//~| HELP remove the parentheses
+
+fn main() {}
diff --git a/tests/ui/impl-trait/precise-capturing/parenthesized.stderr b/tests/ui/impl-trait/precise-capturing/parenthesized.stderr
new file mode 100644
index 00000000000..c97fa9972ef
--- /dev/null
+++ b/tests/ui/impl-trait/precise-capturing/parenthesized.stderr
@@ -0,0 +1,14 @@
+error: precise capturing lists may not be parenthesized
+  --> $DIR/parenthesized.rs:4:24
+   |
+LL | fn f() -> impl Sized + (use<>) {}
+   |                        ^^^^^^^
+   |
+help: remove the parentheses
+   |
+LL - fn f() -> impl Sized + (use<>) {}
+LL + fn f() -> impl Sized + use<> {}
+   |
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr b/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
index 8919919d04e..be8b44b1bde 100644
--- a/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
+++ b/tests/ui/implied-bounds/normalization-placeholder-leak.fail.stderr
@@ -30,6 +30,12 @@ LL |     fn test_lifetime<'lt, T: Trait>(_: Foo<&'lt u8>) {}
    |     |                |
    |     |                lifetime `'lt` defined here
    |     requires that `'lt` must outlive `'static`
+   |
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/normalization-placeholder-leak.rs:19:5
+   |
+LL |     for<'x> T::Ty<'x>: Sized;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: lifetime may not live long enough
   --> $DIR/normalization-placeholder-leak.rs:38:5
@@ -39,6 +45,12 @@ LL |     fn test_alias<'lt, T: AnotherTrait>(_: Foo<T::Ty2::<'lt>>) {}
    |     |             |
    |     |             lifetime `'lt` defined here
    |     requires that `'lt` must outlive `'static`
+   |
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/normalization-placeholder-leak.rs:19:5
+   |
+LL |     for<'x> T::Ty<'x>: Sized;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/inference/issue-72616.stderr b/tests/ui/inference/issue-72616.stderr
index 31a0586301d..a271639996f 100644
--- a/tests/ui/inference/issue-72616.stderr
+++ b/tests/ui/inference/issue-72616.stderr
@@ -6,14 +6,10 @@ LL |         if String::from("a") == "a".try_into().unwrap() {}
    |                              |
    |                              type must be known at this point
    |
-   = note: cannot satisfy `String: PartialEq<_>`
-   = help: the following types implement trait `PartialEq<Rhs>`:
-             `String` implements `PartialEq<&str>`
-             `String` implements `PartialEq<ByteStr>`
-             `String` implements `PartialEq<ByteString>`
-             `String` implements `PartialEq<Cow<'_, str>>`
-             `String` implements `PartialEq<str>`
-             `String` implements `PartialEq`
+   = note: multiple `impl`s satisfying `String: PartialEq<_>` found in the following crates: `alloc`, `std`:
+           - impl PartialEq for String;
+           - impl PartialEq<Path> for String;
+           - impl PartialEq<PathBuf> for String;
 help: try using a fully qualified path to specify the expected types
    |
 LL -         if String::from("a") == "a".try_into().unwrap() {}
diff --git a/tests/ui/invalid/invalid-no-sanitize.rs b/tests/ui/invalid/invalid-no-sanitize.rs
deleted file mode 100644
index b52e3cc83fa..00000000000
--- a/tests/ui/invalid/invalid-no-sanitize.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(no_sanitize)]
-
-#[no_sanitize(brontosaurus)] //~ ERROR invalid argument
-fn main() {
-}
diff --git a/tests/ui/invalid/invalid-no-sanitize.stderr b/tests/ui/invalid/invalid-no-sanitize.stderr
deleted file mode 100644
index b1c80438b31..00000000000
--- a/tests/ui/invalid/invalid-no-sanitize.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: invalid argument for `no_sanitize`
-  --> $DIR/invalid-no-sanitize.rs:3:15
-   |
-LL | #[no_sanitize(brontosaurus)]
-   |               ^^^^^^^^^^^^
-   |
-   = note: expected one of: `address`, `cfi`, `hwaddress`, `kcfi`, `memory`, `memtag`, `shadow-call-stack`, or `thread`
-
-error: aborting due to 1 previous error
-
diff --git a/tests/ui/issues/issue-26217.stderr b/tests/ui/issues/issue-26217.stderr
index 0b153ad7490..a8750567819 100644
--- a/tests/ui/issues/issue-26217.stderr
+++ b/tests/ui/issues/issue-26217.stderr
@@ -6,11 +6,11 @@ LL | fn bar<'a>() {
 LL |     foo::<&'a i32>();
    |     ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/issue-26217.rs:1:30
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/issue-26217.rs:1:19
    |
 LL | fn foo<T>() where for<'a> T: 'a {}
-   |                              ^^
+   |                   ^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/lifetimes/issue-105507.fixed b/tests/ui/lifetimes/issue-105507.fixed
index 177da01b154..46d4f14a245 100644
--- a/tests/ui/lifetimes/issue-105507.fixed
+++ b/tests/ui/lifetimes/issue-105507.fixed
@@ -25,8 +25,8 @@ impl<T> ProjectedMyTrait for T
     where
         T: Project,
         for<'a> T::Projected<'a>: MyTrait,
-        //~^ NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime
-        //~| NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime
+        //~^ NOTE due to a current limitation of the type system, this implies a `'static` lifetime
+        //~| NOTE due to a current limitation of the type system, this implies a `'static` lifetime
 {}
 
 fn require_trait<T: MyTrait>(_: T) {}
diff --git a/tests/ui/lifetimes/issue-105507.rs b/tests/ui/lifetimes/issue-105507.rs
index 858fa19a029..f1721fee5b4 100644
--- a/tests/ui/lifetimes/issue-105507.rs
+++ b/tests/ui/lifetimes/issue-105507.rs
@@ -25,8 +25,8 @@ impl<T> ProjectedMyTrait for T
     where
         T: Project,
         for<'a> T::Projected<'a>: MyTrait,
-        //~^ NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime
-        //~| NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime
+        //~^ NOTE due to a current limitation of the type system, this implies a `'static` lifetime
+        //~| NOTE due to a current limitation of the type system, this implies a `'static` lifetime
 {}
 
 fn require_trait<T: MyTrait>(_: T) {}
diff --git a/tests/ui/lifetimes/issue-105507.stderr b/tests/ui/lifetimes/issue-105507.stderr
index 44d3a7eb9a4..7fccba7cc44 100644
--- a/tests/ui/lifetimes/issue-105507.stderr
+++ b/tests/ui/lifetimes/issue-105507.stderr
@@ -4,7 +4,7 @@ error: `T` does not live long enough
 LL |     require_trait(wrap);
    |     ^^^^^^^^^^^^^^^^^^^
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
   --> $DIR/issue-105507.rs:27:35
    |
 LL |         for<'a> T::Projected<'a>: MyTrait,
@@ -20,7 +20,7 @@ error: `U` does not live long enough
 LL |     require_trait(wrap1);
    |     ^^^^^^^^^^^^^^^^^^^^
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
   --> $DIR/issue-105507.rs:27:35
    |
 LL |         for<'a> T::Projected<'a>: MyTrait,
diff --git a/tests/ui/lint/unused/unused_attributes-must_use.fixed b/tests/ui/lint/unused/unused_attributes-must_use.fixed
index 80d488296ea..2e800cbff3f 100644
--- a/tests/ui/lint/unused/unused_attributes-must_use.fixed
+++ b/tests/ui/lint/unused/unused_attributes-must_use.fixed
@@ -4,18 +4,23 @@
 #![deny(unused_attributes, unused_must_use)]
 #![feature(asm_experimental_arch, stmt_expr_attributes, trait_alias)]
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 extern crate std as std2;
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 mod test_mod {}
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 use std::arch::global_asm;
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 const CONST: usize = 4;
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 #[no_mangle]
 static STATIC: usize = 4;
 
@@ -32,7 +37,8 @@ union U {
     unit: (),
 }
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 impl U {
     #[must_use]
     fn method() -> i32 {
@@ -46,10 +52,12 @@ fn foo() -> i64 {
     4
 }
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 extern "Rust" {
     #[link_name = "STATIC"]
-     //~ ERROR `#[must_use]` has no effect
+     //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     static FOREIGN_STATIC: usize;
 
     #[link_name = "foo"]
@@ -60,16 +68,20 @@ extern "Rust" {
  //~ ERROR unused attribute
 global_asm!("");
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 type UseMe = ();
 
-fn qux< T>(_: T) {} //~ ERROR `#[must_use]` has no effect
+fn qux< T>(_: T) {} //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 
 #[must_use]
 trait Use {
-     //~ ERROR `#[must_use]` has no effect
+     //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     const ASSOC_CONST: usize = 4;
-     //~ ERROR `#[must_use]` has no effect
+     //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     type AssocTy;
 
     #[must_use]
@@ -78,20 +90,24 @@ trait Use {
     }
 }
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 impl Use for () {
     type AssocTy = ();
 
-     //~ ERROR `#[must_use]` has no effect
+     //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     fn get_four(&self) -> usize {
         4
     }
 }
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 trait Alias = Use;
 
- //~ ERROR `#[must_use]` has no effect
+ //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 macro_rules! cool_macro {
     () => {
         4
@@ -99,11 +115,13 @@ macro_rules! cool_macro {
 }
 
 fn main() {
-     //~ ERROR `#[must_use]` has no effect
+     //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     let x = || {};
     x();
 
-    let x =  //~ ERROR `#[must_use]` has no effect
+    let x =  //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     || {};
     x();
 
@@ -125,7 +143,8 @@ fn main() {
     let _ = ().get_four(); //~ ERROR that must be used
 
     match Some(4) {
-         //~ ERROR `#[must_use]` has no effect
+         //~ ERROR attribute cannot be used on
+        //~| WARN previously accepted
         Some(res) => res,
         None => 0,
     };
@@ -133,7 +152,9 @@ fn main() {
     struct PatternField {
         foo: i32,
     }
-    let s = PatternField {   foo: 123 }; //~ ERROR `#[must_use]` has no effect
-    let PatternField {  foo } = s; //~ ERROR `#[must_use]` has no effect
+    let s = PatternField {   foo: 123 }; //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
+    let PatternField {  foo } = s; //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     let _ = foo;
 }
diff --git a/tests/ui/lint/unused/unused_attributes-must_use.rs b/tests/ui/lint/unused/unused_attributes-must_use.rs
index edefe8ed65e..c41c6c1d706 100644
--- a/tests/ui/lint/unused/unused_attributes-must_use.rs
+++ b/tests/ui/lint/unused/unused_attributes-must_use.rs
@@ -4,18 +4,23 @@
 #![deny(unused_attributes, unused_must_use)]
 #![feature(asm_experimental_arch, stmt_expr_attributes, trait_alias)]
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 extern crate std as std2;
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 mod test_mod {}
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 use std::arch::global_asm;
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 const CONST: usize = 4;
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 #[no_mangle]
 static STATIC: usize = 4;
 
@@ -32,7 +37,8 @@ union U {
     unit: (),
 }
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 impl U {
     #[must_use]
     fn method() -> i32 {
@@ -46,10 +52,12 @@ fn foo() -> i64 {
     4
 }
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 extern "Rust" {
     #[link_name = "STATIC"]
-    #[must_use] //~ ERROR `#[must_use]` has no effect
+    #[must_use] //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     static FOREIGN_STATIC: usize;
 
     #[link_name = "foo"]
@@ -60,16 +68,20 @@ extern "Rust" {
 #[must_use] //~ ERROR unused attribute
 global_asm!("");
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 type UseMe = ();
 
-fn qux<#[must_use] T>(_: T) {} //~ ERROR `#[must_use]` has no effect
+fn qux<#[must_use] T>(_: T) {} //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 
 #[must_use]
 trait Use {
-    #[must_use] //~ ERROR `#[must_use]` has no effect
+    #[must_use] //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     const ASSOC_CONST: usize = 4;
-    #[must_use] //~ ERROR `#[must_use]` has no effect
+    #[must_use] //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     type AssocTy;
 
     #[must_use]
@@ -78,20 +90,24 @@ trait Use {
     }
 }
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 impl Use for () {
     type AssocTy = ();
 
-    #[must_use] //~ ERROR `#[must_use]` has no effect
+    #[must_use] //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     fn get_four(&self) -> usize {
         4
     }
 }
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 trait Alias = Use;
 
-#[must_use] //~ ERROR `#[must_use]` has no effect
+#[must_use] //~ ERROR attribute cannot be used on
+//~| WARN previously accepted
 macro_rules! cool_macro {
     () => {
         4
@@ -99,11 +115,13 @@ macro_rules! cool_macro {
 }
 
 fn main() {
-    #[must_use] //~ ERROR `#[must_use]` has no effect
+    #[must_use] //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     let x = || {};
     x();
 
-    let x = #[must_use] //~ ERROR `#[must_use]` has no effect
+    let x = #[must_use] //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     || {};
     x();
 
@@ -125,7 +143,8 @@ fn main() {
     ().get_four(); //~ ERROR that must be used
 
     match Some(4) {
-        #[must_use] //~ ERROR `#[must_use]` has no effect
+        #[must_use] //~ ERROR attribute cannot be used on
+        //~| WARN previously accepted
         Some(res) => res,
         None => 0,
     };
@@ -133,7 +152,9 @@ fn main() {
     struct PatternField {
         foo: i32,
     }
-    let s = PatternField { #[must_use]  foo: 123 }; //~ ERROR `#[must_use]` has no effect
-    let PatternField { #[must_use] foo } = s; //~ ERROR `#[must_use]` has no effect
+    let s = PatternField { #[must_use]  foo: 123 }; //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
+    let PatternField { #[must_use] foo } = s; //~ ERROR attribute cannot be used on
+    //~| WARN previously accepted
     let _ = foo;
 }
diff --git a/tests/ui/lint/unused/unused_attributes-must_use.stderr b/tests/ui/lint/unused/unused_attributes-must_use.stderr
index 9e37f6504cc..12cc2ea56be 100644
--- a/tests/ui/lint/unused/unused_attributes-must_use.stderr
+++ b/tests/ui/lint/unused/unused_attributes-must_use.stderr
@@ -1,11 +1,11 @@
 error: unused attribute `must_use`
-  --> $DIR/unused_attributes-must_use.rs:60:1
+  --> $DIR/unused_attributes-must_use.rs:68:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
    |
 note: the built-in attribute `must_use` will be ignored, since it's applied to the macro invocation `global_asm`
-  --> $DIR/unused_attributes-must_use.rs:61:1
+  --> $DIR/unused_attributes-must_use.rs:69:1
    |
 LL | global_asm!("");
    | ^^^^^^^^^^
@@ -15,134 +15,197 @@ note: the lint level is defined here
 LL | #![deny(unused_attributes, unused_must_use)]
    |         ^^^^^^^^^^^^^^^^^
 
-error: `#[must_use]` has no effect when applied to extern crates
+error: `#[must_use]` attribute cannot be used on extern crates
   --> $DIR/unused_attributes-must_use.rs:7:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to modules
-  --> $DIR/unused_attributes-must_use.rs:10:1
+error: `#[must_use]` attribute cannot be used on modules
+  --> $DIR/unused_attributes-must_use.rs:11:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to use statements
-  --> $DIR/unused_attributes-must_use.rs:13:1
+error: `#[must_use]` attribute cannot be used on use statements
+  --> $DIR/unused_attributes-must_use.rs:15:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to constants
-  --> $DIR/unused_attributes-must_use.rs:16:1
+error: `#[must_use]` attribute cannot be used on constants
+  --> $DIR/unused_attributes-must_use.rs:19:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to statics
-  --> $DIR/unused_attributes-must_use.rs:18:1
+error: `#[must_use]` attribute cannot be used on statics
+  --> $DIR/unused_attributes-must_use.rs:22:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to inherent impl blocks
-  --> $DIR/unused_attributes-must_use.rs:35:1
+error: `#[must_use]` attribute cannot be used on inherent impl blocks
+  --> $DIR/unused_attributes-must_use.rs:40:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to foreign modules
-  --> $DIR/unused_attributes-must_use.rs:49:1
+error: `#[must_use]` attribute cannot be used on foreign modules
+  --> $DIR/unused_attributes-must_use.rs:55:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to type aliases
-  --> $DIR/unused_attributes-must_use.rs:63:1
+error: `#[must_use]` attribute cannot be used on foreign statics
+  --> $DIR/unused_attributes-must_use.rs:59:5
+   |
+LL |     #[must_use]
+   |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
+error: `#[must_use]` attribute cannot be used on type aliases
+  --> $DIR/unused_attributes-must_use.rs:71:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to type parameters
-  --> $DIR/unused_attributes-must_use.rs:66:8
+error: `#[must_use]` attribute cannot be used on function params
+  --> $DIR/unused_attributes-must_use.rs:75:8
    |
 LL | fn qux<#[must_use] T>(_: T) {}
    |        ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to trait impl blocks
-  --> $DIR/unused_attributes-must_use.rs:81:1
+error: `#[must_use]` attribute cannot be used on associated consts
+  --> $DIR/unused_attributes-must_use.rs:80:5
+   |
+LL |     #[must_use]
+   |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
+error: `#[must_use]` attribute cannot be used on associated types
+  --> $DIR/unused_attributes-must_use.rs:83:5
+   |
+LL |     #[must_use]
+   |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
+
+error: `#[must_use]` attribute cannot be used on trait impl blocks
+  --> $DIR/unused_attributes-must_use.rs:93:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to trait aliases
-  --> $DIR/unused_attributes-must_use.rs:91:1
+error: `#[must_use]` attribute cannot be used on trait methods in impl blocks
+  --> $DIR/unused_attributes-must_use.rs:98:5
+   |
+LL |     #[must_use]
+   |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to data types, functions, unions, required trait methods, provided trait methods, inherent methods, foreign functions, traits
+
+error: `#[must_use]` attribute cannot be used on trait aliases
+  --> $DIR/unused_attributes-must_use.rs:105:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to macro defs
-  --> $DIR/unused_attributes-must_use.rs:94:1
+error: `#[must_use]` attribute cannot be used on macro defs
+  --> $DIR/unused_attributes-must_use.rs:109:1
    |
 LL | #[must_use]
    | ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to statements
-  --> $DIR/unused_attributes-must_use.rs:102:5
+error: `#[must_use]` attribute cannot be used on statements
+  --> $DIR/unused_attributes-must_use.rs:118:5
    |
 LL |     #[must_use]
    |     ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to closures
-  --> $DIR/unused_attributes-must_use.rs:106:13
+error: `#[must_use]` attribute cannot be used on closures
+  --> $DIR/unused_attributes-must_use.rs:123:13
    |
 LL |     let x = #[must_use]
    |             ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to methods, data types, functions, unions, foreign functions, traits
 
-error: `#[must_use]` has no effect when applied to match arms
-  --> $DIR/unused_attributes-must_use.rs:128:9
+error: `#[must_use]` attribute cannot be used on match arms
+  --> $DIR/unused_attributes-must_use.rs:146:9
    |
 LL |         #[must_use]
    |         ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to struct fields
-  --> $DIR/unused_attributes-must_use.rs:136:28
+error: `#[must_use]` attribute cannot be used on struct fields
+  --> $DIR/unused_attributes-must_use.rs:155:28
    |
 LL |     let s = PatternField { #[must_use]  foo: 123 };
    |                            ^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
-error: `#[must_use]` has no effect when applied to pattern fields
-  --> $DIR/unused_attributes-must_use.rs:137:24
+error: `#[must_use]` attribute cannot be used on pattern fields
+  --> $DIR/unused_attributes-must_use.rs:157:24
    |
 LL |     let PatternField { #[must_use] foo } = s;
    |                        ^^^^^^^^^^^
-
-error: `#[must_use]` has no effect when applied to associated consts
-  --> $DIR/unused_attributes-must_use.rs:70:5
    |
-LL |     #[must_use]
-   |     ^^^^^^^^^^^
-
-error: `#[must_use]` has no effect when applied to associated types
-  --> $DIR/unused_attributes-must_use.rs:72:5
-   |
-LL |     #[must_use]
-   |     ^^^^^^^^^^^
-
-error: `#[must_use]` has no effect when applied to provided trait methods
-  --> $DIR/unused_attributes-must_use.rs:85:5
-   |
-LL |     #[must_use]
-   |     ^^^^^^^^^^^
-
-error: `#[must_use]` has no effect when applied to foreign statics
-  --> $DIR/unused_attributes-must_use.rs:52:5
-   |
-LL |     #[must_use]
-   |     ^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = help: `#[must_use]` can be applied to functions, data types, unions, traits
 
 error: unused `X` that must be used
-  --> $DIR/unused_attributes-must_use.rs:110:5
+  --> $DIR/unused_attributes-must_use.rs:128:5
    |
 LL |     X;
    |     ^
@@ -158,7 +221,7 @@ LL |     let _ = X;
    |     +++++++
 
 error: unused `Y` that must be used
-  --> $DIR/unused_attributes-must_use.rs:111:5
+  --> $DIR/unused_attributes-must_use.rs:129:5
    |
 LL |     Y::Z;
    |     ^^^^
@@ -169,7 +232,7 @@ LL |     let _ = Y::Z;
    |     +++++++
 
 error: unused `U` that must be used
-  --> $DIR/unused_attributes-must_use.rs:112:5
+  --> $DIR/unused_attributes-must_use.rs:130:5
    |
 LL |     U { unit: () };
    |     ^^^^^^^^^^^^^^
@@ -180,7 +243,7 @@ LL |     let _ = U { unit: () };
    |     +++++++
 
 error: unused return value of `U::method` that must be used
-  --> $DIR/unused_attributes-must_use.rs:113:5
+  --> $DIR/unused_attributes-must_use.rs:131:5
    |
 LL |     U::method();
    |     ^^^^^^^^^^^
@@ -191,7 +254,7 @@ LL |     let _ = U::method();
    |     +++++++
 
 error: unused return value of `foo` that must be used
-  --> $DIR/unused_attributes-must_use.rs:114:5
+  --> $DIR/unused_attributes-must_use.rs:132:5
    |
 LL |     foo();
    |     ^^^^^
@@ -202,7 +265,7 @@ LL |     let _ = foo();
    |     +++++++
 
 error: unused return value of `foreign_foo` that must be used
-  --> $DIR/unused_attributes-must_use.rs:117:9
+  --> $DIR/unused_attributes-must_use.rs:135:9
    |
 LL |         foreign_foo();
    |         ^^^^^^^^^^^^^
@@ -213,7 +276,7 @@ LL |         let _ = foreign_foo();
    |         +++++++
 
 error: unused return value of `Use::get_four` that must be used
-  --> $DIR/unused_attributes-must_use.rs:125:5
+  --> $DIR/unused_attributes-must_use.rs:143:5
    |
 LL |     ().get_four();
    |     ^^^^^^^^^^^^^
diff --git a/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr b/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr
index 77f8bef83a4..aad4a844ec1 100644
--- a/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr
+++ b/tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.stderr
@@ -2,7 +2,7 @@ error: cannot find derive macro `sample` in this scope
   --> $DIR/macro-rules-as-derive-or-attr-issue-132928.rs:6:10
    |
 LL | macro_rules! sample { () => {} }
-   |              ------ `sample` exists, but a declarative macro cannot be used as a derive macro
+   |              ------ `sample` exists, but has no `derive` rules
 ...
 LL | #[derive(sample)]
    |          ^^^^^^
@@ -20,7 +20,7 @@ error: cannot find derive macro `sample` in this scope
   --> $DIR/macro-rules-as-derive-or-attr-issue-132928.rs:6:10
    |
 LL | macro_rules! sample { () => {} }
-   |              ------ `sample` exists, but a declarative macro cannot be used as a derive macro
+   |              ------ `sample` exists, but has no `derive` rules
 ...
 LL | #[derive(sample)]
    |          ^^^^^^
@@ -31,7 +31,7 @@ error: cannot find derive macro `sample` in this scope
   --> $DIR/macro-rules-as-derive-or-attr-issue-132928.rs:6:10
    |
 LL | macro_rules! sample { () => {} }
-   |              ------ `sample` exists, but a declarative macro cannot be used as a derive macro
+   |              ------ `sample` exists, but has no `derive` rules
 ...
 LL | #[derive(sample)]
    |          ^^^^^^
diff --git a/tests/ui/macros/macro-rules-derive-error.rs b/tests/ui/macros/macro-rules-derive-error.rs
new file mode 100644
index 00000000000..3ef0236c528
--- /dev/null
+++ b/tests/ui/macros/macro-rules-derive-error.rs
@@ -0,0 +1,51 @@
+#![feature(macro_derive)]
+
+macro_rules! MyDerive {
+    derive() { $($body:tt)* } => {
+        compile_error!(concat!("MyDerive: ", stringify!($($body)*)));
+    };
+    //~^^ ERROR: MyDerive
+}
+
+macro_rules! fn_only {
+//~^ NOTE: `fn_only` exists, but has no `derive` rules
+//~| NOTE: `fn_only` exists, but has no `derive` rules
+    {} => {}
+}
+
+//~v NOTE: `DeriveOnly` exists, but has no rules for function-like invocation
+macro_rules! DeriveOnly {
+    derive() {} => {}
+}
+
+fn main() {
+    //~v NOTE: in this expansion of #[derive(MyDerive)]
+    #[derive(MyDerive)]
+    struct S1;
+
+    //~vv ERROR: cannot find macro `MyDerive` in this scope
+    //~| NOTE: `MyDerive` is in scope, but it is a derive
+    MyDerive!(arg);
+
+    #[derive(fn_only)]
+    struct S2;
+    //~^^ ERROR: cannot find derive macro `fn_only` in this scope
+    //~| ERROR: cannot find derive macro `fn_only` in this scope
+    //~| NOTE: duplicate diagnostic emitted
+
+    DeriveOnly!(); //~ ERROR: cannot find macro `DeriveOnly` in this scope
+}
+
+#[derive(ForwardReferencedDerive)]
+struct S;
+//~^^ ERROR: cannot find derive macro `ForwardReferencedDerive` in this scope
+//~| NOTE: consider moving the definition of `ForwardReferencedDerive` before this call
+//~| ERROR: cannot find derive macro `ForwardReferencedDerive` in this scope
+//~| NOTE: consider moving the definition of `ForwardReferencedDerive` before this call
+//~| NOTE: duplicate diagnostic emitted
+
+macro_rules! ForwardReferencedDerive {
+//~^ NOTE: a macro with the same name exists, but it appears later
+//~| NOTE: a macro with the same name exists, but it appears later
+    derive() {} => {}
+}
diff --git a/tests/ui/macros/macro-rules-derive-error.stderr b/tests/ui/macros/macro-rules-derive-error.stderr
new file mode 100644
index 00000000000..bf6f58a3686
--- /dev/null
+++ b/tests/ui/macros/macro-rules-derive-error.stderr
@@ -0,0 +1,75 @@
+error: MyDerive: struct S1;
+  --> $DIR/macro-rules-derive-error.rs:5:9
+   |
+LL |         compile_error!(concat!("MyDerive: ", stringify!($($body)*)));
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     #[derive(MyDerive)]
+   |              -------- in this derive macro expansion
+   |
+   = note: this error originates in the derive macro `MyDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: cannot find macro `MyDerive` in this scope
+  --> $DIR/macro-rules-derive-error.rs:28:5
+   |
+LL |     MyDerive!(arg);
+   |     ^^^^^^^^
+   |
+   = note: `MyDerive` is in scope, but it is a derive macro: `#[derive(MyDerive)]`
+
+error: cannot find derive macro `fn_only` in this scope
+  --> $DIR/macro-rules-derive-error.rs:30:14
+   |
+LL | macro_rules! fn_only {
+   |              ------- `fn_only` exists, but has no `derive` rules
+...
+LL |     #[derive(fn_only)]
+   |              ^^^^^^^
+
+error: cannot find derive macro `fn_only` in this scope
+  --> $DIR/macro-rules-derive-error.rs:30:14
+   |
+LL | macro_rules! fn_only {
+   |              ------- `fn_only` exists, but has no `derive` rules
+...
+LL |     #[derive(fn_only)]
+   |              ^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: cannot find macro `DeriveOnly` in this scope
+  --> $DIR/macro-rules-derive-error.rs:36:5
+   |
+LL | macro_rules! DeriveOnly {
+   |              ---------- `DeriveOnly` exists, but has no rules for function-like invocation
+...
+LL |     DeriveOnly!();
+   |     ^^^^^^^^^^
+
+error: cannot find derive macro `ForwardReferencedDerive` in this scope
+  --> $DIR/macro-rules-derive-error.rs:39:10
+   |
+LL | #[derive(ForwardReferencedDerive)]
+   |          ^^^^^^^^^^^^^^^^^^^^^^^ consider moving the definition of `ForwardReferencedDerive` before this call
+   |
+note: a macro with the same name exists, but it appears later
+  --> $DIR/macro-rules-derive-error.rs:47:14
+   |
+LL | macro_rules! ForwardReferencedDerive {
+   |              ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: cannot find derive macro `ForwardReferencedDerive` in this scope
+  --> $DIR/macro-rules-derive-error.rs:39:10
+   |
+LL | #[derive(ForwardReferencedDerive)]
+   |          ^^^^^^^^^^^^^^^^^^^^^^^ consider moving the definition of `ForwardReferencedDerive` before this call
+   |
+note: a macro with the same name exists, but it appears later
+  --> $DIR/macro-rules-derive-error.rs:47:14
+   |
+LL | macro_rules! ForwardReferencedDerive {
+   |              ^^^^^^^^^^^^^^^^^^^^^^^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 7 previous errors
+
diff --git a/tests/ui/macros/macro-rules-derive.rs b/tests/ui/macros/macro-rules-derive.rs
new file mode 100644
index 00000000000..d5294330fbf
--- /dev/null
+++ b/tests/ui/macros/macro-rules-derive.rs
@@ -0,0 +1,71 @@
+//@ run-pass
+//@ check-run-results
+#![feature(macro_derive)]
+
+#[macro_export]
+macro_rules! MyExportedDerive {
+    derive() { $($body:tt)* } => {
+        println!("MyExportedDerive: body={:?}", stringify!($($body)*));
+    };
+    { $($args:tt)* } => {
+        println!("MyExportedDerive!({:?})", stringify!($($args)*));
+    };
+}
+
+macro_rules! MyLocalDerive {
+    derive() { $($body:tt)* } => {
+        println!("MyLocalDerive: body={:?}", stringify!($($body)*));
+    };
+    { $($args:tt)* } => {
+        println!("MyLocalDerive!({:?})", stringify!($($args)*));
+    };
+}
+
+trait MyTrait {
+    fn name() -> &'static str;
+}
+
+macro_rules! MyTrait {
+    derive() { struct $name:ident; } => {
+        impl MyTrait for $name {
+            fn name() -> &'static str {
+                stringify!($name)
+            }
+        }
+    };
+}
+
+#[derive(MyTrait)]
+struct MyGlobalType;
+
+fn main() {
+    #[derive(crate::MyExportedDerive)]
+    struct _S1;
+    #[derive(crate::MyExportedDerive, crate::MyExportedDerive)]
+    struct _Twice1;
+
+    crate::MyExportedDerive!();
+    crate::MyExportedDerive!(invoked, arguments);
+
+    #[derive(MyExportedDerive)]
+    struct _S2;
+    #[derive(MyExportedDerive, MyExportedDerive)]
+    struct _Twice2;
+
+    MyExportedDerive!();
+    MyExportedDerive!(invoked, arguments);
+
+    #[derive(MyLocalDerive)]
+    struct _S3;
+    #[derive(MyLocalDerive, MyLocalDerive)]
+    struct _Twice3;
+
+    MyLocalDerive!();
+    MyLocalDerive!(invoked, arguments);
+
+    #[derive(MyTrait)]
+    struct MyLocalType;
+
+    println!("MyGlobalType::name(): {}", MyGlobalType::name());
+    println!("MyLocalType::name(): {}", MyLocalType::name());
+}
diff --git a/tests/ui/macros/macro-rules-derive.run.stdout b/tests/ui/macros/macro-rules-derive.run.stdout
new file mode 100644
index 00000000000..ee492873302
--- /dev/null
+++ b/tests/ui/macros/macro-rules-derive.run.stdout
@@ -0,0 +1,17 @@
+MyExportedDerive: body="struct _S1;"
+MyExportedDerive: body="struct _Twice1;"
+MyExportedDerive: body="struct _Twice1;"
+MyExportedDerive!("")
+MyExportedDerive!("invoked, arguments")
+MyExportedDerive: body="struct _S2;"
+MyExportedDerive: body="struct _Twice2;"
+MyExportedDerive: body="struct _Twice2;"
+MyExportedDerive!("")
+MyExportedDerive!("invoked, arguments")
+MyLocalDerive: body="struct _S3;"
+MyLocalDerive: body="struct _Twice3;"
+MyLocalDerive: body="struct _Twice3;"
+MyLocalDerive!("")
+MyLocalDerive!("invoked, arguments")
+MyGlobalType::name(): MyGlobalType
+MyLocalType::name(): MyLocalType
diff --git a/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
index abc5d150a3f..62e87263967 100644
--- a/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
+++ b/tests/ui/mismatched_types/closure-arg-type-mismatch.stderr
@@ -57,7 +57,7 @@ LL |     baz(f);
    = note: requirement occurs because of a mutable pointer to `&u32`
    = note: mutable pointers are invariant over their type parameter
    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
+note: due to a current limitation of the type system, this implies a `'static` lifetime
   --> $DIR/closure-arg-type-mismatch.rs:8:11
    |
 LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
diff --git a/tests/ui/nll/local-outlives-static-via-hrtb.stderr b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
index a6b3328b5a2..a98f11ce513 100644
--- a/tests/ui/nll/local-outlives-static-via-hrtb.stderr
+++ b/tests/ui/nll/local-outlives-static-via-hrtb.stderr
@@ -12,11 +12,11 @@ LL |     assert_static_via_hrtb_with_assoc_type(&&local);
 LL | }
    | - `local` dropped here while still borrowed
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/local-outlives-static-via-hrtb.rs:15:53
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/local-outlives-static-via-hrtb.rs:15:42
    |
 LL | fn assert_static_via_hrtb<G>(_: G) where for<'a> G: Outlives<'a> {}
-   |                                                     ^^^^^^^^^^^^
+   |                                          ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0597]: `local` does not live long enough
   --> $DIR/local-outlives-static-via-hrtb.rs:25:45
@@ -32,11 +32,11 @@ LL |     assert_static_via_hrtb_with_assoc_type(&&local);
 LL | }
    | - `local` dropped here while still borrowed
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/local-outlives-static-via-hrtb.rs:19:20
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/local-outlives-static-via-hrtb.rs:19:5
    |
 LL |     for<'a> &'a T: Reference<AssociatedType = &'a ()>,
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
index 1d086c658df..6e47b8e59f5 100644
--- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.nll.stderr
@@ -13,11 +13,11 @@ LL |     let b = |_| &a;
 LL | }
    | - `a` dropped here while still borrowed
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:11
    |
 LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
-   |                      ^^^
+   |           ^^^^^^^^^^^^^^
 
 error: implementation of `Fn` is not general enough
   --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
index 1d086c658df..6e47b8e59f5 100644
--- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-117146.polonius.stderr
@@ -13,11 +13,11 @@ LL |     let b = |_| &a;
 LL | }
    | - `a` dropped here while still borrowed
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:22
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/location-insensitive-scopes-issue-117146.rs:20:11
    |
 LL | fn bad<F: Fn(&()) -> &()>(_: F) {}
-   |                      ^^^
+   |           ^^^^^^^^^^^^^^
 
 error: implementation of `Fn` is not general enough
   --> $DIR/location-insensitive-scopes-issue-117146.rs:13:5
diff --git a/tests/ui/nll/type-test-universe.stderr b/tests/ui/nll/type-test-universe.stderr
index 31e17d64b8c..54b48c1597b 100644
--- a/tests/ui/nll/type-test-universe.stderr
+++ b/tests/ui/nll/type-test-universe.stderr
@@ -12,11 +12,11 @@ LL | fn test2<'a>() {
 LL |     outlives_forall::<Value<'a>>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/type-test-universe.rs:6:16
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/type-test-universe.rs:6:5
    |
 LL |     for<'u> T: 'u,
-   |                ^^
+   |     ^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/parser/macro/macro-attr-bad.rs b/tests/ui/parser/macro/macro-attr-bad.rs
index 4313a4d04ab..9f50b057a7a 100644
--- a/tests/ui/parser/macro/macro-attr-bad.rs
+++ b/tests/ui/parser/macro/macro-attr-bad.rs
@@ -14,10 +14,10 @@ macro_rules! attr_incomplete_4 { attr() {} => }
 //~^ ERROR macro definition ended unexpectedly
 
 macro_rules! attr_noparens_1 { attr{} {} => {} }
-//~^ ERROR macro attribute argument matchers require parentheses
+//~^ ERROR `attr` rule argument matchers require parentheses
 
 macro_rules! attr_noparens_2 { attr[] {} => {} }
-//~^ ERROR macro attribute argument matchers require parentheses
+//~^ ERROR `attr` rule argument matchers require parentheses
 
 macro_rules! attr_noparens_3 { attr _ {} => {} }
 //~^ ERROR invalid macro matcher
diff --git a/tests/ui/parser/macro/macro-attr-bad.stderr b/tests/ui/parser/macro/macro-attr-bad.stderr
index 4d286b66649..bf0ed13cd55 100644
--- a/tests/ui/parser/macro/macro-attr-bad.stderr
+++ b/tests/ui/parser/macro/macro-attr-bad.stderr
@@ -22,7 +22,7 @@ error: macro definition ended unexpectedly
 LL | macro_rules! attr_incomplete_4 { attr() {} => }
    |                                              ^ expected right-hand side of macro rule
 
-error: macro attribute argument matchers require parentheses
+error: `attr` rule argument matchers require parentheses
   --> $DIR/macro-attr-bad.rs:16:36
    |
 LL | macro_rules! attr_noparens_1 { attr{} {} => {} }
@@ -34,7 +34,7 @@ LL - macro_rules! attr_noparens_1 { attr{} {} => {} }
 LL + macro_rules! attr_noparens_1 { attr() {} => {} }
    |
 
-error: macro attribute argument matchers require parentheses
+error: `attr` rule argument matchers require parentheses
   --> $DIR/macro-attr-bad.rs:19:36
    |
 LL | macro_rules! attr_noparens_2 { attr[] {} => {} }
diff --git a/tests/ui/parser/macro/macro-attr-recovery.rs b/tests/ui/parser/macro/macro-attr-recovery.rs
index dbb795f57aa..3a942973e5e 100644
--- a/tests/ui/parser/macro/macro-attr-recovery.rs
+++ b/tests/ui/parser/macro/macro-attr-recovery.rs
@@ -3,7 +3,7 @@
 
 macro_rules! attr {
     attr[$($args:tt)*] { $($body:tt)* } => {
-        //~^ ERROR: macro attribute argument matchers require parentheses
+        //~^ ERROR: `attr` rule argument matchers require parentheses
         //~v ERROR: attr:
         compile_error!(concat!(
             "attr: args=\"",
diff --git a/tests/ui/parser/macro/macro-attr-recovery.stderr b/tests/ui/parser/macro/macro-attr-recovery.stderr
index ab3a0b7c607..e1f8dccf1b8 100644
--- a/tests/ui/parser/macro/macro-attr-recovery.stderr
+++ b/tests/ui/parser/macro/macro-attr-recovery.stderr
@@ -1,4 +1,4 @@
-error: macro attribute argument matchers require parentheses
+error: `attr` rule argument matchers require parentheses
   --> $DIR/macro-attr-recovery.rs:5:9
    |
 LL |     attr[$($args:tt)*] { $($body:tt)* } => {
diff --git a/tests/ui/parser/macro/macro-derive-bad.rs b/tests/ui/parser/macro/macro-derive-bad.rs
new file mode 100644
index 00000000000..79b9eb8c113
--- /dev/null
+++ b/tests/ui/parser/macro/macro-derive-bad.rs
@@ -0,0 +1,43 @@
+#![crate_type = "lib"]
+#![feature(macro_derive)]
+
+macro_rules! derive_incomplete_1 { derive }
+//~^ ERROR macro definition ended unexpectedly
+//~| NOTE expected `()` after `derive`
+
+macro_rules! derive_incomplete_2 { derive() }
+//~^ ERROR macro definition ended unexpectedly
+//~| NOTE expected macro derive body
+
+macro_rules! derive_incomplete_3 { derive() {} }
+//~^ ERROR expected `=>`
+//~| NOTE expected `=>`
+
+macro_rules! derive_incomplete_4 { derive() {} => }
+//~^ ERROR macro definition ended unexpectedly
+//~| NOTE expected right-hand side of macro rule
+
+macro_rules! derive_noparens_1 { derive{} {} => {} }
+//~^ ERROR `derive` rule argument matchers require parentheses
+
+macro_rules! derive_noparens_2 { derive[] {} => {} }
+//~^ ERROR `derive` rule argument matchers require parentheses
+
+macro_rules! derive_noparens_3 { derive _ {} => {} }
+//~^ ERROR `derive` must be followed by `()`
+
+macro_rules! derive_args_1 { derive($x:ident) ($y:ident) => {} }
+//~^ ERROR `derive` rules do not accept arguments
+
+macro_rules! derive_args_2 { derive() => {} }
+//~^ ERROR expected macro derive body, got `=>`
+
+macro_rules! derive_args_3 { derive($x:ident) => {} }
+//~^ ERROR `derive` rules do not accept arguments
+//~| ERROR expected macro derive body, got `=>`
+//~| NOTE need `()` after this `derive`
+
+macro_rules! derive_dup_matcher { derive() {$x:ident $x:ident} => {} }
+//~^ ERROR duplicate matcher binding
+//~| NOTE duplicate binding
+//~| NOTE previous binding
diff --git a/tests/ui/parser/macro/macro-derive-bad.stderr b/tests/ui/parser/macro/macro-derive-bad.stderr
new file mode 100644
index 00000000000..ec750c9ac82
--- /dev/null
+++ b/tests/ui/parser/macro/macro-derive-bad.stderr
@@ -0,0 +1,90 @@
+error: macro definition ended unexpectedly
+  --> $DIR/macro-derive-bad.rs:4:42
+   |
+LL | macro_rules! derive_incomplete_1 { derive }
+   |                                          ^ expected `()` after `derive`
+
+error: macro definition ended unexpectedly
+  --> $DIR/macro-derive-bad.rs:8:44
+   |
+LL | macro_rules! derive_incomplete_2 { derive() }
+   |                                            ^ expected macro derive body
+
+error: expected `=>`, found end of macro arguments
+  --> $DIR/macro-derive-bad.rs:12:47
+   |
+LL | macro_rules! derive_incomplete_3 { derive() {} }
+   |                                               ^ expected `=>`
+
+error: macro definition ended unexpectedly
+  --> $DIR/macro-derive-bad.rs:16:50
+   |
+LL | macro_rules! derive_incomplete_4 { derive() {} => }
+   |                                                  ^ expected right-hand side of macro rule
+
+error: `derive` rule argument matchers require parentheses
+  --> $DIR/macro-derive-bad.rs:20:40
+   |
+LL | macro_rules! derive_noparens_1 { derive{} {} => {} }
+   |                                        ^^
+   |
+help: the delimiters should be `(` and `)`
+   |
+LL - macro_rules! derive_noparens_1 { derive{} {} => {} }
+LL + macro_rules! derive_noparens_1 { derive() {} => {} }
+   |
+
+error: `derive` rule argument matchers require parentheses
+  --> $DIR/macro-derive-bad.rs:23:40
+   |
+LL | macro_rules! derive_noparens_2 { derive[] {} => {} }
+   |                                        ^^
+   |
+help: the delimiters should be `(` and `)`
+   |
+LL - macro_rules! derive_noparens_2 { derive[] {} => {} }
+LL + macro_rules! derive_noparens_2 { derive() {} => {} }
+   |
+
+error: `derive` rules do not accept arguments; `derive` must be followed by `()`
+  --> $DIR/macro-derive-bad.rs:26:41
+   |
+LL | macro_rules! derive_noparens_3 { derive _ {} => {} }
+   |                                         ^
+
+error: `derive` rules do not accept arguments; `derive` must be followed by `()`
+  --> $DIR/macro-derive-bad.rs:29:36
+   |
+LL | macro_rules! derive_args_1 { derive($x:ident) ($y:ident) => {} }
+   |                                    ^^^^^^^^^^
+
+error: expected macro derive body, got `=>`
+  --> $DIR/macro-derive-bad.rs:32:39
+   |
+LL | macro_rules! derive_args_2 { derive() => {} }
+   |                                       ^^
+
+error: `derive` rules do not accept arguments; `derive` must be followed by `()`
+  --> $DIR/macro-derive-bad.rs:35:36
+   |
+LL | macro_rules! derive_args_3 { derive($x:ident) => {} }
+   |                                    ^^^^^^^^^^
+
+error: expected macro derive body, got `=>`
+  --> $DIR/macro-derive-bad.rs:35:47
+   |
+LL | macro_rules! derive_args_3 { derive($x:ident) => {} }
+   |                              ------           ^^
+   |                              |
+   |                              need `()` after this `derive`
+
+error: duplicate matcher binding
+  --> $DIR/macro-derive-bad.rs:40:54
+   |
+LL | macro_rules! derive_dup_matcher { derive() {$x:ident $x:ident} => {} }
+   |                                             -------- ^^^^^^^^ duplicate binding
+   |                                             |
+   |                                             previous binding
+
+error: aborting due to 12 previous errors
+
diff --git a/tests/ui/parser/trait-object-lifetime-parens.e2015.stderr b/tests/ui/parser/trait-object-lifetime-parens.e2015.stderr
index cf0b3d77f5b..4f4f89de5d1 100644
--- a/tests/ui/parser/trait-object-lifetime-parens.e2015.stderr
+++ b/tests/ui/parser/trait-object-lifetime-parens.e2015.stderr
@@ -1,4 +1,4 @@
-error: parenthesized lifetime bounds are not supported
+error: lifetime bounds may not be parenthesized
   --> $DIR/trait-object-lifetime-parens.rs:9:21
    |
 LL | fn f<'a, T: Trait + ('a)>() {}
@@ -10,7 +10,7 @@ LL - fn f<'a, T: Trait + ('a)>() {}
 LL + fn f<'a, T: Trait + 'a>() {}
    |
 
-error: parenthesized lifetime bounds are not supported
+error: lifetime bounds may not be parenthesized
   --> $DIR/trait-object-lifetime-parens.rs:12:24
    |
 LL |     let _: Box<Trait + ('a)>;
diff --git a/tests/ui/parser/trait-object-lifetime-parens.e2021.stderr b/tests/ui/parser/trait-object-lifetime-parens.e2021.stderr
index b65c079788a..a4e2501cfdf 100644
--- a/tests/ui/parser/trait-object-lifetime-parens.e2021.stderr
+++ b/tests/ui/parser/trait-object-lifetime-parens.e2021.stderr
@@ -1,4 +1,4 @@
-error: parenthesized lifetime bounds are not supported
+error: lifetime bounds may not be parenthesized
   --> $DIR/trait-object-lifetime-parens.rs:9:21
    |
 LL | fn f<'a, T: Trait + ('a)>() {}
@@ -10,7 +10,7 @@ LL - fn f<'a, T: Trait + ('a)>() {}
 LL + fn f<'a, T: Trait + 'a>() {}
    |
 
-error: parenthesized lifetime bounds are not supported
+error: lifetime bounds may not be parenthesized
   --> $DIR/trait-object-lifetime-parens.rs:12:24
    |
 LL |     let _: Box<Trait + ('a)>;
diff --git a/tests/ui/parser/trait-object-lifetime-parens.rs b/tests/ui/parser/trait-object-lifetime-parens.rs
index 0ff4660bb0d..47a6884b316 100644
--- a/tests/ui/parser/trait-object-lifetime-parens.rs
+++ b/tests/ui/parser/trait-object-lifetime-parens.rs
@@ -6,10 +6,10 @@
 
 trait Trait {}
 
-fn f<'a, T: Trait + ('a)>() {} //~ ERROR parenthesized lifetime bounds are not supported
+fn f<'a, T: Trait + ('a)>() {} //~ ERROR lifetime bounds may not be parenthesized
 
 fn check<'a>() {
-    let _: Box<Trait + ('a)>; //~ ERROR parenthesized lifetime bounds are not supported
+    let _: Box<Trait + ('a)>; //~ ERROR lifetime bounds may not be parenthesized
     //[e2021]~^ ERROR expected a type, found a trait
     // FIXME: It'd be great if we could suggest removing the parentheses here too.
     //[e2015]~v ERROR lifetimes must be followed by `+` to form a trait object type
diff --git a/tests/ui/reachable/expr_cast.rs b/tests/ui/reachable/expr_cast.rs
index e8e477ea4f6..aa412c99b2e 100644
--- a/tests/ui/reachable/expr_cast.rs
+++ b/tests/ui/reachable/expr_cast.rs
@@ -1,13 +1,21 @@
-#![allow(unused_variables)]
-#![allow(unused_assignments)]
-#![allow(dead_code)]
+//@ check-pass
+//@ edition: 2024
+//
+// Check that we don't warn on `as` casts of never to any as unreachable.
+// While they *are* unreachable, sometimes they are required to appeal typeck.
 #![deny(unreachable_code)]
-#![feature(never_type, type_ascription)]
 
 fn a() {
-    // the cast is unreachable:
-    let x = {return} as !; //~ ERROR unreachable
-    //~| ERROR non-primitive cast
+    _ = {return} as u32;
 }
 
-fn main() { }
+fn b() {
+    (return) as u32;
+}
+
+// example that needs an explicit never-to-any `as` cast
+fn example() -> impl Iterator<Item = u8> {
+    todo!() as std::iter::Empty<_>
+}
+
+fn main() {}
diff --git a/tests/ui/reachable/expr_cast.stderr b/tests/ui/reachable/expr_cast.stderr
deleted file mode 100644
index 6643f1784a1..00000000000
--- a/tests/ui/reachable/expr_cast.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error: unreachable expression
-  --> $DIR/expr_cast.rs:9:13
-   |
-LL |     let x = {return} as !;
-   |             ^------^^^^^^
-   |             ||
-   |             |any code following this expression is unreachable
-   |             unreachable expression
-   |
-note: the lint level is defined here
-  --> $DIR/expr_cast.rs:4:9
-   |
-LL | #![deny(unreachable_code)]
-   |         ^^^^^^^^^^^^^^^^
-
-error[E0605]: non-primitive cast: `()` as `!`
-  --> $DIR/expr_cast.rs:9:13
-   |
-LL |     let x = {return} as !;
-   |             ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0605`.
diff --git a/tests/ui/reachable/unreachable-try-pattern.rs b/tests/ui/reachable/unreachable-try-pattern.rs
index 22cbfb95af0..1358722e229 100644
--- a/tests/ui/reachable/unreachable-try-pattern.rs
+++ b/tests/ui/reachable/unreachable-try-pattern.rs
@@ -18,7 +18,7 @@ fn bar(x: Result<!, i32>) -> Result<u32, i32> {
 fn foo(x: Result<!, i32>) -> Result<u32, i32> {
     let y = (match x { Ok(n) => Ok(n as u32), Err(e) => Err(e) })?;
     //~^ WARN unreachable pattern
-    //~| WARN unreachable expression
+    //~| WARN unreachable call
     Ok(y)
 }
 
diff --git a/tests/ui/reachable/unreachable-try-pattern.stderr b/tests/ui/reachable/unreachable-try-pattern.stderr
index 40b11613105..468af427249 100644
--- a/tests/ui/reachable/unreachable-try-pattern.stderr
+++ b/tests/ui/reachable/unreachable-try-pattern.stderr
@@ -1,11 +1,10 @@
-warning: unreachable expression
-  --> $DIR/unreachable-try-pattern.rs:19:36
+warning: unreachable call
+  --> $DIR/unreachable-try-pattern.rs:19:33
    |
 LL |     let y = (match x { Ok(n) => Ok(n as u32), Err(e) => Err(e) })?;
-   |                                    -^^^^^^^
-   |                                    |
-   |                                    unreachable expression
-   |                                    any code following this expression is unreachable
+   |                                 ^^ - any code following this expression is unreachable
+   |                                 |
+   |                                 unreachable call
    |
 note: the lint level is defined here
   --> $DIR/unreachable-try-pattern.rs:3:9
diff --git a/tests/ui/resolve/path-attr-in-const-block.stderr b/tests/ui/resolve/path-attr-in-const-block.stderr
index f3ae5b60c4f..23f4e319c6d 100644
--- a/tests/ui/resolve/path-attr-in-const-block.stderr
+++ b/tests/ui/resolve/path-attr-in-const-block.stderr
@@ -11,7 +11,7 @@ LL |         #![path = foo!()]
    |         ^^^^^^^^^^------^
    |         |         |
    |         |         expected a string literal here
-   |         help: must be of the form: `#[path = "file"]`
+   |         help: must be of the form: `#![path = "file"]`
    |
    = note: for more information, visit <https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute>
 
diff --git a/tests/ui/sanitize-attr/invalid-sanitize.rs b/tests/ui/sanitize-attr/invalid-sanitize.rs
new file mode 100644
index 00000000000..49dc01c8daa
--- /dev/null
+++ b/tests/ui/sanitize-attr/invalid-sanitize.rs
@@ -0,0 +1,22 @@
+#![feature(sanitize)]
+
+#[sanitize(brontosaurus = "off")] //~ ERROR invalid argument
+fn main() {
+}
+
+#[sanitize(address = "off")] //~ ERROR multiple `sanitize` attributes
+#[sanitize(address = "off")]
+fn multiple_consistent() {}
+
+#[sanitize(address = "on")] //~ ERROR multiple `sanitize` attributes
+#[sanitize(address = "off")]
+fn multiple_inconsistent() {}
+
+#[sanitize(address = "bogus")] //~ ERROR invalid argument for `sanitize`
+fn wrong_value() {}
+
+#[sanitize = "off"] //~ ERROR malformed `sanitize` attribute input
+fn name_value () {}
+
+#[sanitize] //~ ERROR malformed `sanitize` attribute input
+fn just_word() {}
diff --git a/tests/ui/sanitize-attr/invalid-sanitize.stderr b/tests/ui/sanitize-attr/invalid-sanitize.stderr
new file mode 100644
index 00000000000..4bf81770b89
--- /dev/null
+++ b/tests/ui/sanitize-attr/invalid-sanitize.stderr
@@ -0,0 +1,82 @@
+error: malformed `sanitize` attribute input
+  --> $DIR/invalid-sanitize.rs:18:1
+   |
+LL | #[sanitize = "off"]
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+help: the following are the possible correct uses
+   |
+LL - #[sanitize = "off"]
+LL + #[sanitize(address = "on|off")]
+   |
+LL - #[sanitize = "off"]
+LL + #[sanitize(cfi = "on|off")]
+   |
+LL - #[sanitize = "off"]
+LL + #[sanitize(hwaddress = "on|off")]
+   |
+LL - #[sanitize = "off"]
+LL + #[sanitize(kcfi = "on|off")]
+   |
+   = and 5 other candidates
+
+error: malformed `sanitize` attribute input
+  --> $DIR/invalid-sanitize.rs:21:1
+   |
+LL | #[sanitize]
+   | ^^^^^^^^^^^
+   |
+help: the following are the possible correct uses
+   |
+LL | #[sanitize(address = "on|off")]
+   |           ++++++++++++++++++++
+LL | #[sanitize(cfi = "on|off")]
+   |           ++++++++++++++++
+LL | #[sanitize(hwaddress = "on|off")]
+   |           ++++++++++++++++++++++
+LL | #[sanitize(kcfi = "on|off")]
+   |           +++++++++++++++++
+   = and 5 other candidates
+
+error: multiple `sanitize` attributes
+  --> $DIR/invalid-sanitize.rs:7:1
+   |
+LL | #[sanitize(address = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/invalid-sanitize.rs:8:1
+   |
+LL | #[sanitize(address = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: multiple `sanitize` attributes
+  --> $DIR/invalid-sanitize.rs:11:1
+   |
+LL | #[sanitize(address = "on")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/invalid-sanitize.rs:12:1
+   |
+LL | #[sanitize(address = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: invalid argument for `sanitize`
+  --> $DIR/invalid-sanitize.rs:3:1
+   |
+LL | #[sanitize(brontosaurus = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: expected one of: `address`, `kernel_address`, `cfi`, `hwaddress`, `kcfi`, `memory`, `memtag`, `shadow_call_stack`, or `thread`
+
+error: invalid argument for `sanitize`
+  --> $DIR/invalid-sanitize.rs:15:1
+   |
+LL | #[sanitize(address = "bogus")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: expected one of: `address`, `kernel_address`, `cfi`, `hwaddress`, `kcfi`, `memory`, `memtag`, `shadow_call_stack`, or `thread`
+
+error: aborting due to 6 previous errors
+
diff --git a/tests/ui/sanitize-attr/valid-sanitize.rs b/tests/ui/sanitize-attr/valid-sanitize.rs
new file mode 100644
index 00000000000..ebe76fcba04
--- /dev/null
+++ b/tests/ui/sanitize-attr/valid-sanitize.rs
@@ -0,0 +1,115 @@
+//! Tests where the `#[sanitize(..)]` attribute can and cannot be used.
+
+#![feature(sanitize)]
+#![feature(extern_types)]
+#![feature(impl_trait_in_assoc_type)]
+#![warn(unused_attributes)]
+#![sanitize(address = "off", thread = "on")]
+
+#[sanitize(address = "off", thread = "on")]
+mod submod {}
+
+#[sanitize(address = "off")]
+static FOO: u32 = 0;
+
+#[sanitize(thread = "off")] //~ ERROR sanitize attribute not allowed here
+static BAR: u32 = 0;
+
+#[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+type MyTypeAlias = ();
+
+#[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+trait MyTrait {
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    const TRAIT_ASSOC_CONST: u32;
+
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    type TraitAssocType;
+
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    fn trait_method(&self);
+
+    #[sanitize(address = "off", thread = "on")]
+    fn trait_method_with_default(&self) {}
+
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    fn trait_assoc_fn();
+}
+
+#[sanitize(address = "off")]
+impl MyTrait for () {
+    const TRAIT_ASSOC_CONST: u32 = 0;
+
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    type TraitAssocType = Self;
+
+    #[sanitize(address = "off", thread = "on")]
+    fn trait_method(&self) {}
+    #[sanitize(address = "off", thread = "on")]
+    fn trait_method_with_default(&self) {}
+    #[sanitize(address = "off", thread = "on")]
+    fn trait_assoc_fn() {}
+}
+
+trait HasAssocType {
+    type T;
+    fn constrain_assoc_type() -> Self::T;
+}
+
+impl HasAssocType for () {
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    type T = impl Copy;
+    fn constrain_assoc_type() -> Self::T {}
+}
+
+#[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+struct MyStruct {
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    field: u32,
+}
+
+#[sanitize(address = "off", thread = "on")]
+impl MyStruct {
+    #[sanitize(address = "off", thread = "on")]
+    fn method(&self) {}
+    #[sanitize(address = "off", thread = "on")]
+    fn assoc_fn() {}
+}
+
+extern "C" {
+    #[sanitize(address = "off", thread = "on")] //~ ERROR sanitize attribute not allowed here
+    static X: u32;
+
+    #[sanitize(address = "off", thread = "on")] //~ ERROR sanitize attribute not allowed here
+    type T;
+
+    #[sanitize(address = "off", thread = "on")] //~ ERROR sanitize attribute not allowed here
+    fn foreign_fn();
+}
+
+#[sanitize(address = "off", thread = "on")]
+fn main() {
+    #[sanitize(address = "off", thread = "on")] //~ ERROR sanitize attribute not allowed here
+    let _ = ();
+
+    // Currently not allowed on let statements, even if they bind to a closure.
+    // It might be nice to support this as a special case someday, but trying
+    // to define the precise boundaries of that special case might be tricky.
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    let _let_closure = || ();
+
+    // In situations where attributes can already be applied to expressions,
+    // the sanitize attribute is allowed on closure expressions.
+    let _closure_tail_expr = {
+        #[sanitize(address = "off", thread = "on")]
+        || ()
+    };
+
+    match () {
+        #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+        () => (),
+    }
+
+    #[sanitize(address = "off")] //~ ERROR sanitize attribute not allowed here
+    return ();
+}
diff --git a/tests/ui/sanitize-attr/valid-sanitize.stderr b/tests/ui/sanitize-attr/valid-sanitize.stderr
new file mode 100644
index 00000000000..ff9fe63eaf5
--- /dev/null
+++ b/tests/ui/sanitize-attr/valid-sanitize.stderr
@@ -0,0 +1,190 @@
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:15:1
+   |
+LL | #[sanitize(thread = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | static BAR: u32 = 0;
+   | -------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:18:1
+   |
+LL | #[sanitize(address = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | type MyTypeAlias = ();
+   | ---------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:21:1
+   |
+LL |   #[sanitize(address = "off")]
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / trait MyTrait {
+LL | |     #[sanitize(address = "off")]
+LL | |     const TRAIT_ASSOC_CONST: u32;
+...  |
+LL | |     fn trait_assoc_fn();
+LL | | }
+   | |_- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:65:1
+   |
+LL |   #[sanitize(address = "off")]
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / struct MyStruct {
+LL | |     #[sanitize(address = "off")]
+LL | |     field: u32,
+LL | | }
+   | |_- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:67:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     field: u32,
+   |     ---------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:92:5
+   |
+LL |     #[sanitize(address = "off", thread = "on")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     let _ = ();
+   |     ----------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:98:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     let _let_closure = || ();
+   |     ------------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:109:9
+   |
+LL |         #[sanitize(address = "off")]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         () => (),
+   |         -------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:113:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     return ();
+   |     --------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:23:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     const TRAIT_ASSOC_CONST: u32;
+   |     ----------------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:26:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     type TraitAssocType;
+   |     -------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:29:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn trait_method(&self);
+   |     ----------------------- function has no body
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:35:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn trait_assoc_fn();
+   |     -------------------- function has no body
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:43:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     type TraitAssocType = Self;
+   |     --------------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:60:5
+   |
+LL |     #[sanitize(address = "off")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     type T = impl Copy;
+   |     ------------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:80:5
+   |
+LL |     #[sanitize(address = "off", thread = "on")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     static X: u32;
+   |     -------------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:83:5
+   |
+LL |     #[sanitize(address = "off", thread = "on")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     type T;
+   |     ------- not a function, impl block, or module
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: sanitize attribute not allowed here
+  --> $DIR/valid-sanitize.rs:86:5
+   |
+LL |     #[sanitize(address = "off", thread = "on")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn foreign_fn();
+   |     ---------------- function has no body
+   |
+   = help: sanitize attribute can be applied to a function (with body), impl block, or module
+
+error: aborting due to 18 previous errors
+
diff --git a/tests/ui/sanitizer/inline-always.rs b/tests/ui/sanitizer/inline-always-sanitize.rs
index d92daee3026..d6ee214e9b3 100644
--- a/tests/ui/sanitizer/inline-always.rs
+++ b/tests/ui/sanitizer/inline-always-sanitize.rs
@@ -1,11 +1,11 @@
 //@ check-pass
 
-#![feature(no_sanitize)]
+#![feature(sanitize)]
 
 #[inline(always)]
 //~^ NOTE inlining requested here
-#[no_sanitize(address)]
-//~^ WARN will have no effect after inlining
+#[sanitize(address = "off")]
+//~^ WARN  setting `sanitize` off will have no effect after inlining
 //~| NOTE on by default
 fn x() {
 }
diff --git a/tests/ui/sanitizer/inline-always-sanitize.stderr b/tests/ui/sanitizer/inline-always-sanitize.stderr
new file mode 100644
index 00000000000..ed479472169
--- /dev/null
+++ b/tests/ui/sanitizer/inline-always-sanitize.stderr
@@ -0,0 +1,15 @@
+warning: setting `sanitize` off will have no effect after inlining
+  --> $DIR/inline-always-sanitize.rs:7:1
+   |
+LL | #[sanitize(address = "off")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: inlining requested here
+  --> $DIR/inline-always-sanitize.rs:5:1
+   |
+LL | #[inline(always)]
+   | ^^^^^^^^^^^^^^^^^
+   = note: `#[warn(inline_no_sanitize)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/sanitizer/inline-always.stderr b/tests/ui/sanitizer/inline-always.stderr
deleted file mode 100644
index 74fba3c0e0e..00000000000
--- a/tests/ui/sanitizer/inline-always.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-warning: `no_sanitize` will have no effect after inlining
-  --> $DIR/inline-always.rs:7:1
-   |
-LL | #[no_sanitize(address)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: inlining requested here
-  --> $DIR/inline-always.rs:5:1
-   |
-LL | #[inline(always)]
-   | ^^^^^^^^^^^^^^^^^
-   = note: `#[warn(inline_no_sanitize)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/suggestions/partialeq_suggest_swap_on_e0277.stderr b/tests/ui/suggestions/partialeq_suggest_swap_on_e0277.stderr
index ebe103ef19a..c5984f53f68 100644
--- a/tests/ui/suggestions/partialeq_suggest_swap_on_e0277.stderr
+++ b/tests/ui/suggestions/partialeq_suggest_swap_on_e0277.stderr
@@ -10,6 +10,8 @@ LL |     String::from("Girls Band Cry") == T(String::from("Girls Band Cry"));
              `String` implements `PartialEq<ByteStr>`
              `String` implements `PartialEq<ByteString>`
              `String` implements `PartialEq<Cow<'_, str>>`
+             `String` implements `PartialEq<Path>`
+             `String` implements `PartialEq<PathBuf>`
              `String` implements `PartialEq<str>`
              `String` implements `PartialEq`
    = note: `T` implements `PartialEq<String>`
diff --git a/tests/ui/transmutability/references/reject_lifetime_extension.stderr b/tests/ui/transmutability/references/reject_lifetime_extension.stderr
index a597041c6ca..b9702984145 100644
--- a/tests/ui/transmutability/references/reject_lifetime_extension.stderr
+++ b/tests/ui/transmutability/references/reject_lifetime_extension.stderr
@@ -67,11 +67,11 @@ LL |         unsafe { extend_hrtb(src) }
    |                  `src` escapes the function body here
    |                  argument requires that `'a` must outlive `'static`
    |
-note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-  --> $DIR/reject_lifetime_extension.rs:85:25
+note: due to a current limitation of the type system, this implies a `'static` lifetime
+  --> $DIR/reject_lifetime_extension.rs:85:9
    |
 LL |         for<'b> &'b u8: TransmuteFrom<&'a u8>,
-   |                         ^^^^^^^^^^^^^^^^^^^^^
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/type/type-name-basic.rs b/tests/ui/type/type-name-basic.rs
index 6a9f772e542..e1310e1f365 100644
--- a/tests/ui/type/type-name-basic.rs
+++ b/tests/ui/type/type-name-basic.rs
@@ -62,28 +62,32 @@ pub fn main() {
 
     t!(Vec<Vec<u32>>, "alloc::vec::Vec<alloc::vec::Vec<u32>>");
     t!(Foo<usize>, "type_name_basic::Foo<usize>");
-    t!(Bar<'static>, "type_name_basic::Bar");
-    t!(Baz<'static, u32>, "type_name_basic::Baz<u32>");
+    t!(Bar<'static>, "type_name_basic::Bar<'_>");
+    t!(Baz<'static, u32>, "type_name_basic::Baz<'_, u32>");
 
-    // FIXME: lifetime omission means these all print badly.
-    t!(dyn TrL<'static>, "dyn type_name_basic::TrL<>");
-    t!(dyn TrLA<'static, A = u32>, "dyn type_name_basic::TrLA<, A = u32>");
+    t!(dyn TrL<'static>, "dyn type_name_basic::TrL<'_>");
+    t!(dyn TrLA<'static, A = u32>, "dyn type_name_basic::TrLA<'_, A = u32>");
     t!(
         dyn TrLT<'static, Cow<'static, ()>>,
-        "dyn type_name_basic::TrLT<, alloc::borrow::Cow<()>>"
+        "dyn type_name_basic::TrLT<'_, alloc::borrow::Cow<'_, ()>>"
     );
     t!(
         dyn TrLTA<'static, u32, A = Cow<'static, ()>>,
-        "dyn type_name_basic::TrLTA<, u32, A = alloc::borrow::Cow<()>>"
+        "dyn type_name_basic::TrLTA<'_, u32, A = alloc::borrow::Cow<'_, ()>>"
     );
 
     t!(fn(i32) -> i32, "fn(i32) -> i32");
-    t!(dyn for<'a> Fn(&'a u32), "dyn core::ops::function::Fn(&u32)");
+    t!(fn(&'static u32), "fn(&u32)");
+
+    // FIXME: these are sub-optimal, ideally the `for<...>` would be printed.
+    t!(for<'a> fn(&'a u32), "fn(&'_ u32)");
+    t!(for<'a, 'b> fn(&'a u32, &'b u32), "fn(&'_ u32, &'_ u32)");
+    t!(for<'a> fn(for<'b> fn(&'a u32, &'b u32)), "fn(fn(&'_ u32, &'_ u32))");
 
     struct S<'a, T>(&'a T);
     impl<'a, T: Clone> S<'a, T> {
         fn test() {
-            t!(Cow<'a, T>, "alloc::borrow::Cow<u32>");
+            t!(Cow<'a, T>, "alloc::borrow::Cow<'_, u32>");
         }
     }
     S::<u32>::test();
diff --git a/tests/ui/where-clauses/unsupported_attribute.stderr b/tests/ui/where-clauses/unsupported_attribute.stderr
index 411c895ed87..cdd6e82b98d 100644
--- a/tests/ui/where-clauses/unsupported_attribute.stderr
+++ b/tests/ui/where-clauses/unsupported_attribute.stderr
@@ -64,7 +64,7 @@ error: `#[deprecated]` attribute cannot be used on where predicates
 LL |     #[deprecated] T: Trait,
    |     ^^^^^^^^^^^^^
    |
-   = help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, crates
+   = help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, foreign statics, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, crates
 
 error: `#[deprecated]` attribute cannot be used on where predicates
   --> $DIR/unsupported_attribute.rs:25:5
@@ -72,7 +72,7 @@ error: `#[deprecated]` attribute cannot be used on where predicates
 LL |     #[deprecated] 'a: 'static,
    |     ^^^^^^^^^^^^^
    |
-   = help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, crates
+   = help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, foreign statics, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, crates
 
 error: `#[automatically_derived]` attribute cannot be used on where predicates
   --> $DIR/unsupported_attribute.rs:26:5