about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock9
-rw-r--r--compiler/rustc_abi/src/layout.rs581
-rw-r--r--compiler/rustc_arena/src/lib.rs48
-rw-r--r--compiler/rustc_ast/src/ast.rs4
-rw-r--r--compiler/rustc_ast/src/attr/mod.rs36
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs7
-rw-r--r--compiler/rustc_ast_lowering/src/format.rs18
-rw-r--r--compiler/rustc_ast_lowering/src/item.rs1
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs1
-rw-r--r--compiler/rustc_ast_pretty/src/pp.rs2
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs2
-rw-r--r--compiler/rustc_borrowck/src/lib.rs11
-rw-r--r--compiler/rustc_borrowck/src/member_constraints.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/.github/actions/github-release/README.md18
-rw-r--r--compiler/rustc_codegen_cranelift/.github/actions/github-release/action.yml13
-rw-r--r--compiler/rustc_codegen_cranelift/.github/actions/github-release/main.js162
-rw-r--r--compiler/rustc_codegen_cranelift/.github/actions/github-release/package-lock.json571
-rw-r--r--compiler/rustc_codegen_cranelift/.github/actions/github-release/package.json11
-rw-r--r--compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml7
-rw-r--r--compiler/rustc_codegen_cranelift/.github/workflows/main.yml62
-rw-r--r--compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml18
-rw-r--r--compiler/rustc_codegen_cranelift/Cargo.lock143
-rw-r--r--compiler/rustc_codegen_cranelift/Cargo.toml16
-rw-r--r--compiler/rustc_codegen_cranelift/Readme.md5
-rw-r--r--compiler/rustc_codegen_cranelift/build_sysroot/Cargo.lock28
-rw-r--r--compiler/rustc_codegen_cranelift/build_system/mod.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/build_system/tests.rs29
-rw-r--r--compiler/rustc_codegen_cranelift/example/alloc_example.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs3
-rw-r--r--compiler/rustc_codegen_cranelift/example/dst-field-align.rs41
-rw-r--r--compiler/rustc_codegen_cranelift/example/example.rs6
-rw-r--r--compiler/rustc_codegen_cranelift/example/issue-72793.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/example/issue-91827-extern-types.rs5
-rw-r--r--compiler/rustc_codegen_cranelift/example/mini_core.rs52
-rw-r--r--compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs3
-rw-r--r--compiler/rustc_codegen_cranelift/example/mod_bench.rs8
-rw-r--r--compiler/rustc_codegen_cranelift/example/std_example.rs27
-rw-r--r--compiler/rustc_codegen_cranelift/example/subslice-patterns-const-eval.rs11
-rw-r--r--compiler/rustc_codegen_cranelift/rust-toolchain2
-rw-r--r--compiler/rustc_codegen_cranelift/scripts/cargo-clif.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/scripts/rustc-clif.rs8
-rw-r--r--compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs8
-rwxr-xr-xcompiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh72
-rw-r--r--compiler/rustc_codegen_cranelift/src/abi/comments.rs32
-rw-r--r--compiler/rustc_codegen_cranelift/src/abi/mod.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/src/abi/returning.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/src/base.rs54
-rw-r--r--compiler/rustc_codegen_cranelift/src/cast.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/src/codegen_i128.rs147
-rw-r--r--compiler/rustc_codegen_cranelift/src/common.rs26
-rw-r--r--compiler/rustc_codegen_cranelift/src/concurrency_limiter.rs67
-rw-r--r--compiler/rustc_codegen_cranelift/src/constant.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/aot.rs6
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/jit.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/mod.rs29
-rw-r--r--compiler/rustc_codegen_cranelift/src/global_asm.rs1
-rw-r--r--compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs12
-rw-r--r--compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/src/lib.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/src/num.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/src/pretty_clif.rs57
-rw-r--r--compiler/rustc_codegen_cranelift/src/value_and_place.rs330
-rwxr-xr-xcompiler/rustc_codegen_cranelift/y.rs6
-rw-r--r--compiler/rustc_codegen_ssa/Cargo.toml4
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs84
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/mod.rs12
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/rvalue.rs11
-rw-r--r--compiler/rustc_const_eval/src/const_eval/machine.rs17
-rw-r--r--compiler/rustc_const_eval/src/interpret/operator.rs26
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/ops.rs2
-rw-r--r--compiler/rustc_data_structures/src/sharded.rs6
-rw-r--r--compiler/rustc_data_structures/src/sync.rs36
-rw-r--r--compiler/rustc_data_structures/src/sync/worker_local.rs180
-rw-r--r--compiler/rustc_data_structures/src/tagged_ptr/copy.rs9
-rw-r--r--compiler/rustc_data_structures/src/tagged_ptr/drop.rs8
-rw-r--r--compiler/rustc_feature/src/accepted.rs2
-rw-r--r--compiler/rustc_feature/src/active.rs6
-rw-r--r--compiler/rustc_feature/src/removed.rs2
-rw-r--r--compiler/rustc_hir/src/hir.rs78
-rw-r--r--compiler/rustc_hir_analysis/src/check/intrinsic.rs3
-rw-r--r--compiler/rustc_hir_analysis/src/check/region.rs2
-rw-r--r--compiler/rustc_hir_typeck/src/lib.rs18
-rw-r--r--compiler/rustc_hir_typeck/src/method/suggest.rs39
-rw-r--r--compiler/rustc_hir_typeck/src/op.rs48
-rw-r--r--compiler/rustc_hir_typeck/src/place_op.rs42
-rw-r--r--compiler/rustc_infer/src/traits/project.rs2
-rw-r--r--compiler/rustc_interface/src/util.rs6
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs181
-rw-r--r--compiler/rustc_metadata/src/creader.rs10
-rw-r--r--compiler/rustc_middle/src/hir/place.rs1
-rw-r--r--compiler/rustc_middle/src/middle/region.rs6
-rw-r--r--compiler/rustc_middle/src/mir/mod.rs27
-rw-r--r--compiler/rustc_middle/src/thir.rs1
-rw-r--r--compiler/rustc_middle/src/traits/mod.rs16
-rw-r--r--compiler/rustc_middle/src/traits/select.rs2
-rw-r--r--compiler/rustc_middle/src/traits/solve.rs2
-rw-r--r--compiler/rustc_middle/src/ty/adt.rs2
-rw-r--r--compiler/rustc_middle/src/ty/error.rs2
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs2
-rw-r--r--compiler/rustc_middle/src/ty/structural_impls.rs20
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs2
-rw-r--r--compiler/rustc_mir_transform/src/check_packed_ref.rs7
-rw-r--r--compiler/rustc_mir_transform/src/elaborate_drops.rs15
-rw-r--r--compiler/rustc_parse/messages.ftl72
-rw-r--r--compiler/rustc_parse/src/errors.rs224
-rw-r--r--compiler/rustc_parse/src/lib.rs17
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs12
-rw-r--r--compiler/rustc_parse/src/parser/item.rs119
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs15
-rw-r--r--compiler/rustc_parse/src/parser/pat.rs21
-rw-r--r--compiler/rustc_parse/src/parser/path.rs21
-rw-r--r--compiler/rustc_parse/src/parser/ty.rs30
-rw-r--r--compiler/rustc_parse/src/validate_attr.rs27
-rw-r--r--compiler/rustc_passes/messages.ftl43
-rw-r--r--compiler/rustc_passes/src/check_attr.rs32
-rw-r--r--compiler/rustc_passes/src/errors.rs160
-rw-r--r--compiler/rustc_passes/src/lib.rs2
-rw-r--r--compiler/rustc_passes/src/liveness.rs204
-rw-r--r--compiler/rustc_passes/src/stability.rs42
-rw-r--r--compiler/rustc_query_system/src/dep_graph/graph.rs96
-rw-r--r--compiler/rustc_resolve/src/late.rs6
-rw-r--r--compiler/rustc_serialize/src/opaque.rs136
-rw-r--r--compiler/rustc_serialize/src/serialize.rs69
-rw-r--r--compiler/rustc_session/src/options.rs2
-rw-r--r--compiler/rustc_span/src/symbol.rs3
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt.rs19
-rw-r--r--compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs58
-rw-r--r--compiler/rustc_trait_selection/src/solve/mod.rs22
-rw-r--r--compiler/rustc_transmute/src/lib.rs4
-rw-r--r--compiler/rustc_type_ir/src/structural_impls.rs35
-rw-r--r--library/alloc/src/collections/binary_heap/mod.rs4
-rw-r--r--library/alloc/src/collections/btree/map.rs76
-rw-r--r--library/alloc/src/collections/btree/set.rs26
-rw-r--r--library/alloc/src/collections/linked_list.rs6
-rw-r--r--library/alloc/src/collections/vec_deque/mod.rs2
-rw-r--r--library/alloc/src/rc.rs2
-rw-r--r--library/alloc/src/sync.rs2
-rw-r--r--library/alloc/src/vec/into_iter.rs2
-rw-r--r--library/core/src/array/mod.rs4
-rw-r--r--library/core/src/cell.rs2
-rw-r--r--library/core/src/cell/once.rs32
-rw-r--r--library/core/src/fmt/mod.rs255
-rw-r--r--library/core/src/fmt/rt.rs154
-rw-r--r--library/core/src/future/mod.rs1
-rw-r--r--library/core/src/intrinsics.rs16
-rw-r--r--library/core/src/iter/adapters/chain.rs2
-rw-r--r--library/core/src/iter/adapters/cloned.rs2
-rw-r--r--library/core/src/iter/adapters/copied.rs2
-rw-r--r--library/core/src/iter/adapters/enumerate.rs2
-rw-r--r--library/core/src/iter/adapters/flatten.rs2
-rw-r--r--library/core/src/iter/adapters/fuse.rs2
-rw-r--r--library/core/src/iter/adapters/rev.rs2
-rw-r--r--library/core/src/iter/range.rs20
-rw-r--r--library/core/src/marker.rs1
-rw-r--r--library/core/src/num/nonzero.rs8
-rw-r--r--library/core/src/option.rs18
-rw-r--r--library/core/src/panicking.rs2
-rw-r--r--library/core/src/primitive_docs.rs75
-rw-r--r--library/core/src/ptr/const_ptr.rs10
-rw-r--r--library/core/src/ptr/mod.rs243
-rw-r--r--library/core/src/ptr/mut_ptr.rs22
-rw-r--r--library/core/src/ptr/non_null.rs2
-rw-r--r--library/core/src/result.rs4
-rw-r--r--library/core/src/slice/iter/macros.rs2
-rw-r--r--library/core/src/sync/atomic.rs12
-rw-r--r--library/portable-simd/crates/core_simd/src/ops/deref.rs2
-rw-r--r--library/std/src/alloc.rs8
-rw-r--r--library/std/src/fs.rs5
-rw-r--r--library/std/src/io/mod.rs2
-rw-r--r--library/std/src/io/stdio.rs6
-rw-r--r--library/std/src/os/android/net.rs4
-rw-r--r--library/std/src/os/fd/owned.rs2
-rw-r--r--library/std/src/os/linux/net.rs4
-rw-r--r--library/std/src/os/net/linux_ext/addr.rs6
-rw-r--r--library/std/src/os/net/linux_ext/mod.rs2
-rw-r--r--library/std/src/os/unix/net/addr.rs4
-rw-r--r--library/std/src/os/unix/net/datagram.rs6
-rw-r--r--library/std/src/os/unix/net/listener.rs2
-rw-r--r--library/std/src/os/unix/net/stream.rs2
-rw-r--r--library/std/src/os/windows/io/handle.rs2
-rw-r--r--library/std/src/path.rs4
-rw-r--r--library/std/src/prelude/v1.rs8
-rw-r--r--library/std/src/primitive_docs.rs75
-rw-r--r--library/std/src/sync/mod.rs2
-rw-r--r--library/std/src/sync/once_lock.rs40
-rw-r--r--library/std/src/sys/common/thread_local/fast_local.rs4
-rw-r--r--library/std/src/sys/common/thread_local/os_local.rs2
-rw-r--r--library/std/src/sys/windows/fs.rs41
-rw-r--r--library/std/src/sys_common/thread_local_key.rs61
-rw-r--r--library/std/src/sys_common/thread_local_key/tests.rs20
-rw-r--r--library/std/src/thread/local.rs22
-rw-r--r--library/test/src/formatters/json.rs16
-rw-r--r--library/test/src/tests.rs100
-rw-r--r--library/test/src/types.rs5
-rw-r--r--src/bootstrap/bootstrap.py63
-rw-r--r--src/bootstrap/bootstrap_test.py8
-rw-r--r--src/bootstrap/builder.rs13
-rw-r--r--src/bootstrap/builder/tests.rs1
-rwxr-xr-xsrc/bootstrap/configure.py14
-rw-r--r--src/bootstrap/lib.rs6
-rw-r--r--src/bootstrap/metadata.rs42
-rw-r--r--src/bootstrap/test.rs505
-rw-r--r--src/bootstrap/tool.rs2
-rwxr-xr-xsrc/ci/scripts/install-awscli.sh7
-rw-r--r--src/doc/rustdoc/src/lints.md38
-rw-r--r--src/doc/rustdoc/src/scraped-examples.md4
-rw-r--r--src/doc/style-guide/src/statements.md37
-rw-r--r--src/doc/unstable-book/src/language-features/intrinsics.md2
-rw-r--r--src/etc/lldb_providers.py2
-rw-r--r--src/librustdoc/clean/mod.rs10
-rw-r--r--src/librustdoc/clean/types.rs73
-rw-r--r--src/librustdoc/doctest.rs5
-rw-r--r--src/librustdoc/html/render/mod.rs56
-rw-r--r--src/librustdoc/html/render/print_item.rs25
-rw-r--r--src/librustdoc/json/conversions.rs7
-rw-r--r--src/librustdoc/lib.rs12
-rw-r--r--src/librustdoc/lint.rs12
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs30
-rw-r--r--src/librustdoc/passes/lint.rs2
-rw-r--r--src/librustdoc/passes/lint/unescaped_backticks.rs416
-rw-r--r--src/stage0.json796
-rw-r--r--src/tools/compiletest/src/common.rs37
-rw-r--r--src/tools/compiletest/src/header.rs16
-rw-r--r--src/tools/compiletest/src/header/cfg.rs6
-rw-r--r--src/tools/compiletest/src/runtest.rs35
-rw-r--r--src/tools/miri/src/operator.rs11
-rw-r--r--src/tools/miri/tests/fail/panic/double_panic.stderr54
-rw-r--r--src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs6
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/src/builtin_fn_macro.rs6
-rw-r--r--src/tools/tidy/src/deps.rs10
-rw-r--r--tests/codegen/intrinsics/offset.rs34
-rw-r--r--tests/codegen/issues/issue-103840.rs1
-rw-r--r--tests/codegen/issues/issue-105386-ub-in-debuginfo.rs3
-rw-r--r--tests/codegen/issues/issue-86106.rs29
-rw-r--r--tests/debuginfo/thread.rs2
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir2
-rw-r--r--tests/mir-opt/issue_41888.main.ElaborateDrops.diff2
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff4
-rw-r--r--tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff6
-rw-r--r--tests/mir-opt/lower_intrinsics.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.rs27
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir105
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir134
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir26
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir20
-rw-r--r--tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff24
-rw-r--r--tests/run-make/core-no-oom-handling/Makefile6
-rw-r--r--tests/run-make/inaccessible-temp-dir/Makefile32
-rw-r--r--tests/run-make/inaccessible-temp-dir/program.rs1
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-test.stderr (renamed from tests/rustdoc-ui/check-cfg-test.stderr)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs (renamed from tests/rustdoc-ui/check-cfg-unstable.rs)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr (renamed from tests/rustdoc-ui/check-cfg-unstable.stderr)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.rs (renamed from tests/rustdoc-ui/check-cfg.rs)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.stderr (renamed from tests/rustdoc-ui/check-cfg.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/auxiliary/extern_macros.rs (renamed from tests/rustdoc-ui/auxiliary/extern_macros.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/block-doc-comment.rs (renamed from tests/rustdoc-ui/block-doc-comment.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/block-doc-comment.stdout (renamed from tests/rustdoc-ui/block-doc-comment.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/cfg-test.rs (renamed from tests/rustdoc-ui/cfg-test.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/cfg-test.stdout (renamed from tests/rustdoc-ui/cfg-test.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/check-attr-test.rs (renamed from tests/rustdoc-ui/check-attr-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/check-attr-test.stderr (renamed from tests/rustdoc-ui/check-attr-test.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.rs (renamed from tests/rustdoc-ui/check-cfg-test.rs)4
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.stderr11
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.stdout (renamed from tests/rustdoc-ui/check-cfg-test.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/display-output.rs (renamed from tests/rustdoc-ui/display-output.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/display-output.stdout (renamed from tests/rustdoc-ui/display-output.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs (renamed from tests/rustdoc-ui/doc-comment-multi-line-attr.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.stdout (renamed from tests/rustdoc-ui/doc-comment-multi-line-attr.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs (renamed from tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.stdout (renamed from tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr-pass.rs (renamed from tests/rustdoc-ui/doc-test-attr-pass.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr.rs (renamed from tests/rustdoc-ui/doc-test-attr.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr.stderr (renamed from tests/rustdoc-ui/doc-test-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs (renamed from tests/rustdoc-ui/doc-test-doctest-feature.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-doctest-feature.stdout (renamed from tests/rustdoc-ui/doc-test-doctest-feature.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs (renamed from tests/rustdoc-ui/doc-test-rustdoc-feature.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.stdout (renamed from tests/rustdoc-ui/doc-test-rustdoc-feature.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-edition.rs (renamed from tests/rustdoc-ui/doctest-edition.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-edition.stderr (renamed from tests/rustdoc-ui/doctest-edition.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs (renamed from tests/rustdoc-ui/doctest-multiline-crate-attribute.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.stdout (renamed from tests/rustdoc-ui/doctest-multiline-crate-attribute.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.rs (renamed from tests/rustdoc-ui/doctest-output.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.stdout (renamed from tests/rustdoc-ui/doctest-output.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs (renamed from tests/rustdoc-ui/failed-doctest-compile-fail.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-compile-fail.stdout (renamed from tests/rustdoc-ui/failed-doctest-compile-fail.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs (renamed from tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout (renamed from tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs (renamed from tests/rustdoc-ui/failed-doctest-missing-codes.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout (renamed from tests/rustdoc-ui/failed-doctest-missing-codes.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs (renamed from tests/rustdoc-ui/failed-doctest-output-windows.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout (renamed from tests/rustdoc-ui/failed-doctest-output-windows.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output.rs (renamed from tests/rustdoc-ui/failed-doctest-output.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output.stdout (renamed from tests/rustdoc-ui/failed-doctest-output.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs (renamed from tests/rustdoc-ui/failed-doctest-should-panic.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout (renamed from tests/rustdoc-ui/failed-doctest-should-panic.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag-error.rs (renamed from tests/rustdoc-ui/no-run-flag-error.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag-error.stderr (renamed from tests/rustdoc-ui/no-run-flag-error.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag.rs (renamed from tests/rustdoc-ui/no-run-flag.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag.stdout (renamed from tests/rustdoc-ui/no-run-flag.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.rs (renamed from tests/rustdoc-ui/nocapture-fail.rs)4
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.stderr (renamed from tests/rustdoc-ui/nocapture-fail.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.stdout (renamed from tests/rustdoc-ui/nocapture-fail.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture.rs (renamed from tests/rustdoc-ui/nocapture.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/nocapture.stderr (renamed from tests/rustdoc-ui/nocapture.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture.stdout (renamed from tests/rustdoc-ui/nocapture.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/private-doc-test.rs (renamed from tests/rustdoc-ui/private-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/private-item-doc-test.rs (renamed from tests/rustdoc-ui/private-item-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/private-item-doc-test.stderr (renamed from tests/rustdoc-ui/private-item-doc-test.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/private-public-item-doc-test.rs (renamed from tests/rustdoc-ui/private-public-item-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr (renamed from tests/rustdoc-ui/private-public-item-doc-test.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs (renamed from tests/rustdoc-ui/public-reexported-item-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/run-directory.correct.stdout (renamed from tests/rustdoc-ui/run-directory.correct.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/run-directory.incorrect.stdout (renamed from tests/rustdoc-ui/run-directory.incorrect.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/run-directory.rs (renamed from tests/rustdoc-ui/run-directory.rs)6
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail1.rs (renamed from tests/rustdoc-ui/test-compile-fail1.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail1.stderr (renamed from tests/rustdoc-ui/test-compile-fail1.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail2.rs (renamed from tests/rustdoc-ui/test-compile-fail2.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail2.stderr (renamed from tests/rustdoc-ui/test-compile-fail2.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail3.rs (renamed from tests/rustdoc-ui/test-compile-fail3.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail3.stderr (renamed from tests/rustdoc-ui/test-compile-fail3.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/test-no_std.rs (renamed from tests/rustdoc-ui/test-no_std.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/test-no_std.stdout (renamed from tests/rustdoc-ui/test-no_std.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/test-type.rs (renamed from tests/rustdoc-ui/test-type.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/test-type.stdout (renamed from tests/rustdoc-ui/test-type.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/unparseable-doc-test.rs (renamed from tests/rustdoc-ui/unparseable-doc-test.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/unparseable-doc-test.stdout (renamed from tests/rustdoc-ui/unparseable-doc-test.stdout)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs (renamed from tests/rustdoc-ui/generate-link-to-definition-opt-unstable.rs)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.stderr (renamed from tests/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs (renamed from tests/rustdoc-ui/generate-link-to-definition-opt.rs)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.stderr (renamed from tests/rustdoc-ui/generate-link-to-definition-opt.stderr)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs (renamed from tests/rustdoc-ui/generate-link-to-definition-opt2.rs)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.stderr (renamed from tests/rustdoc-ui/generate-link-to-definition-opt2.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs (renamed from tests/rustdoc-ui/assoc-item-not-in-scope.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr (renamed from tests/rustdoc-ui/assoc-item-not-in-scope.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.rs (renamed from tests/rustdoc-ui/deny-intra-link-resolution-failure.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr (renamed from tests/rustdoc-ui/deny-intra-link-resolution-failure.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/pub-export-lint.rs (renamed from tests/rustdoc-ui/pub-export-lint.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/pub-export-lint.stderr (renamed from tests/rustdoc-ui/pub-export-lint.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs (renamed from tests/rustdoc-ui/reference-link-reports-error-once.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr (renamed from tests/rustdoc-ui/reference-link-reports-error-once.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-links.rs (renamed from tests/rustdoc-ui/reference-links.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-links.stderr (renamed from tests/rustdoc-ui/reference-links.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/empty-fn.rs (renamed from tests/rustdoc-ui/auxiliary/empty-fn.rs)0
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/issue-61592.rs (renamed from tests/rustdoc-ui/auxiliary/issue-61592.rs)0
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/panic-handler.rs (renamed from tests/rustdoc-ui/auxiliary/panic-handler.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-101076.rs (renamed from tests/rustdoc-ui/issue-101076.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.rs (renamed from tests/rustdoc-ui/issue-102986.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.stderr (renamed from tests/rustdoc-ui/issue-102986.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-103997.rs (renamed from tests/rustdoc-ui/issue-103997.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-103997.stderr (renamed from tests/rustdoc-ui/issue-103997.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.rs (renamed from tests/rustdoc-ui/issue-105334.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.stderr (renamed from tests/rustdoc-ui/issue-105334.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.rs (renamed from tests/rustdoc-ui/issue-105737.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.stderr (renamed from tests/rustdoc-ui/issue-105737.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.rs (renamed from tests/rustdoc-ui/issue-105742.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.stderr (renamed from tests/rustdoc-ui/issue-105742.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.rs (renamed from tests/rustdoc-ui/issue-106213.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.stderr (renamed from tests/rustdoc-ui/issue-106213.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.rs (renamed from tests/rustdoc-ui/issue-106226.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.stderr (renamed from tests/rustdoc-ui/issue-106226.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-107918.rs (renamed from tests/rustdoc-ui/issue-107918.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs (renamed from tests/rustdoc-ui/issue-109282-import-inline-merge.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-110900.rs28
-rw-r--r--tests/rustdoc-ui/issues/issue-58473-2.rs (renamed from tests/rustdoc-ui/issue-58473-2.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-58473.rs (renamed from tests/rustdoc-ui/issue-58473.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.rs (renamed from tests/rustdoc-ui/issue-61592-2.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.stderr (renamed from tests/rustdoc-ui/issue-61592-2.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.rs (renamed from tests/rustdoc-ui/issue-61592.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.stderr (renamed from tests/rustdoc-ui/issue-61592.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.rs (renamed from tests/rustdoc-ui/issue-61732.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.stderr (renamed from tests/rustdoc-ui/issue-61732.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.private.stderr (renamed from tests/rustdoc-ui/issue-74134.private.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.public.stderr (renamed from tests/rustdoc-ui/issue-74134.public.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.rs (renamed from tests/rustdoc-ui/issue-74134.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.rs (renamed from tests/rustdoc-ui/issue-79465.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.stderr (renamed from tests/rustdoc-ui/issue-79465.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.rs (renamed from tests/rustdoc-ui/issue-79467.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.stderr (renamed from tests/rustdoc-ui/issue-79467.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.rs (renamed from tests/rustdoc-ui/issue-79494.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.stderr (renamed from tests/rustdoc-ui/issue-79494.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-80992.rs (renamed from tests/rustdoc-ui/issue-80992.rs)2
-rw-r--r--tests/rustdoc-ui/issues/issue-80992.stdout (renamed from tests/rustdoc-ui/issue-80992.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.rs (renamed from tests/rustdoc-ui/issue-81662-shortness.rs)2
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.stdout (renamed from tests/rustdoc-ui/issue-81662-shortness.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.rs (renamed from tests/rustdoc-ui/issue-83883-describe-lints.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout (renamed from tests/rustdoc-ui/issue-83883-describe-lints.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91134.rs (renamed from tests/rustdoc-ui/issue-91134.rs)2
-rw-r--r--tests/rustdoc-ui/issues/issue-91134.stdout (renamed from tests/rustdoc-ui/issue-91134.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.rs (renamed from tests/rustdoc-ui/issue-91713.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stderr (renamed from tests/rustdoc-ui/issue-91713.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stdout (renamed from tests/rustdoc-ui/issue-91713.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.rs (renamed from tests/rustdoc-ui/issue-96287.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.stderr (renamed from tests/rustdoc-ui/issue-96287.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-98690.rs (renamed from tests/rustdoc-ui/issue-98690.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-98690.stderr (renamed from tests/rustdoc-ui/issue-98690.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/bare-urls.fixed (renamed from tests/rustdoc-ui/bare-urls.fixed)0
-rw-r--r--tests/rustdoc-ui/lints/bare-urls.rs (renamed from tests/rustdoc-ui/bare-urls.rs)0
-rw-r--r--tests/rustdoc-ui/lints/bare-urls.stderr (renamed from tests/rustdoc-ui/bare-urls.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/check-attr.rs (renamed from tests/rustdoc-ui/check-attr.rs)0
-rw-r--r--tests/rustdoc-ui/lints/check-attr.stderr (renamed from tests/rustdoc-ui/check-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/check-fail.rs (renamed from tests/rustdoc-ui/check-fail.rs)0
-rw-r--r--tests/rustdoc-ui/lints/check-fail.stderr (renamed from tests/rustdoc-ui/check-fail.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/check.rs (renamed from tests/rustdoc-ui/check.rs)0
-rw-r--r--tests/rustdoc-ui/lints/check.stderr (renamed from tests/rustdoc-ui/check.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-crate.rs (renamed from tests/rustdoc-ui/deny-missing-docs-crate.rs)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr (renamed from tests/rustdoc-ui/deny-missing-docs-crate.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-macro.rs (renamed from tests/rustdoc-ui/deny-missing-docs-macro.rs)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr (renamed from tests/rustdoc-ui/deny-missing-docs-macro.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc-attr.rs (renamed from tests/rustdoc-ui/doc-attr.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc-attr.stderr (renamed from tests/rustdoc-ui/doc-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.fixed (renamed from tests/rustdoc-ui/doc-spotlight.fixed)0
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.rs (renamed from tests/rustdoc-ui/doc-spotlight.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.stderr (renamed from tests/rustdoc-ui/doc-spotlight.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc-without-codeblock.rs (renamed from tests/rustdoc-ui/doc-without-codeblock.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc-without-codeblock.stderr (renamed from tests/rustdoc-ui/doc-without-codeblock.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc_cfg_hide.rs (renamed from tests/rustdoc-ui/doc_cfg_hide.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc_cfg_hide.stderr (renamed from tests/rustdoc-ui/doc_cfg_hide.stderr)2
-rw-r--r--tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs (renamed from tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs)0
-rw-r--r--tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr (renamed from tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs (renamed from tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs)0
-rw-r--r--tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr (renamed from tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-doc-attr.rs (renamed from tests/rustdoc-ui/invalid-doc-attr.rs)2
-rw-r--r--tests/rustdoc-ui/lints/invalid-doc-attr.stderr (renamed from tests/rustdoc-ui/invalid-doc-attr.stderr)2
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs (renamed from tests/rustdoc-ui/invalid-html-self-closing-tag.rs)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr (renamed from tests/rustdoc-ui/invalid-html-self-closing-tag.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-tags.rs (renamed from tests/rustdoc-ui/invalid-html-tags.rs)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-tags.stderr (renamed from tests/rustdoc-ui/invalid-html-tags.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/lint-group.rs (renamed from tests/rustdoc-ui/lint-group.rs)0
-rw-r--r--tests/rustdoc-ui/lints/lint-group.stderr (renamed from tests/rustdoc-ui/lint-group.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs (renamed from tests/rustdoc-ui/lint-missing-doc-code-example.rs)0
-rw-r--r--tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr (renamed from tests/rustdoc-ui/lint-missing-doc-code-example.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs (renamed from tests/rustdoc-ui/no-crate-level-doc-lint.rs)0
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr (renamed from tests/rustdoc-ui/no-crate-level-doc-lint.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/renamed-lint-still-applies.rs (renamed from tests/rustdoc-ui/renamed-lint-still-applies.rs)0
-rw-r--r--tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr (renamed from tests/rustdoc-ui/renamed-lint-still-applies.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs (renamed from tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs)0
-rw-r--r--tests/rustdoc-ui/lints/unknown-renamed-lints.rs (renamed from tests/rustdoc-ui/unknown-renamed-lints.rs)0
-rw-r--r--tests/rustdoc-ui/lints/unknown-renamed-lints.stderr (renamed from tests/rustdoc-ui/unknown-renamed-lints.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/unused-braces-lint.rs (renamed from tests/rustdoc-ui/unused-braces-lint.rs)0
-rw-r--r--tests/rustdoc-ui/lints/unused.rs (renamed from tests/rustdoc-ui/unused.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs (renamed from tests/rustdoc-ui/scrape-examples-fail-if-type-error.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.stderr (renamed from tests/rustdoc-ui/scrape-examples-fail-if-type-error.stderr)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs (renamed from tests/rustdoc-ui/scrape-examples-ice.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-1.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.stderr (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-1.stderr)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-2.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.stderr (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-2.stderr)0
-rw-r--r--tests/rustdoc-ui/unescaped_backticks.rs342
-rw-r--r--tests/rustdoc-ui/unescaped_backticks.stderr959
-rw-r--r--tests/rustdoc/deref/deref-const-fn.rs (renamed from tests/rustdoc/deref-const-fn.rs)0
-rw-r--r--tests/rustdoc/deref/deref-multiple-impl-blocks.rs43
-rw-r--r--tests/rustdoc/deref/deref-mut-methods.rs (renamed from tests/rustdoc/deref-mut-methods.rs)0
-rw-r--r--tests/rustdoc/deref/deref-recursive-pathbuf.rs (renamed from tests/rustdoc/deref-recursive-pathbuf.rs)0
-rw-r--r--tests/rustdoc/deref/deref-recursive.rs (renamed from tests/rustdoc/deref-recursive.rs)0
-rw-r--r--tests/rustdoc/deref/deref-slice-core.rs (renamed from tests/rustdoc/deref-slice-core.rs)0
-rw-r--r--tests/rustdoc/deref/deref-to-primitive.rs (renamed from tests/rustdoc/deref-to-primitive.rs)0
-rw-r--r--tests/rustdoc/deref/deref-typedef.rs (renamed from tests/rustdoc/deref-typedef.rs)0
-rw-r--r--tests/rustdoc/deref/escape-deref-methods.rs (renamed from tests/rustdoc/escape-deref-methods.rs)0
-rw-r--r--tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs (renamed from tests/rustdoc/issue-100679-sidebar-links-deref.rs)0
-rw-r--r--tests/rustdoc/deref/recursive-deref-sidebar.rs (renamed from tests/rustdoc/recursive-deref-sidebar.rs)0
-rw-r--r--tests/rustdoc/deref/recursive-deref.rs (renamed from tests/rustdoc/recursive-deref.rs)0
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/repr.rs22
-rw-r--r--tests/rustdoc/inline_cross/repr.rs29
-rw-r--r--tests/rustdoc/issue-106142.rs14
-rw-r--r--tests/ui/async-await/future-sizes/async-awaiting-fut.stdout40
-rw-r--r--tests/ui/async-await/future-sizes/large-arg.stdout24
-rw-r--r--tests/ui/async-await/in-trait/nested-rpit.rs4
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.rs48
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.stderr45
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.rs50
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.stderr19
-rw-r--r--tests/ui/attributes/invalid-doc-attr.rs2
-rw-r--r--tests/ui/attributes/invalid-doc-attr.stderr2
-rw-r--r--tests/ui/attributes/invalid_macro_export_argument.deny.stderr20
-rw-r--r--tests/ui/attributes/invalid_macro_export_argument.rs13
-rw-r--r--tests/ui/attributes/invalid_macro_export_argument.stderr16
-rw-r--r--tests/ui/binding/issue-53114-safety-checks.stderr18
-rw-r--r--tests/ui/binop/eq-arr.rs7
-rw-r--r--tests/ui/binop/eq-arr.stderr22
-rw-r--r--tests/ui/binop/eq-vec.rs13
-rw-r--r--tests/ui/binop/eq-vec.stderr24
-rw-r--r--tests/ui/binop/issue-28837.stderr60
-rw-r--r--tests/ui/binop/issue-3820.stderr4
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr3
-rw-r--r--tests/ui/coherence/coherence-overlap-negative-impls.rs41
-rw-r--r--tests/ui/const-ptr/forbidden_slices.stderr4
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.64bit.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-enum.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-struct.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr4
-rw-r--r--tests/ui/derives/deriving-no-inner-impl-error-message.stderr4
-rw-r--r--tests/ui/destructuring-assignment/note-unsupported.stderr4
-rw-r--r--tests/ui/feature-gates/test-listing-format-json.rs18
-rw-r--r--tests/ui/feature-gates/test-listing-format-json.run.stderr1
-rw-r--r--tests/ui/fmt/ifmt-bad-arg.stderr4
-rw-r--r--tests/ui/fmt/ifmt-unimpl.stderr6
-rw-r--r--tests/ui/fmt/send-sync.stderr28
-rw-r--r--tests/ui/generator/issue-110929-generator-conflict-error-ice.rs12
-rw-r--r--tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr18
-rw-r--r--tests/ui/generic-associated-types/self-outlives-lint.rs2
-rw-r--r--tests/ui/io-checks/inaccessbile-temp-dir.rs39
-rw-r--r--tests/ui/io-checks/inaccessbile-temp-dir.stderr4
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs16
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr2
-rw-r--r--tests/ui/issues/issue-62375.stderr13
-rw-r--r--tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr40
-rw-r--r--tests/ui/lint/unaligned_references.stderr30
-rw-r--r--tests/ui/lint/unaligned_references_external_macro.stderr3
-rw-r--r--tests/ui/lint/unused/lint-unused-mut-variables.rs8
-rw-r--r--tests/ui/lint/unused/lint-unused-mut-variables.stderr10
-rw-r--r--tests/ui/macros/missing-bang-in-decl.stderr14
-rw-r--r--tests/ui/methods/method-not-found-generic-arg-elision.rs4
-rw-r--r--tests/ui/methods/method-not-found-generic-arg-elision.stderr6
-rw-r--r--tests/ui/mismatched_types/assignment-operator-unimplemented.stderr4
-rw-r--r--tests/ui/native-library-link-flags/msvc-non-utf8-output.rs6
-rw-r--r--tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr7
-rw-r--r--tests/ui/or-patterns/or-patterns-syntactic-fail.stderr4
-rw-r--r--tests/ui/packed/issue-27060.stderr12
-rw-r--r--tests/ui/packed/packed-struct-borrow-element-64bit.stderr3
-rw-r--r--tests/ui/packed/packed-struct-borrow-element.stderr6
-rw-r--r--tests/ui/panics/fmt-only-once.rs21
-rw-r--r--tests/ui/panics/fmt-only-once.run.stderr3
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.fixed28
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.rs28
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.stderr28
-rw-r--r--tests/ui/parser/recover-unticked-labels.stderr8
-rw-r--r--tests/ui/parser/use-colon-as-mod-sep.stderr6
-rw-r--r--tests/ui/print_type_sizes/async.stdout8
-rw-r--r--tests/ui/print_type_sizes/generator.stdout8
-rw-r--r--tests/ui/span/issue-39018.stderr4
-rw-r--r--tests/ui/specialization/issue-40582.rs35
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.rs30
-rw-r--r--tests/ui/structs-enums/type-sizes.rs67
-rw-r--r--tests/ui/suggestions/invalid-bin-op.stderr4
-rw-r--r--tests/ui/suggestions/restrict-type-not-param.stderr4
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed2
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs2
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr10
-rw-r--r--tests/ui/test-attrs/tests-listing-format-json.rs1
-rw-r--r--tests/ui/test-attrs/tests-listing-format-json.run.stdout6
-rw-r--r--tests/ui/thread-local/thread-local-static-ref-use-after-free.rs46
-rw-r--r--tests/ui/traits/new-solver/exponential-trait-goals.rs20
-rw-r--r--tests/ui/traits/new-solver/exponential-trait-goals.stderr23
-rw-r--r--tests/ui/type/type-unsatisfiable.usage.stderr4
547 files changed, 8177 insertions, 4150 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 06a2a36f455..cc539fb0a43 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1956,9 +1956,9 @@ dependencies = [
 
 [[package]]
 name = "libffi-sys"
-version = "2.2.1"
+version = "2.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc65067b78c0fc069771e8b9a9e02df71e08858bec92c1f101377c67b9dca7c7"
+checksum = "f36115160c57e8529781b4183c2bb51fdc1f6d6d1ed345591d84be7703befb3c"
 dependencies = [
  "cc",
 ]
@@ -2370,9 +2370,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
 
 [[package]]
 name = "openssl-sys"
-version = "0.9.84"
+version = "0.9.87"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a20eace9dc2d82904039cb76dcf50fb1a0bba071cfd1629720b5d6f1ddba0fa"
+checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e"
 dependencies = [
  "cc",
  "libc",
@@ -3250,6 +3250,7 @@ dependencies = [
  "tempfile",
  "thorin-dwp",
  "tracing",
+ "windows 0.46.0",
 ]
 
 [[package]]
diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs
index f3af031ade4..b4597d5bc78 100644
--- a/compiler/rustc_abi/src/layout.rs
+++ b/compiler/rustc_abi/src/layout.rs
@@ -1,4 +1,5 @@
 use super::*;
+use std::fmt::Write;
 use std::{borrow::Borrow, cmp, iter, ops::Bound};
 
 #[cfg(feature = "randomize")]
@@ -49,220 +50,60 @@ pub trait LayoutCalculator {
         repr: &ReprOptions,
         kind: StructKind,
     ) -> Option<LayoutS> {
-        let pack = repr.pack;
-        let mut align = if pack.is_some() { dl.i8_align } else { dl.aggregate_align };
-        let mut inverse_memory_index: IndexVec<u32, FieldIdx> = fields.indices().collect();
-        let optimize = !repr.inhibit_struct_field_reordering_opt();
-        if optimize {
-            let end =
-                if let StructKind::MaybeUnsized = kind { fields.len() - 1 } else { fields.len() };
-            let optimizing = &mut inverse_memory_index.raw[..end];
-            let effective_field_align = |layout: Layout<'_>| {
-                if let Some(pack) = pack {
-                    // return the packed alignment in bytes
-                    layout.align().abi.min(pack).bytes()
-                } else {
-                    // returns log2(effective-align).
-                    // This is ok since `pack` applies to all fields equally.
-                    // The calculation assumes that size is an integer multiple of align, except for ZSTs.
-                    //
-                    // group [u8; 4] with align-4 or [u8; 6] with align-2 fields
-                    layout.align().abi.bytes().max(layout.size().bytes()).trailing_zeros() as u64
-                }
-            };
-
-            // If `-Z randomize-layout` was enabled for the type definition we can shuffle
-            // the field ordering to try and catch some code making assumptions about layouts
-            // we don't guarantee
-            if repr.can_randomize_type_layout() && cfg!(feature = "randomize") {
-                #[cfg(feature = "randomize")]
-                {
-                    // `ReprOptions.layout_seed` is a deterministic seed that we can use to
-                    // randomize field ordering with
-                    let mut rng =
-                        Xoshiro128StarStar::seed_from_u64(repr.field_shuffle_seed.as_u64());
-
-                    // Shuffle the ordering of the fields
-                    optimizing.shuffle(&mut rng);
-                }
-                // Otherwise we just leave things alone and actually optimize the type's fields
-            } else {
-                match kind {
-                    StructKind::AlwaysSized | StructKind::MaybeUnsized => {
-                        optimizing.sort_by_key(|&x| {
-                            // Place ZSTs first to avoid "interesting offsets",
-                            // especially with only one or two non-ZST fields.
-                            // Then place largest alignments first, largest niches within an alignment group last
-                            let f = fields[x];
-                            let niche_size = f.largest_niche().map_or(0, |n| n.available(dl));
-                            (!f.0.is_zst(), cmp::Reverse(effective_field_align(f)), niche_size)
-                        });
-                    }
-
-                    StructKind::Prefixed(..) => {
-                        // Sort in ascending alignment so that the layout stays optimal
-                        // regardless of the prefix.
-                        // And put the largest niche in an alignment group at the end
-                        // so it can be used as discriminant in jagged enums
-                        optimizing.sort_by_key(|&x| {
-                            let f = fields[x];
-                            let niche_size = f.largest_niche().map_or(0, |n| n.available(dl));
-                            (effective_field_align(f), niche_size)
-                        });
+        let layout = univariant(self, dl, fields, repr, kind, NicheBias::Start);
+        // Enums prefer niches close to the beginning or the end of the variants so that other (smaller)
+        // data-carrying variants can be packed into the space after/before the niche.
+        // If the default field ordering does not give us a niche at the front then we do a second
+        // run and bias niches to the right and then check which one is closer to one of the struct's
+        // edges.
+        if let Some(layout) = &layout {
+            if let Some(niche) = layout.largest_niche {
+                let head_space = niche.offset.bytes();
+                let niche_length = niche.value.size(dl).bytes();
+                let tail_space = layout.size.bytes() - head_space - niche_length;
+
+                // This may end up doing redundant work if the niche is already in the last field
+                // (e.g. a trailing bool) and there is tail padding. But it's non-trivial to get
+                // the unpadded size so we try anyway.
+                if fields.len() > 1 && head_space != 0 && tail_space > 0 {
+                    let alt_layout = univariant(self, dl, fields, repr, kind, NicheBias::End)
+                        .expect("alt layout should always work");
+                    let niche = alt_layout
+                        .largest_niche
+                        .expect("alt layout should have a niche like the regular one");
+                    let alt_head_space = niche.offset.bytes();
+                    let alt_niche_len = niche.value.size(dl).bytes();
+                    let alt_tail_space = alt_layout.size.bytes() - alt_head_space - alt_niche_len;
+
+                    debug_assert_eq!(layout.size.bytes(), alt_layout.size.bytes());
+
+                    let prefer_alt_layout =
+                        alt_head_space > head_space && alt_head_space > tail_space;
+
+                    debug!(
+                        "sz: {}, default_niche_at: {}+{}, default_tail_space: {}, alt_niche_at/head_space: {}+{}, alt_tail: {}, num_fields: {}, better: {}\n\
+                        layout: {}\n\
+                        alt_layout: {}\n",
+                        layout.size.bytes(),
+                        head_space,
+                        niche_length,
+                        tail_space,
+                        alt_head_space,
+                        alt_niche_len,
+                        alt_tail_space,
+                        layout.fields.count(),
+                        prefer_alt_layout,
+                        format_field_niches(&layout, &fields, &dl),
+                        format_field_niches(&alt_layout, &fields, &dl),
+                    );
+
+                    if prefer_alt_layout {
+                        return Some(alt_layout);
                     }
                 }
-
-                // FIXME(Kixiron): We can always shuffle fields within a given alignment class
-                //                 regardless of the status of `-Z randomize-layout`
             }
         }
-        // inverse_memory_index holds field indices by increasing memory offset.
-        // That is, if field 5 has offset 0, the first element of inverse_memory_index is 5.
-        // We now write field offsets to the corresponding offset slot;
-        // field 5 with offset 0 puts 0 in offsets[5].
-        // At the bottom of this function, we invert `inverse_memory_index` to
-        // produce `memory_index` (see `invert_mapping`).
-        let mut sized = true;
-        let mut offsets = IndexVec::from_elem(Size::ZERO, &fields);
-        let mut offset = Size::ZERO;
-        let mut largest_niche = None;
-        let mut largest_niche_available = 0;
-        if let StructKind::Prefixed(prefix_size, prefix_align) = kind {
-            let prefix_align =
-                if let Some(pack) = pack { prefix_align.min(pack) } else { prefix_align };
-            align = align.max(AbiAndPrefAlign::new(prefix_align));
-            offset = prefix_size.align_to(prefix_align);
-        }
-        for &i in &inverse_memory_index {
-            let field = &fields[i];
-            if !sized {
-                self.delay_bug(&format!(
-                    "univariant: field #{} comes after unsized field",
-                    offsets.len(),
-                ));
-            }
-
-            if field.0.is_unsized() {
-                sized = false;
-            }
-
-            // Invariant: offset < dl.obj_size_bound() <= 1<<61
-            let field_align = if let Some(pack) = pack {
-                field.align().min(AbiAndPrefAlign::new(pack))
-            } else {
-                field.align()
-            };
-            offset = offset.align_to(field_align.abi);
-            align = align.max(field_align);
-
-            debug!("univariant offset: {:?} field: {:#?}", offset, field);
-            offsets[i] = offset;
-
-            if let Some(mut niche) = field.largest_niche() {
-                let available = niche.available(dl);
-                if available > largest_niche_available {
-                    largest_niche_available = available;
-                    niche.offset += offset;
-                    largest_niche = Some(niche);
-                }
-            }
-
-            offset = offset.checked_add(field.size(), dl)?;
-        }
-        if let Some(repr_align) = repr.align {
-            align = align.max(AbiAndPrefAlign::new(repr_align));
-        }
-        debug!("univariant min_size: {:?}", offset);
-        let min_size = offset;
-        // As stated above, inverse_memory_index holds field indices by increasing offset.
-        // This makes it an already-sorted view of the offsets vec.
-        // To invert it, consider:
-        // If field 5 has offset 0, offsets[0] is 5, and memory_index[5] should be 0.
-        // Field 5 would be the first element, so memory_index is i:
-        // Note: if we didn't optimize, it's already right.
-        let memory_index = if optimize {
-            inverse_memory_index.invert_bijective_mapping()
-        } else {
-            debug_assert!(inverse_memory_index.iter().copied().eq(fields.indices()));
-            inverse_memory_index.into_iter().map(FieldIdx::as_u32).collect()
-        };
-        let size = min_size.align_to(align.abi);
-        let mut abi = Abi::Aggregate { sized };
-        // Unpack newtype ABIs and find scalar pairs.
-        if sized && size.bytes() > 0 {
-            // All other fields must be ZSTs.
-            let mut non_zst_fields = fields.iter_enumerated().filter(|&(_, f)| !f.0.is_zst());
-
-            match (non_zst_fields.next(), non_zst_fields.next(), non_zst_fields.next()) {
-                // We have exactly one non-ZST field.
-                (Some((i, field)), None, None) => {
-                    // Field fills the struct and it has a scalar or scalar pair ABI.
-                    if offsets[i].bytes() == 0
-                        && align.abi == field.align().abi
-                        && size == field.size()
-                    {
-                        match field.abi() {
-                            // For plain scalars, or vectors of them, we can't unpack
-                            // newtypes for `#[repr(C)]`, as that affects C ABIs.
-                            Abi::Scalar(_) | Abi::Vector { .. } if optimize => {
-                                abi = field.abi();
-                            }
-                            // But scalar pairs are Rust-specific and get
-                            // treated as aggregates by C ABIs anyway.
-                            Abi::ScalarPair(..) => {
-                                abi = field.abi();
-                            }
-                            _ => {}
-                        }
-                    }
-                }
-
-                // Two non-ZST fields, and they're both scalars.
-                (Some((i, a)), Some((j, b)), None) => {
-                    match (a.abi(), b.abi()) {
-                        (Abi::Scalar(a), Abi::Scalar(b)) => {
-                            // Order by the memory placement, not source order.
-                            let ((i, a), (j, b)) = if offsets[i] < offsets[j] {
-                                ((i, a), (j, b))
-                            } else {
-                                ((j, b), (i, a))
-                            };
-                            let pair = self.scalar_pair(a, b);
-                            let pair_offsets = match pair.fields {
-                                FieldsShape::Arbitrary { ref offsets, ref memory_index } => {
-                                    assert_eq!(memory_index.raw, [0, 1]);
-                                    offsets
-                                }
-                                _ => panic!(),
-                            };
-                            if offsets[i] == pair_offsets[FieldIdx::from_usize(0)]
-                                && offsets[j] == pair_offsets[FieldIdx::from_usize(1)]
-                                && align == pair.align
-                                && size == pair.size
-                            {
-                                // We can use `ScalarPair` only when it matches our
-                                // already computed layout (including `#[repr(C)]`).
-                                abi = pair.abi;
-                            }
-                        }
-                        _ => {}
-                    }
-                }
-
-                _ => {}
-            }
-        }
-        if fields.iter().any(|f| f.abi().is_uninhabited()) {
-            abi = Abi::Uninhabited;
-        }
-        Some(LayoutS {
-            variants: Variants::Single { index: FIRST_VARIANT },
-            fields: FieldsShape::Arbitrary { offsets, memory_index },
-            abi,
-            largest_niche,
-            align,
-            size,
-        })
+        layout
     }
 
     fn layout_of_never_type(&self) -> LayoutS {
@@ -934,3 +775,323 @@ pub trait LayoutCalculator {
         })
     }
 }
+
+/// Determines towards which end of a struct layout optimizations will try to place the best niches.
+enum NicheBias {
+    Start,
+    End,
+}
+
+fn univariant(
+    this: &(impl LayoutCalculator + ?Sized),
+    dl: &TargetDataLayout,
+    fields: &IndexSlice<FieldIdx, Layout<'_>>,
+    repr: &ReprOptions,
+    kind: StructKind,
+    niche_bias: NicheBias,
+) -> Option<LayoutS> {
+    let pack = repr.pack;
+    let mut align = if pack.is_some() { dl.i8_align } else { dl.aggregate_align };
+    let mut inverse_memory_index: IndexVec<u32, FieldIdx> = fields.indices().collect();
+    let optimize = !repr.inhibit_struct_field_reordering_opt();
+    if optimize && fields.len() > 1 {
+        let end = if let StructKind::MaybeUnsized = kind { fields.len() - 1 } else { fields.len() };
+        let optimizing = &mut inverse_memory_index.raw[..end];
+
+        // If `-Z randomize-layout` was enabled for the type definition we can shuffle
+        // the field ordering to try and catch some code making assumptions about layouts
+        // we don't guarantee
+        if repr.can_randomize_type_layout() && cfg!(feature = "randomize") {
+            #[cfg(feature = "randomize")]
+            {
+                // `ReprOptions.layout_seed` is a deterministic seed that we can use to
+                // randomize field ordering with
+                let mut rng = Xoshiro128StarStar::seed_from_u64(repr.field_shuffle_seed.as_u64());
+
+                // Shuffle the ordering of the fields
+                optimizing.shuffle(&mut rng);
+            }
+            // Otherwise we just leave things alone and actually optimize the type's fields
+        } else {
+            let max_field_align = fields.iter().map(|f| f.align().abi.bytes()).max().unwrap_or(1);
+            let largest_niche_size = fields
+                .iter()
+                .filter_map(|f| f.largest_niche())
+                .map(|n| n.available(dl))
+                .max()
+                .unwrap_or(0);
+
+            // Calculates a sort key to group fields by their alignment or possibly some size-derived
+            // pseudo-alignment.
+            let alignment_group_key = |layout: Layout<'_>| {
+                if let Some(pack) = pack {
+                    // return the packed alignment in bytes
+                    layout.align().abi.min(pack).bytes()
+                } else {
+                    // returns log2(effective-align).
+                    // This is ok since `pack` applies to all fields equally.
+                    // The calculation assumes that size is an integer multiple of align, except for ZSTs.
+                    //
+                    let align = layout.align().abi.bytes();
+                    let size = layout.size().bytes();
+                    let niche_size = layout.largest_niche().map(|n| n.available(dl)).unwrap_or(0);
+                    // group [u8; 4] with align-4 or [u8; 6] with align-2 fields
+                    let size_as_align = align.max(size).trailing_zeros();
+                    let size_as_align = if largest_niche_size > 0 {
+                        match niche_bias {
+                            // Given `A(u8, [u8; 16])` and `B(bool, [u8; 16])` we want to bump the array
+                            // to the front in the first case (for aligned loads) but keep the bool in front
+                            // in the second case for its niches.
+                            NicheBias::Start => max_field_align.trailing_zeros().min(size_as_align),
+                            // When moving niches towards the end of the struct then for
+                            // A((u8, u8, u8, bool), (u8, bool, u8)) we want to keep the first tuple
+                            // in the align-1 group because its bool can be moved closer to the end.
+                            NicheBias::End if niche_size == largest_niche_size => {
+                                align.trailing_zeros()
+                            }
+                            NicheBias::End => size_as_align,
+                        }
+                    } else {
+                        size_as_align
+                    };
+                    size_as_align as u64
+                }
+            };
+
+            match kind {
+                StructKind::AlwaysSized | StructKind::MaybeUnsized => {
+                    // Currently `LayoutS` only exposes a single niche so sorting is usually sufficient
+                    // to get one niche into the preferred position. If it ever supported multiple niches
+                    // then a more advanced pick-and-pack approach could provide better results.
+                    // But even for the single-niche cache it's not optimal. E.g. for
+                    // A(u32, (bool, u8), u16) it would be possible to move the bool to the front
+                    // but it would require packing the tuple together with the u16 to build a 4-byte
+                    // group so that the u32 can be placed after it without padding. This kind
+                    // of packing can't be achieved by sorting.
+                    optimizing.sort_by_key(|&x| {
+                        let f = fields[x];
+                        let field_size = f.size().bytes();
+                        let niche_size = f.largest_niche().map_or(0, |n| n.available(dl));
+                        let niche_size_key = match niche_bias {
+                            // large niche first
+                            NicheBias::Start => !niche_size,
+                            // large niche last
+                            NicheBias::End => niche_size,
+                        };
+                        let inner_niche_offset_key = match niche_bias {
+                            NicheBias::Start => f.largest_niche().map_or(0, |n| n.offset.bytes()),
+                            NicheBias::End => f.largest_niche().map_or(0, |n| {
+                                !(field_size - n.value.size(dl).bytes() - n.offset.bytes())
+                            }),
+                        };
+
+                        (
+                            // Place ZSTs first to avoid "interesting offsets", especially with only one
+                            // or two non-ZST fields. This helps Scalar/ScalarPair layouts.
+                            !f.0.is_zst(),
+                            // Then place largest alignments first.
+                            cmp::Reverse(alignment_group_key(f)),
+                            // Then prioritize niche placement within alignment group according to
+                            // `niche_bias_start`.
+                            niche_size_key,
+                            // Then among fields with equally-sized niches prefer the ones
+                            // closer to the start/end of the field.
+                            inner_niche_offset_key,
+                        )
+                    });
+                }
+
+                StructKind::Prefixed(..) => {
+                    // Sort in ascending alignment so that the layout stays optimal
+                    // regardless of the prefix.
+                    // And put the largest niche in an alignment group at the end
+                    // so it can be used as discriminant in jagged enums
+                    optimizing.sort_by_key(|&x| {
+                        let f = fields[x];
+                        let niche_size = f.largest_niche().map_or(0, |n| n.available(dl));
+                        (alignment_group_key(f), niche_size)
+                    });
+                }
+            }
+
+            // FIXME(Kixiron): We can always shuffle fields within a given alignment class
+            //                 regardless of the status of `-Z randomize-layout`
+        }
+    }
+    // inverse_memory_index holds field indices by increasing memory offset.
+    // That is, if field 5 has offset 0, the first element of inverse_memory_index is 5.
+    // We now write field offsets to the corresponding offset slot;
+    // field 5 with offset 0 puts 0 in offsets[5].
+    // At the bottom of this function, we invert `inverse_memory_index` to
+    // produce `memory_index` (see `invert_mapping`).
+    let mut sized = true;
+    let mut offsets = IndexVec::from_elem(Size::ZERO, &fields);
+    let mut offset = Size::ZERO;
+    let mut largest_niche = None;
+    let mut largest_niche_available = 0;
+    if let StructKind::Prefixed(prefix_size, prefix_align) = kind {
+        let prefix_align =
+            if let Some(pack) = pack { prefix_align.min(pack) } else { prefix_align };
+        align = align.max(AbiAndPrefAlign::new(prefix_align));
+        offset = prefix_size.align_to(prefix_align);
+    }
+    for &i in &inverse_memory_index {
+        let field = &fields[i];
+        if !sized {
+            this.delay_bug(&format!(
+                "univariant: field #{} comes after unsized field",
+                offsets.len(),
+            ));
+        }
+
+        if field.0.is_unsized() {
+            sized = false;
+        }
+
+        // Invariant: offset < dl.obj_size_bound() <= 1<<61
+        let field_align = if let Some(pack) = pack {
+            field.align().min(AbiAndPrefAlign::new(pack))
+        } else {
+            field.align()
+        };
+        offset = offset.align_to(field_align.abi);
+        align = align.max(field_align);
+
+        debug!("univariant offset: {:?} field: {:#?}", offset, field);
+        offsets[i] = offset;
+
+        if let Some(mut niche) = field.largest_niche() {
+            let available = niche.available(dl);
+            // Pick up larger niches.
+            let prefer_new_niche = match niche_bias {
+                NicheBias::Start => available > largest_niche_available,
+                // if there are several niches of the same size then pick the last one
+                NicheBias::End => available >= largest_niche_available,
+            };
+            if prefer_new_niche {
+                largest_niche_available = available;
+                niche.offset += offset;
+                largest_niche = Some(niche);
+            }
+        }
+
+        offset = offset.checked_add(field.size(), dl)?;
+    }
+    if let Some(repr_align) = repr.align {
+        align = align.max(AbiAndPrefAlign::new(repr_align));
+    }
+    debug!("univariant min_size: {:?}", offset);
+    let min_size = offset;
+    // As stated above, inverse_memory_index holds field indices by increasing offset.
+    // This makes it an already-sorted view of the offsets vec.
+    // To invert it, consider:
+    // If field 5 has offset 0, offsets[0] is 5, and memory_index[5] should be 0.
+    // Field 5 would be the first element, so memory_index is i:
+    // Note: if we didn't optimize, it's already right.
+    let memory_index = if optimize {
+        inverse_memory_index.invert_bijective_mapping()
+    } else {
+        debug_assert!(inverse_memory_index.iter().copied().eq(fields.indices()));
+        inverse_memory_index.into_iter().map(FieldIdx::as_u32).collect()
+    };
+    let size = min_size.align_to(align.abi);
+    let mut abi = Abi::Aggregate { sized };
+    // Unpack newtype ABIs and find scalar pairs.
+    if sized && size.bytes() > 0 {
+        // All other fields must be ZSTs.
+        let mut non_zst_fields = fields.iter_enumerated().filter(|&(_, f)| !f.0.is_zst());
+
+        match (non_zst_fields.next(), non_zst_fields.next(), non_zst_fields.next()) {
+            // We have exactly one non-ZST field.
+            (Some((i, field)), None, None) => {
+                // Field fills the struct and it has a scalar or scalar pair ABI.
+                if offsets[i].bytes() == 0 && align.abi == field.align().abi && size == field.size()
+                {
+                    match field.abi() {
+                        // For plain scalars, or vectors of them, we can't unpack
+                        // newtypes for `#[repr(C)]`, as that affects C ABIs.
+                        Abi::Scalar(_) | Abi::Vector { .. } if optimize => {
+                            abi = field.abi();
+                        }
+                        // But scalar pairs are Rust-specific and get
+                        // treated as aggregates by C ABIs anyway.
+                        Abi::ScalarPair(..) => {
+                            abi = field.abi();
+                        }
+                        _ => {}
+                    }
+                }
+            }
+
+            // Two non-ZST fields, and they're both scalars.
+            (Some((i, a)), Some((j, b)), None) => {
+                match (a.abi(), b.abi()) {
+                    (Abi::Scalar(a), Abi::Scalar(b)) => {
+                        // Order by the memory placement, not source order.
+                        let ((i, a), (j, b)) = if offsets[i] < offsets[j] {
+                            ((i, a), (j, b))
+                        } else {
+                            ((j, b), (i, a))
+                        };
+                        let pair = this.scalar_pair(a, b);
+                        let pair_offsets = match pair.fields {
+                            FieldsShape::Arbitrary { ref offsets, ref memory_index } => {
+                                assert_eq!(memory_index.raw, [0, 1]);
+                                offsets
+                            }
+                            _ => panic!(),
+                        };
+                        if offsets[i] == pair_offsets[FieldIdx::from_usize(0)]
+                            && offsets[j] == pair_offsets[FieldIdx::from_usize(1)]
+                            && align == pair.align
+                            && size == pair.size
+                        {
+                            // We can use `ScalarPair` only when it matches our
+                            // already computed layout (including `#[repr(C)]`).
+                            abi = pair.abi;
+                        }
+                    }
+                    _ => {}
+                }
+            }
+
+            _ => {}
+        }
+    }
+    if fields.iter().any(|f| f.abi().is_uninhabited()) {
+        abi = Abi::Uninhabited;
+    }
+    Some(LayoutS {
+        variants: Variants::Single { index: FIRST_VARIANT },
+        fields: FieldsShape::Arbitrary { offsets, memory_index },
+        abi,
+        largest_niche,
+        align,
+        size,
+    })
+}
+
+fn format_field_niches(
+    layout: &LayoutS,
+    fields: &IndexSlice<FieldIdx, Layout<'_>>,
+    dl: &TargetDataLayout,
+) -> String {
+    let mut s = String::new();
+    for i in layout.fields.index_by_increasing_offset() {
+        let offset = layout.fields.offset(i);
+        let f = fields[i.into()];
+        write!(s, "[o{}a{}s{}", offset.bytes(), f.align().abi.bytes(), f.size().bytes()).unwrap();
+        if let Some(n) = f.largest_niche() {
+            write!(
+                s,
+                " n{}b{}s{}",
+                n.offset.bytes(),
+                n.available(dl).ilog2(),
+                n.value.size(dl).bytes()
+            )
+            .unwrap();
+        }
+        write!(s, "] ").unwrap();
+    }
+    s
+}
diff --git a/compiler/rustc_arena/src/lib.rs b/compiler/rustc_arena/src/lib.rs
index 345e058e113..6e15f06a76d 100644
--- a/compiler/rustc_arena/src/lib.rs
+++ b/compiler/rustc_arena/src/lib.rs
@@ -20,6 +20,7 @@
 #![feature(rustc_attrs)]
 #![cfg_attr(test, feature(test))]
 #![feature(strict_provenance)]
+#![deny(unsafe_op_in_unsafe_fn)]
 #![deny(rustc::untranslatable_diagnostic)]
 #![deny(rustc::diagnostic_outside_of_impl)]
 #![allow(clippy::mut_from_ref)] // Arena allocators are one of the places where this pattern is fine.
@@ -74,19 +75,27 @@ impl<T> ArenaChunk<T> {
     #[inline]
     unsafe fn new(capacity: usize) -> ArenaChunk<T> {
         ArenaChunk {
-            storage: NonNull::new(Box::into_raw(Box::new_uninit_slice(capacity))).unwrap(),
+            storage: NonNull::from(Box::leak(Box::new_uninit_slice(capacity))),
             entries: 0,
         }
     }
 
     /// Destroys this arena chunk.
+    ///
+    /// # Safety
+    ///
+    /// The caller must ensure that `len` elements of this chunk have been initialized.
     #[inline]
     unsafe fn destroy(&mut self, len: usize) {
         // The branch on needs_drop() is an -O1 performance optimization.
-        // Without the branch, dropping TypedArena<u8> takes linear time.
+        // Without the branch, dropping TypedArena<T> takes linear time.
         if mem::needs_drop::<T>() {
-            let slice = &mut *(self.storage.as_mut());
-            ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(&mut slice[..len]));
+            // SAFETY: The caller must ensure that `len` elements of this chunk have
+            // been initialized.
+            unsafe {
+                let slice = self.storage.as_mut();
+                ptr::drop_in_place(MaybeUninit::slice_assume_init_mut(&mut slice[..len]));
+            }
         }
     }
 
@@ -104,7 +113,7 @@ impl<T> ArenaChunk<T> {
                 // A pointer as large as possible for zero-sized elements.
                 ptr::invalid_mut(!0)
             } else {
-                self.start().add((*self.storage.as_ptr()).len())
+                self.start().add(self.storage.len())
             }
         }
     }
@@ -255,7 +264,9 @@ impl<T> TypedArena<T> {
         self.ensure_capacity(len);
 
         let start_ptr = self.ptr.get();
-        self.ptr.set(start_ptr.add(len));
+        // SAFETY: `self.ensure_capacity` makes sure that there is enough space
+        // for `len` elements.
+        unsafe { self.ptr.set(start_ptr.add(len)) };
         start_ptr
     }
 
@@ -288,7 +299,7 @@ impl<T> TypedArena<T> {
                 // If the previous chunk's len is less than HUGE_PAGE
                 // bytes, then this chunk will be least double the previous
                 // chunk's size.
-                new_cap = (*last_chunk.storage.as_ptr()).len().min(HUGE_PAGE / elem_size / 2);
+                new_cap = last_chunk.storage.len().min(HUGE_PAGE / elem_size / 2);
                 new_cap *= 2;
             } else {
                 new_cap = PAGE / elem_size;
@@ -396,7 +407,7 @@ impl DroplessArena {
                 // If the previous chunk's len is less than HUGE_PAGE
                 // bytes, then this chunk will be least double the previous
                 // chunk's size.
-                new_cap = (*last_chunk.storage.as_ptr()).len().min(HUGE_PAGE / 2);
+                new_cap = last_chunk.storage.len().min(HUGE_PAGE / 2);
                 new_cap *= 2;
             } else {
                 new_cap = PAGE;
@@ -483,6 +494,10 @@ impl DroplessArena {
         }
     }
 
+    /// # Safety
+    ///
+    /// The caller must ensure that `mem` is valid for writes up to
+    /// `size_of::<T>() * len`.
     #[inline]
     unsafe fn write_from_iter<T, I: Iterator<Item = T>>(
         &self,
@@ -494,13 +509,18 @@ impl DroplessArena {
         // Use a manual loop since LLVM manages to optimize it better for
         // slice iterators
         loop {
-            let value = iter.next();
-            if i >= len || value.is_none() {
-                // We only return as many items as the iterator gave us, even
-                // though it was supposed to give us `len`
-                return slice::from_raw_parts_mut(mem, i);
+            // SAFETY: The caller must ensure that `mem` is valid for writes up to
+            // `size_of::<T>() * len`.
+            unsafe {
+                match iter.next() {
+                    Some(value) if i < len => mem.add(i).write(value),
+                    Some(_) | None => {
+                        // We only return as many items as the iterator gave us, even
+                        // though it was supposed to give us `len`
+                        return slice::from_raw_parts_mut(mem, i);
+                    }
+                }
             }
-            ptr::write(mem.add(i), value.unwrap());
             i += 1;
         }
     }
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 1e4d3ba47f4..3ed342ce48b 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -2976,7 +2976,7 @@ pub enum ItemKind {
 }
 
 impl ItemKind {
-    pub fn article(&self) -> &str {
+    pub fn article(&self) -> &'static str {
         use ItemKind::*;
         match self {
             Use(..) | Static(..) | Const(..) | Fn(..) | Mod(..) | GlobalAsm(..) | TyAlias(..)
@@ -2985,7 +2985,7 @@ impl ItemKind {
         }
     }
 
-    pub fn descr(&self) -> &str {
+    pub fn descr(&self) -> &'static str {
         match self {
             ItemKind::ExternCrate(..) => "extern crate",
             ItemKind::Use(..) => "`use` import",
diff --git a/compiler/rustc_ast/src/attr/mod.rs b/compiler/rustc_ast/src/attr/mod.rs
index c4771115cac..e6c4db9e2ae 100644
--- a/compiler/rustc_ast/src/attr/mod.rs
+++ b/compiler/rustc_ast/src/attr/mod.rs
@@ -10,15 +10,10 @@ use crate::tokenstream::{DelimSpan, Spacing, TokenTree};
 use crate::tokenstream::{LazyAttrTokenStream, TokenStream};
 use crate::util::comments;
 use crate::util::literal::escape_string_symbol;
-use rustc_data_structures::sync::WorkerLocal;
 use rustc_index::bit_set::GrowableBitSet;
 use rustc_span::symbol::{sym, Ident, Symbol};
 use rustc_span::Span;
-use std::cell::Cell;
 use std::iter;
-#[cfg(debug_assertions)]
-use std::ops::BitXor;
-#[cfg(debug_assertions)]
 use std::sync::atomic::{AtomicU32, Ordering};
 use thin_vec::{thin_vec, ThinVec};
 
@@ -40,39 +35,16 @@ impl MarkedAttrs {
     }
 }
 
-pub struct AttrIdGenerator(WorkerLocal<Cell<u32>>);
-
-#[cfg(debug_assertions)]
-static MAX_ATTR_ID: AtomicU32 = AtomicU32::new(u32::MAX);
+pub struct AttrIdGenerator(AtomicU32);
 
 impl AttrIdGenerator {
     pub fn new() -> Self {
-        // We use `(index as u32).reverse_bits()` to initialize the
-        // starting value of AttrId in each worker thread.
-        // The `index` is the index of the worker thread.
-        // This ensures that the AttrId generated in each thread is unique.
-        AttrIdGenerator(WorkerLocal::new(|index| {
-            let index: u32 = index.try_into().unwrap();
-
-            #[cfg(debug_assertions)]
-            {
-                let max_id = ((index + 1).next_power_of_two() - 1).bitxor(u32::MAX).reverse_bits();
-                MAX_ATTR_ID.fetch_min(max_id, Ordering::Release);
-            }
-
-            Cell::new(index.reverse_bits())
-        }))
+        AttrIdGenerator(AtomicU32::new(0))
     }
 
     pub fn mk_attr_id(&self) -> AttrId {
-        let id = self.0.get();
-
-        // Ensure the assigned attr_id does not overlap the bits
-        // representing the number of threads.
-        #[cfg(debug_assertions)]
-        assert!(id <= MAX_ATTR_ID.load(Ordering::Acquire));
-
-        self.0.set(id + 1);
+        let id = self.0.fetch_add(1, Ordering::Relaxed);
+        assert!(id != u32::MAX);
         AttrId::from_u32(id)
     }
 }
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index 6863100d9ba..7a0a7da9695 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -858,13 +858,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
         let awaitee_arm = self.arm(awaitee_pat, loop_expr);
 
         // `match ::std::future::IntoFuture::into_future(<expr>) { ... }`
-        let into_future_span = self.mark_span_with_reason(
-            DesugaringKind::Await,
-            dot_await_span,
-            self.allow_into_future.clone(),
-        );
         let into_future_expr = self.expr_call_lang_item_fn(
-            into_future_span,
+            span,
             hir::LangItem::IntoFutureIntoFuture,
             arena_vec![self; expr],
             Some(expr_hir_id),
diff --git a/compiler/rustc_ast_lowering/src/format.rs b/compiler/rustc_ast_lowering/src/format.rs
index ccf481cb9b3..c081162ea14 100644
--- a/compiler/rustc_ast_lowering/src/format.rs
+++ b/compiler/rustc_ast_lowering/src/format.rs
@@ -186,7 +186,7 @@ enum ArgumentType {
 /// Generates:
 ///
 /// ```text
-///     <core::fmt::ArgumentV1>::new_…(arg)
+///     <core::fmt::Argument>::new_…(arg)
 /// ```
 fn make_argument<'hir>(
     ctx: &mut LoweringContext<'_, 'hir>,
@@ -327,7 +327,7 @@ fn make_format_spec<'hir>(
             None => sym::Unknown,
         },
     );
-    // This needs to match `FlagV1` in library/core/src/fmt/mod.rs.
+    // This needs to match `Flag` in library/core/src/fmt/rt.rs.
     let flags: u32 = ((sign == Some(FormatSign::Plus)) as u32)
         | ((sign == Some(FormatSign::Minus)) as u32) << 1
         | (alternate as u32) << 2
@@ -438,7 +438,7 @@ fn expand_format_args<'hir>(
     // If the args array contains exactly all the original arguments once,
     // in order, we can use a simple array instead of a `match` construction.
     // However, if there's a yield point in any argument except the first one,
-    // we don't do this, because an ArgumentV1 cannot be kept across yield points.
+    // we don't do this, because an Argument cannot be kept across yield points.
     //
     // This is an optimization, speeding up compilation about 1-2% in some cases.
     // See https://github.com/rust-lang/rust/pull/106770#issuecomment-1380790609
@@ -449,9 +449,9 @@ fn expand_format_args<'hir>(
     let args = if use_simple_array {
         // Generate:
         //     &[
-        //         <core::fmt::ArgumentV1>::new_display(&arg0),
-        //         <core::fmt::ArgumentV1>::new_lower_hex(&arg1),
-        //         <core::fmt::ArgumentV1>::new_debug(&arg2),
+        //         <core::fmt::Argument>::new_display(&arg0),
+        //         <core::fmt::Argument>::new_lower_hex(&arg1),
+        //         <core::fmt::Argument>::new_debug(&arg2),
         //         …
         //     ]
         let elements: Vec<_> = arguments
@@ -477,9 +477,9 @@ fn expand_format_args<'hir>(
         // Generate:
         //     &match (&arg0, &arg1, &…) {
         //         args => [
-        //             <core::fmt::ArgumentV1>::new_display(args.0),
-        //             <core::fmt::ArgumentV1>::new_lower_hex(args.1),
-        //             <core::fmt::ArgumentV1>::new_debug(args.0),
+        //             <core::fmt::Argument>::new_display(args.0),
+        //             <core::fmt::Argument>::new_lower_hex(args.1),
+        //             <core::fmt::Argument>::new_debug(args.0),
         //             …
         //         ]
         //     }
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs
index a9fd8db281b..3d154a93fb2 100644
--- a/compiler/rustc_ast_lowering/src/item.rs
+++ b/compiler/rustc_ast_lowering/src/item.rs
@@ -83,7 +83,6 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
             impl_trait_bounds: Vec::new(),
             allow_try_trait: Some([sym::try_trait_v2, sym::yeet_desugar_details][..].into()),
             allow_gen_future: Some([sym::gen_future, sym::closure_track_caller][..].into()),
-            allow_into_future: Some([sym::into_future][..].into()),
             generics_def_id_map: Default::default(),
         };
         lctx.with_hir_id_owner(owner, |lctx| f(lctx));
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index d07355a4154..b5b28bf8e31 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -136,7 +136,6 @@ struct LoweringContext<'a, 'hir> {
 
     allow_try_trait: Option<Lrc<[Symbol]>>,
     allow_gen_future: Option<Lrc<[Symbol]>>,
-    allow_into_future: Option<Lrc<[Symbol]>>,
 
     /// Mapping from generics `def_id`s to TAIT generics `def_id`s.
     /// For each captured lifetime (e.g., 'a), we create a new lifetime parameter that is a generic
diff --git a/compiler/rustc_ast_pretty/src/pp.rs b/compiler/rustc_ast_pretty/src/pp.rs
index c93022308a3..7ab8c3eaba2 100644
--- a/compiler/rustc_ast_pretty/src/pp.rs
+++ b/compiler/rustc_ast_pretty/src/pp.rs
@@ -360,7 +360,7 @@ impl Printer {
 
     fn check_stack(&mut self, mut depth: usize) {
         while let Some(&index) = self.scan_stack.back() {
-            let mut entry = &mut self.buf[index];
+            let entry = &mut self.buf[index];
             match entry.token {
                 Token::Begin(_) => {
                     if depth == 0 {
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 5db0f72919d..ac84188a35f 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -1359,7 +1359,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
         }
 
         // Get closure's arguments
-        let ty::Closure(_, substs) = typeck_results.expr_ty(closure_expr).kind() else { unreachable!() };
+        let ty::Closure(_, substs) = typeck_results.expr_ty(closure_expr).kind() else { /* hir::Closure can be a generator too */ return };
         let sig = substs.as_closure().sig();
         let tupled_params =
             tcx.erase_late_bound_regions(sig.inputs().iter().next().unwrap().map_bound(|&b| b));
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs
index b57b0c9e4ba..6900729d671 100644
--- a/compiler/rustc_borrowck/src/lib.rs
+++ b/compiler/rustc_borrowck/src/lib.rs
@@ -935,6 +935,7 @@ enum InitializationRequiringAction {
     PartialAssignment,
 }
 
+#[derive(Debug)]
 struct RootPlace<'tcx> {
     place_local: Local,
     place_projection: &'tcx [PlaceElem<'tcx>],
@@ -1848,11 +1849,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                         // is allowed, remove this match arm.
                         ty::Adt(..) | ty::Tuple(..) => {
                             check_parent_of_field(self, location, place_base, span, flow_state);
-
-                            // rust-lang/rust#21232, #54499, #54986: during period where we reject
-                            // partial initialization, do not complain about unnecessary `mut` on
-                            // an attempt to do a partial initialization.
-                            self.used_mut.insert(place.local);
                         }
 
                         _ => {}
@@ -1940,6 +1936,11 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                     (prefix, base, span),
                     mpi,
                 );
+
+                // rust-lang/rust#21232, #54499, #54986: during period where we reject
+                // partial initialization, do not complain about unnecessary `mut` on
+                // an attempt to do a partial initialization.
+                this.used_mut.insert(base.local);
             }
         }
     }
diff --git a/compiler/rustc_borrowck/src/member_constraints.rs b/compiler/rustc_borrowck/src/member_constraints.rs
index db5b8f464c8..842e9008058 100644
--- a/compiler/rustc_borrowck/src/member_constraints.rs
+++ b/compiler/rustc_borrowck/src/member_constraints.rs
@@ -221,7 +221,7 @@ fn append_list(
 ) {
     let mut p = target_list;
     loop {
-        let mut r = &mut constraints[p];
+        let r = &mut constraints[p];
         match r.next_constraint {
             Some(q) => p = q,
             None => {
diff --git a/compiler/rustc_codegen_cranelift/.github/actions/github-release/README.md b/compiler/rustc_codegen_cranelift/.github/actions/github-release/README.md
new file mode 100644
index 00000000000..c70ba8f4953
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/.github/actions/github-release/README.md
@@ -0,0 +1,18 @@
+# github-release
+
+An action used to publish GitHub releases for `wasmtime`.
+
+As of the time of this writing there's a few actions floating around which
+perform github releases but they all tend to have their set of drawbacks.
+Additionally nothing handles deleting releases which we need for our rolling
+`dev` release.
+
+To handle all this this action rolls-its-own implementation using the
+actions/toolkit repository and packages published there. These run in a Docker
+container and take various inputs to orchestrate the release from the build.
+
+More comments can be found in `main.js`.
+
+Testing this is really hard. If you want to try though run `npm install` and
+then `node main.js`. You'll have to configure a bunch of env vars though to get
+anything reasonably working.
diff --git a/compiler/rustc_codegen_cranelift/.github/actions/github-release/action.yml b/compiler/rustc_codegen_cranelift/.github/actions/github-release/action.yml
new file mode 100644
index 00000000000..36e5209f50c
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/.github/actions/github-release/action.yml
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+name: 'rustc_codegen_cranelift github releases'
+description: 'rustc_codegen_cranelift github releases'
+inputs:
+  token:
+    description: ''
+    required: true
+  files:
+    description: ''
+    required: true
+runs:
+  using: 'node16'
+  main: 'main.js'
diff --git a/compiler/rustc_codegen_cranelift/.github/actions/github-release/main.js b/compiler/rustc_codegen_cranelift/.github/actions/github-release/main.js
new file mode 100644
index 00000000000..6fcfca34ea7
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/.github/actions/github-release/main.js
@@ -0,0 +1,162 @@
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+const core = require('@actions/core');
+const path = require("path");
+const fs = require("fs");
+const github = require('@actions/github');
+const glob = require('glob');
+
+function sleep(milliseconds) {
+  return new Promise(resolve => setTimeout(resolve, milliseconds))
+}
+
+async function runOnce() {
+  // Load all our inputs and env vars. Note that `getInput` reads from `INPUT_*`
+  const files = core.getInput('files');
+  const token = core.getInput('token');
+  const slug = process.env.GITHUB_REPOSITORY;
+  const owner = slug.split('/')[0];
+  const repo = slug.split('/')[1];
+  const sha = process.env.GITHUB_SHA;
+  let name = 'dev';
+  if (process.env.GITHUB_REF.startsWith('refs/tags/v')) {
+    name = process.env.GITHUB_REF.substring(10);
+  }
+
+  core.info(`files: ${files}`);
+  core.info(`name: ${name}`);
+  core.info(`token: ${token}`);
+
+  const octokit = github.getOctokit(token);
+
+  // For the `dev` release we may need to update the tag to point to the new
+  // commit on this branch. All other names should already have tags associated
+  // with them.
+  if (name == 'dev') {
+    let tag = null;
+    try {
+      tag = await octokit.request("GET /repos/:owner/:repo/git/refs/tags/:name", { owner, repo, name });
+      core.info(`found existing tag`);
+      console.log("tag: ", JSON.stringify(tag.data, null, 2));
+    } catch (e) {
+      // ignore if this tag doesn't exist
+      core.info(`no existing tag found`);
+    }
+
+    if (tag === null || tag.data.object.sha !== sha) {
+      core.info(`updating existing tag or creating new one`);
+
+      try {
+        core.info(`updating dev tag`);
+        await octokit.rest.git.updateRef({
+          owner,
+          repo,
+          ref: 'tags/dev',
+          sha,
+          force: true,
+        });
+      } catch (e) {
+        console.log("ERROR: ", JSON.stringify(e.data, null, 2));
+        core.info(`creating dev tag`);
+        try {
+          await octokit.rest.git.createRef({
+            owner,
+            repo,
+            ref: 'refs/tags/dev',
+            sha,
+          });
+        } catch (e) {
+          // we might race with others, so assume someone else has created the
+          // tag by this point.
+          console.log("failed to create tag: ", JSON.stringify(e.data, null, 2));
+        }
+      }
+
+      console.log("double-checking tag is correct");
+      tag = await octokit.request("GET /repos/:owner/:repo/git/refs/tags/:name", { owner, repo, name });
+      if (tag.data.object.sha !== sha) {
+        console.log("tag: ", JSON.stringify(tag.data, null, 2));
+        throw new Error("tag didn't work");
+      }
+    } else {
+      core.info(`existing tag works`);
+    }
+  }
+
+  // Delete a previous release
+  try {
+    core.info(`fetching release`);
+    let release = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag: name });
+    console.log("found release: ", JSON.stringify(release.data, null, 2));
+    await octokit.rest.repos.deleteRelease({
+      owner,
+      repo,
+      release_id: release.data.id,
+    });
+    console.log("deleted release");
+  } catch (e) {
+    console.log("ERROR: ", JSON.stringify(e, null, 2));
+  }
+
+  console.log("creating a release");
+  let release = await octokit.rest.repos.createRelease({
+    owner,
+    repo,
+    tag_name: name,
+    prerelease: name === 'dev',
+  });
+
+  // Delete all assets from a previous run
+  for (const asset of release.data.assets) {
+    console.log(`deleting prior asset ${asset.id}`);
+    await octokit.rest.repos.deleteReleaseAsset({
+      owner,
+      repo,
+      asset_id: asset.id,
+    });
+  }
+
+  // Upload all the relevant assets for this release as just general blobs.
+  for (const file of glob.sync(files)) {
+    const size = fs.statSync(file).size;
+    const name = path.basename(file);
+    core.info(`upload ${file}`);
+    await octokit.rest.repos.uploadReleaseAsset({
+      data: fs.createReadStream(file),
+      headers: { 'content-length': size, 'content-type': 'application/octet-stream' },
+      name,
+      url: release.data.upload_url,
+    });
+  }
+}
+
+async function run() {
+  const retries = 10;
+  for (let i = 0; i < retries; i++) {
+    try {
+      await runOnce();
+      break;
+    } catch (e) {
+      if (i === retries - 1)
+        throw e;
+      logError(e);
+      console.log("RETRYING after 10s");
+      await sleep(10000)
+    }
+  }
+}
+
+function logError(e) {
+  console.log("ERROR: ", e.message);
+  try {
+    console.log(JSON.stringify(e, null, 2));
+  } catch (e) {
+    // ignore json errors for now
+  }
+  console.log(e.stack);
+}
+
+run().catch(err => {
+  logError(err);
+  core.setFailed(err.message);
+});
diff --git a/compiler/rustc_codegen_cranelift/.github/actions/github-release/package-lock.json b/compiler/rustc_codegen_cranelift/.github/actions/github-release/package-lock.json
new file mode 100644
index 00000000000..dd3b2a048f0
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/.github/actions/github-release/package-lock.json
@@ -0,0 +1,571 @@
+{
+  "name": "rustc_codegen_cranelift-github-release",
+  "version": "0.0.0",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "": {
+      "name": "rustc_codegen_cranelift-github-release",
+      "version": "0.0.0",
+      "dependencies": {
+        "@actions/core": "^1.9.1",
+        "@actions/github": "^5.1.0",
+        "glob": "^7.1.5"
+      }
+    },
+    "node_modules/@actions/core": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
+      "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
+      "dependencies": {
+        "@actions/http-client": "^2.0.1",
+        "uuid": "^8.3.2"
+      }
+    },
+    "node_modules/@actions/github": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.0.tgz",
+      "integrity": "sha512-tuI80F7JQIhg77ZTTgUAPpVD7ZnP9oHSPN8xw7LOwtA4vEMbAjWJNbmLBfV7xua7r016GyjzWLuec5cs8f/a8A==",
+      "dependencies": {
+        "@actions/http-client": "^2.0.1",
+        "@octokit/core": "^3.6.0",
+        "@octokit/plugin-paginate-rest": "^2.17.0",
+        "@octokit/plugin-rest-endpoint-methods": "^5.13.0"
+      }
+    },
+    "node_modules/@actions/http-client": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+      "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+      "dependencies": {
+        "tunnel": "^0.0.6"
+      }
+    },
+    "node_modules/@octokit/auth-token": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
+      "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
+      "dependencies": {
+        "@octokit/types": "^6.0.3"
+      }
+    },
+    "node_modules/@octokit/core": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
+      "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
+      "dependencies": {
+        "@octokit/auth-token": "^2.4.4",
+        "@octokit/graphql": "^4.5.8",
+        "@octokit/request": "^5.6.3",
+        "@octokit/request-error": "^2.0.5",
+        "@octokit/types": "^6.0.3",
+        "before-after-hook": "^2.2.0",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "node_modules/@octokit/endpoint": {
+      "version": "6.0.12",
+      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
+      "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
+      "dependencies": {
+        "@octokit/types": "^6.0.3",
+        "is-plain-object": "^5.0.0",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "node_modules/@octokit/graphql": {
+      "version": "4.8.0",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
+      "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
+      "dependencies": {
+        "@octokit/request": "^5.6.0",
+        "@octokit/types": "^6.0.3",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "node_modules/@octokit/openapi-types": {
+      "version": "12.11.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+      "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+    },
+    "node_modules/@octokit/plugin-paginate-rest": {
+      "version": "2.21.3",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
+      "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
+      "dependencies": {
+        "@octokit/types": "^6.40.0"
+      },
+      "peerDependencies": {
+        "@octokit/core": ">=2"
+      }
+    },
+    "node_modules/@octokit/plugin-rest-endpoint-methods": {
+      "version": "5.16.2",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
+      "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
+      "dependencies": {
+        "@octokit/types": "^6.39.0",
+        "deprecation": "^2.3.1"
+      },
+      "peerDependencies": {
+        "@octokit/core": ">=3"
+      }
+    },
+    "node_modules/@octokit/request": {
+      "version": "5.6.3",
+      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
+      "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
+      "dependencies": {
+        "@octokit/endpoint": "^6.0.1",
+        "@octokit/request-error": "^2.1.0",
+        "@octokit/types": "^6.16.1",
+        "is-plain-object": "^5.0.0",
+        "node-fetch": "^2.6.7",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "node_modules/@octokit/request-error": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
+      "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
+      "dependencies": {
+        "@octokit/types": "^6.0.3",
+        "deprecation": "^2.0.0",
+        "once": "^1.4.0"
+      }
+    },
+    "node_modules/@octokit/types": {
+      "version": "6.41.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+      "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+      "dependencies": {
+        "@octokit/openapi-types": "^12.11.0"
+      }
+    },
+    "node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+    },
+    "node_modules/before-after-hook": {
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
+      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
+    },
+    "node_modules/brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+    },
+    "node_modules/deprecation": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
+      "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
+    },
+    "node_modules/fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+    },
+    "node_modules/glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+      "dependencies": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "node_modules/inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+    },
+    "node_modules/is-plain-object": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+      "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/minimatch": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/node-fetch": {
+      "version": "2.6.7",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
+      "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+      "dependencies": {
+        "whatwg-url": "^5.0.0"
+      },
+      "engines": {
+        "node": "4.x || >=6.0.0"
+      },
+      "peerDependencies": {
+        "encoding": "^0.1.0"
+      },
+      "peerDependenciesMeta": {
+        "encoding": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+      "dependencies": {
+        "wrappy": "1"
+      }
+    },
+    "node_modules/path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/tr46": {
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+    },
+    "node_modules/tunnel": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+      "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+      "engines": {
+        "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+      }
+    },
+    "node_modules/universal-user-agent": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
+      "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
+    },
+    "node_modules/uuid": {
+      "version": "8.3.2",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+      "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+      "bin": {
+        "uuid": "dist/bin/uuid"
+      }
+    },
+    "node_modules/webidl-conversions": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+      "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
+    },
+    "node_modules/whatwg-url": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+      "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+      "dependencies": {
+        "tr46": "~0.0.3",
+        "webidl-conversions": "^3.0.0"
+      }
+    },
+    "node_modules/wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+    }
+  },
+  "dependencies": {
+    "@actions/core": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
+      "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
+      "requires": {
+        "@actions/http-client": "^2.0.1",
+        "uuid": "^8.3.2"
+      }
+    },
+    "@actions/github": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.0.tgz",
+      "integrity": "sha512-tuI80F7JQIhg77ZTTgUAPpVD7ZnP9oHSPN8xw7LOwtA4vEMbAjWJNbmLBfV7xua7r016GyjzWLuec5cs8f/a8A==",
+      "requires": {
+        "@actions/http-client": "^2.0.1",
+        "@octokit/core": "^3.6.0",
+        "@octokit/plugin-paginate-rest": "^2.17.0",
+        "@octokit/plugin-rest-endpoint-methods": "^5.13.0"
+      }
+    },
+    "@actions/http-client": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
+      "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+      "requires": {
+        "tunnel": "^0.0.6"
+      }
+    },
+    "@octokit/auth-token": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
+      "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
+      "requires": {
+        "@octokit/types": "^6.0.3"
+      }
+    },
+    "@octokit/core": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
+      "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
+      "requires": {
+        "@octokit/auth-token": "^2.4.4",
+        "@octokit/graphql": "^4.5.8",
+        "@octokit/request": "^5.6.3",
+        "@octokit/request-error": "^2.0.5",
+        "@octokit/types": "^6.0.3",
+        "before-after-hook": "^2.2.0",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "@octokit/endpoint": {
+      "version": "6.0.12",
+      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
+      "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
+      "requires": {
+        "@octokit/types": "^6.0.3",
+        "is-plain-object": "^5.0.0",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "@octokit/graphql": {
+      "version": "4.8.0",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
+      "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
+      "requires": {
+        "@octokit/request": "^5.6.0",
+        "@octokit/types": "^6.0.3",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "@octokit/openapi-types": {
+      "version": "12.11.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+      "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+    },
+    "@octokit/plugin-paginate-rest": {
+      "version": "2.21.3",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
+      "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
+      "requires": {
+        "@octokit/types": "^6.40.0"
+      }
+    },
+    "@octokit/plugin-rest-endpoint-methods": {
+      "version": "5.16.2",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
+      "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
+      "requires": {
+        "@octokit/types": "^6.39.0",
+        "deprecation": "^2.3.1"
+      }
+    },
+    "@octokit/request": {
+      "version": "5.6.3",
+      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
+      "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
+      "requires": {
+        "@octokit/endpoint": "^6.0.1",
+        "@octokit/request-error": "^2.1.0",
+        "@octokit/types": "^6.16.1",
+        "is-plain-object": "^5.0.0",
+        "node-fetch": "^2.6.7",
+        "universal-user-agent": "^6.0.0"
+      }
+    },
+    "@octokit/request-error": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
+      "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
+      "requires": {
+        "@octokit/types": "^6.0.3",
+        "deprecation": "^2.0.0",
+        "once": "^1.4.0"
+      }
+    },
+    "@octokit/types": {
+      "version": "6.41.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+      "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+      "requires": {
+        "@octokit/openapi-types": "^12.11.0"
+      }
+    },
+    "balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+    },
+    "before-after-hook": {
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
+      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+    },
+    "deprecation": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
+      "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+    },
+    "glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+    },
+    "is-plain-object": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+      "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
+    },
+    "minimatch": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "node-fetch": {
+      "version": "2.6.7",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
+      "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+      "requires": {
+        "whatwg-url": "^5.0.0"
+      }
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
+    },
+    "tr46": {
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+    },
+    "tunnel": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+      "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
+    },
+    "universal-user-agent": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
+      "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
+    },
+    "uuid": {
+      "version": "8.3.2",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+      "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
+    },
+    "webidl-conversions": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+      "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
+    },
+    "whatwg-url": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+      "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+      "requires": {
+        "tr46": "~0.0.3",
+        "webidl-conversions": "^3.0.0"
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+    }
+  }
+}
diff --git a/compiler/rustc_codegen_cranelift/.github/actions/github-release/package.json b/compiler/rustc_codegen_cranelift/.github/actions/github-release/package.json
new file mode 100644
index 00000000000..d9c23f8873e
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/.github/actions/github-release/package.json
@@ -0,0 +1,11 @@
+{
+  "name": "rustc_codegen_cranelift-github-release",
+  "version": "0.0.0",
+  "license": "Apache-2.0 WITH LLVM-exception",
+  "main": "main.js",
+  "dependencies": {
+    "@actions/core": "^1.9.1",
+    "@actions/github": "^5.1.0",
+    "glob": "^7.1.5"
+  }
+}
diff --git a/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml b/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml
index 5f5510a5796..3c40555669c 100644
--- a/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml
+++ b/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml
@@ -45,13 +45,6 @@ jobs:
       if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
       run: rustup set default-host x86_64-pc-windows-gnu
 
-    - name: Use sparse cargo registry
-      run: |
-        cat >> ~/.cargo/config.toml <<EOF
-        [unstable]
-        sparse-registry = true
-        EOF
-
     - name: Prepare dependencies
       run: ./y.rs prepare
 
diff --git a/compiler/rustc_codegen_cranelift/.github/workflows/main.yml b/compiler/rustc_codegen_cranelift/.github/workflows/main.yml
index 98b34c65dea..e4af73ea644 100644
--- a/compiler/rustc_codegen_cranelift/.github/workflows/main.yml
+++ b/compiler/rustc_codegen_cranelift/.github/workflows/main.yml
@@ -20,6 +20,7 @@ jobs:
       run: |
         cargo fmt --check
         rustfmt --check build_system/mod.rs
+        rustfmt --check example/*
 
 
   test:
@@ -89,13 +90,6 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
 
-    - name: Use sparse cargo registry
-      run: |
-        cat >> ~/.cargo/config.toml <<EOF
-        [unstable]
-        sparse-registry = true
-        EOF
-
     - name: Prepare dependencies
       run: ./y.rs prepare
 
@@ -137,13 +131,6 @@ jobs:
         path: ~/.cargo/bin
         key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-bin-dir-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
-    - name: Use sparse cargo registry
-      run: |
-        cat >> ~/.cargo/config.toml <<EOF
-        [unstable]
-        sparse-registry = true
-        EOF
-
     - name: Install hyperfine
       run: cargo install hyperfine || true
 
@@ -206,13 +193,6 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
 
-    - name: Use sparse cargo registry
-      run: |
-        cat >> ~/.cargo/config.toml <<EOF
-        [unstable]
-        sparse-registry = true
-        EOF
-
     - name: Prepare dependencies
       run: ./y.rs prepare
 
@@ -238,3 +218,43 @@ jobs:
       with:
         name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
         path: cg_clif.tar.xz
+
+  release:
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    if: ${{ github.ref == 'refs/heads/master' }}
+    needs: [rustfmt, test, bench, dist]
+
+    concurrency:
+      group: release-dev
+      cancel-in-progress: true
+
+    steps:
+      - uses: actions/checkout@v3
+
+      - name: Download all built artifacts
+        uses: actions/download-artifact@v3
+        with:
+          path: artifacts/
+
+      - run: |
+          ls -R artifacts/
+          mkdir release/
+          pushd artifacts/
+          for dir in *; do
+            mv $dir/cg_clif.tar.xz ../release/$dir.tar.xz
+            rmdir $dir/ # verify $dir is empty
+          done
+          popd
+          rmdir artifacts/ # verify all artifacts are represented in release/
+          ls -R release/
+
+      - run: npm install --production
+        working-directory: .github/actions/github-release
+
+      - name: Publish Release
+        uses: ./.github/actions/github-release
+        with:
+          files: "release/*"
+          token: ${{ github.token }}
+        continue-on-error: true
diff --git a/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml b/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
index 5faa8f05404..b2f772c4fc4 100644
--- a/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
+++ b/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
@@ -6,6 +6,7 @@ on:
 jobs:
   bootstrap_rustc:
     runs-on: ubuntu-latest
+    timeout-minutes: 60
 
     steps:
     - uses: actions/checkout@v3
@@ -16,20 +17,16 @@ jobs:
         path: build/cg_clif
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
-    - name: Use sparse cargo registry
-      run: |
-        cat >> ~/.cargo/config.toml <<EOF
-        [unstable]
-        sparse-registry = true
-        EOF
-
     - name: Prepare dependencies
       run: ./y.rs prepare
 
     - name: Test
       run: ./scripts/test_bootstrap.sh
+
+
   rustc_test_suite:
     runs-on: ubuntu-latest
+    timeout-minutes: 60
 
     steps:
     - uses: actions/checkout@v3
@@ -40,13 +37,6 @@ jobs:
         path: build/cg_clif
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
-    - name: Use sparse cargo registry
-      run: |
-        cat >> ~/.cargo/config.toml <<EOF
-        [unstable]
-        sparse-registry = true
-        EOF
-
     - name: Prepare dependencies
       run: ./y.rs prepare
 
diff --git a/compiler/rustc_codegen_cranelift/Cargo.lock b/compiler/rustc_codegen_cranelift/Cargo.lock
index 87e4ac26605..07a8e431a0e 100644
--- a/compiler/rustc_codegen_cranelift/Cargo.lock
+++ b/compiler/rustc_codegen_cranelift/Cargo.lock
@@ -4,11 +4,11 @@ version = 3
 
 [[package]]
 name = "ahash"
-version = "0.7.6"
+version = "0.8.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
 dependencies = [
- "getrandom",
+ "cfg-if",
  "once_cell",
  "version_check",
 ]
@@ -20,12 +20,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
 
 [[package]]
-name = "arrayvec"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
-
-[[package]]
 name = "autocfg"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -57,20 +51,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "cranelift-bforest"
-version = "0.93.1"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7379abaacee0f14abf3204a7606118f0465785252169d186337bcb75030815a"
+checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70"
 dependencies = [
  "cranelift-entity",
 ]
 
 [[package]]
 name = "cranelift-codegen"
-version = "0.93.1"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9489fa336927df749631f1008007ced2871068544f40a202ce6d93fbf2366a7b"
+checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220"
 dependencies = [
- "arrayvec",
  "bumpalo",
  "cranelift-bforest",
  "cranelift-codegen-meta",
@@ -78,7 +71,7 @@ dependencies = [
  "cranelift-entity",
  "cranelift-isle",
  "gimli",
- "hashbrown",
+ "hashbrown 0.13.2",
  "log",
  "regalloc2",
  "smallvec",
@@ -87,30 +80,30 @@ dependencies = [
 
 [[package]]
 name = "cranelift-codegen-meta"
-version = "0.93.1"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05bbb67da91ec721ed57cef2f7c5ef7728e1cd9bde9ffd3ef8601022e73e3239"
+checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da"
 dependencies = [
  "cranelift-codegen-shared",
 ]
 
 [[package]]
 name = "cranelift-codegen-shared"
-version = "0.93.1"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "418ecb2f36032f6665dc1a5e2060a143dbab41d83b784882e97710e890a7a16d"
+checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8"
 
 [[package]]
 name = "cranelift-entity"
-version = "0.93.1"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705"
+checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0"
 
 [[package]]
 name = "cranelift-frontend"
-version = "0.93.0"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d361ed0373cf5f086b49c499aa72227b646a64f899f32e34312f97c0fadff75"
+checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d"
 dependencies = [
  "cranelift-codegen",
  "log",
@@ -120,15 +113,15 @@ dependencies = [
 
 [[package]]
 name = "cranelift-isle"
-version = "0.93.1"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "649782a39ce99798dd6b4029e2bb318a2fbeaade1b4fa25330763c10c65bc358"
+checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba"
 
 [[package]]
 name = "cranelift-jit"
-version = "0.93.0"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9909222db472fcc98d9e4e7192fa9d064dac63a3fa657df8c6daae86fb2604"
+checksum = "3ca96b05988aa057eda09a817a6e31915fabd7f476b513123aff08053cd193dd"
 dependencies = [
  "anyhow",
  "cranelift-codegen",
@@ -145,9 +138,9 @@ dependencies = [
 
 [[package]]
 name = "cranelift-module"
-version = "0.93.0"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68689b83e52e605ba48652882d3fccc2e2e136abf139eb64ae667888ba0d52f8"
+checksum = "e5112c0be9cc5da064e0620570d67852f11ce44f2e572a58ecf7f11df73978b8"
 dependencies = [
  "anyhow",
  "cranelift-codegen",
@@ -155,9 +148,9 @@ dependencies = [
 
 [[package]]
 name = "cranelift-native"
-version = "0.93.0"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f98e4e99a353703475d5acb402b9c13482d41d8a4008b352559bd560afb90363"
+checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00"
 dependencies = [
  "cranelift-codegen",
  "libc",
@@ -166,9 +159,9 @@ dependencies = [
 
 [[package]]
 name = "cranelift-object"
-version = "0.93.0"
+version = "0.95.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7a006ce1d8dd11df67567d8673e5920f3a56441812aed52a007ffce8f1b20e9"
+checksum = "48ed1b37d0972abe804cb5bf2b35f3a76a276ebbe148e3a726d8e31042790978"
 dependencies = [
  "anyhow",
  "cranelift-codegen",
@@ -203,21 +196,10 @@ dependencies = [
 ]
 
 [[package]]
-name = "getrandom"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
-dependencies = [
- "cfg-if",
- "libc",
- "wasi",
-]
-
-[[package]]
 name = "gimli"
-version = "0.26.2"
+version = "0.27.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
 dependencies = [
  "fallible-iterator",
  "indexmap",
@@ -229,6 +211,12 @@ name = "hashbrown"
 version = "0.12.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
 dependencies = [
  "ahash",
 ]
@@ -240,7 +228,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
 dependencies = [
  "autocfg",
- "hashbrown",
+ "hashbrown 0.12.3",
 ]
 
 [[package]]
@@ -285,12 +273,12 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
 
 [[package]]
 name = "object"
-version = "0.29.0"
+version = "0.30.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
+checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
 dependencies = [
  "crc32fast",
- "hashbrown",
+ "hashbrown 0.13.2",
  "indexmap",
  "memchr",
 ]
@@ -303,9 +291,9 @@ checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
 
 [[package]]
 name = "regalloc2"
-version = "0.5.1"
+version = "0.6.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c"
+checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621"
 dependencies = [
  "fxhash",
  "log",
@@ -375,16 +363,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
 
 [[package]]
-name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
-
-[[package]]
 name = "wasmtime-jit-icache-coherence"
-version = "6.0.0"
+version = "8.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec1fd0f0dd79e7cc0f55b102e320d7c77ab76cd272008a8fd98e25b5777e2636"
+checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd"
 dependencies = [
  "cfg-if",
  "libc",
@@ -415,9 +397,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
 
 [[package]]
 name = "windows-sys"
-version = "0.42.0"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
 dependencies = [
  "windows_aarch64_gnullvm",
  "windows_aarch64_msvc",
@@ -430,42 +421,42 @@ dependencies = [
 
 [[package]]
 name = "windows_aarch64_gnullvm"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
+checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
 
 [[package]]
 name = "windows_aarch64_msvc"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
+checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
 
 [[package]]
 name = "windows_i686_gnu"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
+checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
 
 [[package]]
 name = "windows_i686_msvc"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
+checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
 
 [[package]]
 name = "windows_x86_64_gnu"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
+checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
 
 [[package]]
 name = "windows_x86_64_gnullvm"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
+checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
 
 [[package]]
 name = "windows_x86_64_msvc"
-version = "0.42.0"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
+checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
diff --git a/compiler/rustc_codegen_cranelift/Cargo.toml b/compiler/rustc_codegen_cranelift/Cargo.toml
index 5dadcaaec42..a2890f6ddf9 100644
--- a/compiler/rustc_codegen_cranelift/Cargo.toml
+++ b/compiler/rustc_codegen_cranelift/Cargo.toml
@@ -15,15 +15,15 @@ crate-type = ["dylib"]
 
 [dependencies]
 # These have to be in sync with each other
-cranelift-codegen = { version = "0.93", features = ["unwind", "all-arch"] }
-cranelift-frontend = { version = "0.93" }
-cranelift-module = { version = "0.93" }
-cranelift-native = { version = "0.93" }
-cranelift-jit = { version = "0.93", optional = true }
-cranelift-object = { version = "0.93" }
+cranelift-codegen = { version = "0.95.1", features = ["unwind", "all-arch"] }
+cranelift-frontend = { version = "0.95.1" }
+cranelift-module = { version = "0.95.1" }
+cranelift-native = { version = "0.95.1" }
+cranelift-jit = { version = "0.95.1", optional = true }
+cranelift-object = { version = "0.95.1" }
 target-lexicon = "0.12.0"
-gimli = { version = "0.26.0", default-features = false, features = ["write"]}
-object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
+gimli = { version = "0.27.2", default-features = false, features = ["write"]}
+object = { version = "0.30.3", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
 
 indexmap = "1.9.3"
 libloading = { version = "0.7.3", optional = true }
diff --git a/compiler/rustc_codegen_cranelift/Readme.md b/compiler/rustc_codegen_cranelift/Readme.md
index b87a9dc51e8..c5222982aa7 100644
--- a/compiler/rustc_codegen_cranelift/Readme.md
+++ b/compiler/rustc_codegen_cranelift/Readme.md
@@ -22,10 +22,9 @@ $ ./test.sh
 
 For more docs on how to build and test see [build_system/usage.txt](build_system/usage.txt) or the help message of `./y.rs`.
 
-Alternatively you can download a pre built version from [Github Actions]. It is listed in the artifacts section
-of workflow runs. Unfortunately due to GHA restrictions you need to be logged in to access it.
+Alternatively you can download a pre built version from the [releases] page.
 
-[Github Actions]: https://github.com/bjorn3/rustc_codegen_cranelift/actions?query=branch%3Amaster+event%3Apush+is%3Asuccess
+[releases]: https://github.com/bjorn3/rustc_codegen_cranelift/releases/tag/dev
 
 ## Usage
 
diff --git a/compiler/rustc_codegen_cranelift/build_sysroot/Cargo.lock b/compiler/rustc_codegen_cranelift/build_sysroot/Cargo.lock
index f2150762991..7ddf91ad01f 100644
--- a/compiler/rustc_codegen_cranelift/build_sysroot/Cargo.lock
+++ b/compiler/rustc_codegen_cranelift/build_sysroot/Cargo.lock
@@ -4,9 +4,9 @@ version = 3
 
 [[package]]
 name = "addr2line"
-version = "0.17.0"
+version = "0.19.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
+checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
 dependencies = [
  "compiler_builtins",
  "gimli",
@@ -50,9 +50,9 @@ dependencies = [
 
 [[package]]
 name = "compiler_builtins"
-version = "0.1.89"
+version = "0.1.91"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fc9c2080d347a2c316518840ac9194644a9993dfa1e9778ef38979a339f5d8b"
+checksum = "571298a3cce7e2afbd3d61abb91a18667d5ab25993ec577a88ee8ac45f00cc3a"
 dependencies = [
  "rustc-std-workspace-core",
 ]
@@ -95,9 +95,9 @@ dependencies = [
 
 [[package]]
 name = "gimli"
-version = "0.26.2"
+version = "0.27.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
 dependencies = [
  "compiler_builtins",
  "rustc-std-workspace-alloc",
@@ -128,9 +128,9 @@ dependencies = [
 
 [[package]]
 name = "libc"
-version = "0.2.140"
+version = "0.2.142"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
+checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
 dependencies = [
  "rustc-std-workspace-core",
 ]
@@ -147,9 +147,9 @@ dependencies = [
 
 [[package]]
 name = "miniz_oxide"
-version = "0.5.4"
+version = "0.6.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34"
+checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
 dependencies = [
  "adler",
  "compiler_builtins",
@@ -159,9 +159,9 @@ dependencies = [
 
 [[package]]
 name = "object"
-version = "0.29.0"
+version = "0.30.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
+checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
 dependencies = [
  "compiler_builtins",
  "memchr",
@@ -202,9 +202,9 @@ dependencies = [
 
 [[package]]
 name = "rustc-demangle"
-version = "0.1.21"
+version = "0.1.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
 dependencies = [
  "compiler_builtins",
  "rustc-std-workspace-core",
diff --git a/compiler/rustc_codegen_cranelift/build_system/mod.rs b/compiler/rustc_codegen_cranelift/build_system/mod.rs
index 8a53acdf7e3..e4ed9be23b7 100644
--- a/compiler/rustc_codegen_cranelift/build_system/mod.rs
+++ b/compiler/rustc_codegen_cranelift/build_system/mod.rs
@@ -43,7 +43,7 @@ pub(crate) enum SysrootKind {
     Llvm,
 }
 
-pub fn main() {
+pub(crate) fn main() {
     if env::var("RUST_BACKTRACE").is_err() {
         env::set_var("RUST_BACKTRACE", "1");
     }
diff --git a/compiler/rustc_codegen_cranelift/build_system/tests.rs b/compiler/rustc_codegen_cranelift/build_system/tests.rs
index 261948a6971..0c25b4aadfa 100644
--- a/compiler/rustc_codegen_cranelift/build_system/tests.rs
+++ b/compiler/rustc_codegen_cranelift/build_system/tests.rs
@@ -2,7 +2,6 @@ use super::build_sysroot;
 use super::config;
 use super::path::{Dirs, RelPath};
 use super::prepare::GitRepo;
-use super::rustc_info::get_host_triple;
 use super::utils::{spawn_and_wait, spawn_and_wait_with_input, CargoProject, Compiler};
 use super::SysrootKind;
 use std::env;
@@ -102,14 +101,14 @@ pub(crate) static RAND_REPO: GitRepo =
 pub(crate) static RAND: CargoProject = CargoProject::new(&RAND_REPO.source_dir(), "rand");
 
 pub(crate) static REGEX_REPO: GitRepo =
-    GitRepo::github("rust-lang", "regex", "a9b2e02352db92ce1f6e5b7ecd41b8bbffbe161a", "regex");
+    GitRepo::github("rust-lang", "regex", "32fed9429eafba0ae92a64b01796a0c5a75b88c8", "regex");
 
 pub(crate) static REGEX: CargoProject = CargoProject::new(&REGEX_REPO.source_dir(), "regex");
 
 pub(crate) static PORTABLE_SIMD_REPO: GitRepo = GitRepo::github(
     "rust-lang",
     "portable-simd",
-    "9bd30e77b3a3c699af102ebb3df0f6110f8aa02e",
+    "ad8afa8c81273b3b49acbea38cd3bcf17a34cf2b",
     "portable-simd",
 );
 
@@ -186,7 +185,9 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
 
         if runner.is_native {
             let mut run_cmd = REGEX.test(&runner.target_compiler, &runner.dirs);
-            run_cmd.args(["--workspace", "--", "-q"]);
+            // regex-capi and regex-debug don't have any tests. Nor do they contain any code
+            // that is useful to test with cg_clif. Skip building them to reduce test time.
+            run_cmd.args(["-p", "regex", "-p", "regex-syntax", "--", "-q"]);
             spawn_and_wait(run_cmd);
         } else {
             eprintln!("Cross-Compiling: Not running tests");
@@ -228,8 +229,11 @@ pub(crate) fn run_tests(
             target_triple.clone(),
         );
 
-        let runner =
-            TestRunner::new(dirs.clone(), target_compiler, get_host_triple() == target_triple);
+        let runner = TestRunner::new(
+            dirs.clone(),
+            target_compiler,
+            bootstrap_host_compiler.triple == target_triple,
+        );
 
         BUILD_EXAMPLE_OUT_DIR.ensure_fresh(dirs);
         runner.run_testsuite(NO_SYSROOT_SUITE);
@@ -250,8 +254,11 @@ pub(crate) fn run_tests(
             target_triple.clone(),
         );
 
-        let runner =
-            TestRunner::new(dirs.clone(), target_compiler, get_host_triple() == target_triple);
+        let runner = TestRunner::new(
+            dirs.clone(),
+            target_compiler,
+            bootstrap_host_compiler.triple == target_triple,
+        );
 
         if run_base_sysroot {
             runner.run_testsuite(BASE_SYSROOT_SUITE);
@@ -275,7 +282,7 @@ struct TestRunner {
 }
 
 impl TestRunner {
-    pub fn new(dirs: Dirs, mut target_compiler: Compiler, is_native: bool) -> Self {
+    fn new(dirs: Dirs, mut target_compiler: Compiler, is_native: bool) -> Self {
         if let Ok(rustflags) = env::var("RUSTFLAGS") {
             target_compiler.rustflags.push(' ');
             target_compiler.rustflags.push_str(&rustflags);
@@ -297,7 +304,7 @@ impl TestRunner {
         Self { is_native, jit_supported, dirs, target_compiler }
     }
 
-    pub fn run_testsuite(&self, tests: &[TestCase]) {
+    fn run_testsuite(&self, tests: &[TestCase]) {
         for TestCase { config, cmd } in tests {
             let (tag, testname) = config.split_once('.').unwrap();
             let tag = tag.to_uppercase();
@@ -382,7 +389,7 @@ impl TestRunner {
         spawn_and_wait(self.rustc_command(args));
     }
 
-    fn run_out_command<'a>(&self, name: &str, args: &[&str]) {
+    fn run_out_command(&self, name: &str, args: &[&str]) {
         let mut full_cmd = vec![];
 
         // Prepend the RUN_WRAPPER's
diff --git a/compiler/rustc_codegen_cranelift/example/alloc_example.rs b/compiler/rustc_codegen_cranelift/example/alloc_example.rs
index 4ede2fe4efe..d994e2fbc0a 100644
--- a/compiler/rustc_codegen_cranelift/example/alloc_example.rs
+++ b/compiler/rustc_codegen_cranelift/example/alloc_example.rs
@@ -18,7 +18,7 @@ extern "C" {
 }
 
 #[panic_handler]
-fn panic_handler(_: &core::panic::PanicInfo) -> ! {
+fn panic_handler(_: &core::panic::PanicInfo<'_>) -> ! {
     core::intrinsics::abort();
 }
 
diff --git a/compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs b/compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs
index d270fec6b71..f7edfa960a2 100644
--- a/compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs
+++ b/compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs
@@ -3,8 +3,8 @@
 #![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
 
 use std::{
-    ops::{Deref, CoerceUnsized, DispatchFromDyn},
     marker::Unsize,
+    ops::{CoerceUnsized, Deref, DispatchFromDyn},
 };
 
 struct Ptr<T: ?Sized>(Box<T>);
@@ -33,7 +33,6 @@ impl<T: ?Sized> Deref for Wrapper<T> {
 impl<T: CoerceUnsized<U>, U> CoerceUnsized<Wrapper<U>> for Wrapper<T> {}
 impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Wrapper<U>> for Wrapper<T> {}
 
-
 trait Trait {
     // This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable
     // without unsized_locals), but wrappers around `Self` currently are not.
diff --git a/compiler/rustc_codegen_cranelift/example/dst-field-align.rs b/compiler/rustc_codegen_cranelift/example/dst-field-align.rs
index 6c338e99912..22fc6ff33e3 100644
--- a/compiler/rustc_codegen_cranelift/example/dst-field-align.rs
+++ b/compiler/rustc_codegen_cranelift/example/dst-field-align.rs
@@ -2,7 +2,7 @@
 #![allow(dead_code)]
 struct Foo<T: ?Sized> {
     a: u16,
-    b: T
+    b: T,
 }
 
 trait Bar {
@@ -10,58 +10,57 @@ trait Bar {
 }
 
 impl Bar for usize {
-    fn get(&self) -> usize { *self }
+    fn get(&self) -> usize {
+        *self
+    }
 }
 
 struct Baz<T: ?Sized> {
-    a: T
+    a: T,
 }
 
 struct HasDrop<T: ?Sized> {
     ptr: Box<usize>,
-    data: T
+    data: T,
 }
 
 fn main() {
     // Test that zero-offset works properly
-    let b : Baz<usize> = Baz { a: 7 };
+    let b: Baz<usize> = Baz { a: 7 };
     assert_eq!(b.a.get(), 7);
-    let b : &Baz<dyn Bar> = &b;
+    let b: &Baz<dyn Bar> = &b;
     assert_eq!(b.a.get(), 7);
 
     // Test that the field is aligned properly
-    let f : Foo<usize> = Foo { a: 0, b: 11 };
+    let f: Foo<usize> = Foo { a: 0, b: 11 };
     assert_eq!(f.b.get(), 11);
-    let ptr1 : *const u8 = &f.b as *const _ as *const u8;
+    let ptr1: *const u8 = &f.b as *const _ as *const u8;
 
-    let f : &Foo<dyn Bar> = &f;
-    let ptr2 : *const u8 = &f.b as *const _ as *const u8;
+    let f: &Foo<dyn Bar> = &f;
+    let ptr2: *const u8 = &f.b as *const _ as *const u8;
     assert_eq!(f.b.get(), 11);
 
     // The pointers should be the same
     assert_eq!(ptr1, ptr2);
 
     // Test that nested DSTs work properly
-    let f : Foo<Foo<usize>> = Foo { a: 0, b: Foo { a: 1, b: 17 }};
+    let f: Foo<Foo<usize>> = Foo { a: 0, b: Foo { a: 1, b: 17 } };
     assert_eq!(f.b.b.get(), 17);
-    let f : &Foo<Foo<dyn Bar>> = &f;
+    let f: &Foo<Foo<dyn Bar>> = &f;
     assert_eq!(f.b.b.get(), 17);
 
     // Test that get the pointer via destructuring works
 
-    let f : Foo<usize> = Foo { a: 0, b: 11 };
-    let f : &Foo<dyn Bar> = &f;
+    let f: Foo<usize> = Foo { a: 0, b: 11 };
+    let f: &Foo<dyn Bar> = &f;
     let &Foo { a: _, b: ref bar } = f;
     assert_eq!(bar.get(), 11);
 
     // Make sure that drop flags don't screw things up
 
-    let d : HasDrop<Baz<[i32; 4]>> = HasDrop {
-        ptr: Box::new(0),
-        data: Baz { a: [1,2,3,4] }
-    };
-    assert_eq!([1,2,3,4], d.data.a);
+    let d: HasDrop<Baz<[i32; 4]>> = HasDrop { ptr: Box::new(0), data: Baz { a: [1, 2, 3, 4] } };
+    assert_eq!([1, 2, 3, 4], d.data.a);
 
-    let d : &HasDrop<Baz<[i32]>> = &d;
-    assert_eq!(&[1,2,3,4], &d.data.a);
+    let d: &HasDrop<Baz<[i32]>> = &d;
+    assert_eq!(&[1, 2, 3, 4], &d.data.a);
 }
diff --git a/compiler/rustc_codegen_cranelift/example/example.rs b/compiler/rustc_codegen_cranelift/example/example.rs
index d5c122bf681..885e55bc764 100644
--- a/compiler/rustc_codegen_cranelift/example/example.rs
+++ b/compiler/rustc_codegen_cranelift/example/example.rs
@@ -11,11 +11,7 @@ pub fn abc(a: u8) -> u8 {
 }
 
 pub fn bcd(b: bool, a: u8) -> u8 {
-    if b {
-        a * 2
-    } else {
-        a * 3
-    }
+    if b { a * 2 } else { a * 3 }
 }
 
 pub fn call() {
diff --git a/compiler/rustc_codegen_cranelift/example/issue-72793.rs b/compiler/rustc_codegen_cranelift/example/issue-72793.rs
index b1bb9b8e1e7..166b0060043 100644
--- a/compiler/rustc_codegen_cranelift/example/issue-72793.rs
+++ b/compiler/rustc_codegen_cranelift/example/issue-72793.rs
@@ -2,7 +2,9 @@
 
 #![feature(type_alias_impl_trait)]
 
-trait T { type Item; }
+trait T {
+    type Item;
+}
 
 type Alias<'a> = impl T<Item = &'a ()>;
 
diff --git a/compiler/rustc_codegen_cranelift/example/issue-91827-extern-types.rs b/compiler/rustc_codegen_cranelift/example/issue-91827-extern-types.rs
index 03910069633..6f39c5edcad 100644
--- a/compiler/rustc_codegen_cranelift/example/issue-91827-extern-types.rs
+++ b/compiler/rustc_codegen_cranelift/example/issue-91827-extern-types.rs
@@ -40,10 +40,7 @@ impl<T, const N: usize> ListImpl<T, N> {
     }
 }
 
-pub static A: ListImpl<u128, 3> = ListImpl {
-    len: 3,
-    data: [5, 6, 7],
-};
+pub static A: ListImpl<u128, 3> = ListImpl { len: 3, data: [5, 6, 7] };
 pub static A_REF: &'static List<u128> = A.as_list();
 pub static A_TAIL_OFFSET: isize = tail_offset(A.as_list());
 
diff --git a/compiler/rustc_codegen_cranelift/example/mini_core.rs b/compiler/rustc_codegen_cranelift/example/mini_core.rs
index 73b83b89f6d..ea97e9f060e 100644
--- a/compiler/rustc_codegen_cranelift/example/mini_core.rs
+++ b/compiler/rustc_codegen_cranelift/example/mini_core.rs
@@ -37,13 +37,13 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
 pub trait DispatchFromDyn<T> {}
 
 // &T -> &U
-impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<&'a U> for &'a T {}
+impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<&'a U> for &'a T {}
 // &mut T -> &mut U
-impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<&'a mut U> for &'a mut T {}
+impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<&'a mut U> for &'a mut T {}
 // *const T -> *const U
-impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
+impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
 // *mut T -> *mut U
-impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
+impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
 impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U>> for Box<T> {}
 
 #[lang = "receiver"]
@@ -288,7 +288,6 @@ impl PartialEq for u32 {
     }
 }
 
-
 impl PartialEq for u64 {
     fn eq(&self, other: &u64) -> bool {
         (*self) == (*other)
@@ -361,7 +360,7 @@ impl<T: ?Sized> PartialEq for *const T {
     }
 }
 
-impl <T: PartialEq> PartialEq for Option<T> {
+impl<T: PartialEq> PartialEq for Option<T> {
     fn eq(&self, other: &Self) -> bool {
         match (self, other) {
             (Some(lhs), Some(rhs)) => *lhs == *rhs,
@@ -472,7 +471,20 @@ pub fn panic(_msg: &'static str) -> ! {
 #[track_caller]
 fn panic_bounds_check(index: usize, len: usize) -> ! {
     unsafe {
-        libc::printf("index out of bounds: the len is %d but the index is %d\n\0" as *const str as *const i8, len, index);
+        libc::printf(
+            "index out of bounds: the len is %d but the index is %d\n\0" as *const str as *const i8,
+            len,
+            index,
+        );
+        intrinsics::abort();
+    }
+}
+
+#[lang = "panic_cannot_unwind"]
+#[track_caller]
+fn panic_cannot_unwind() -> ! {
+    unsafe {
+        libc::puts("panic in a function that cannot unwind\n\0" as *const str as *const i8);
         intrinsics::abort();
     }
 }
@@ -599,7 +611,7 @@ pub mod libc {
     // functions. legacy_stdio_definitions.lib which provides the printf wrapper functions as normal
     // symbols to link against.
     #[cfg_attr(unix, link(name = "c"))]
-    #[cfg_attr(target_env="msvc", link(name="legacy_stdio_definitions"))]
+    #[cfg_attr(target_env = "msvc", link(name = "legacy_stdio_definitions"))]
     extern "C" {
         pub fn printf(format: *const i8, ...) -> i32;
     }
@@ -638,7 +650,7 @@ impl<T> Index<usize> for [T] {
     }
 }
 
-extern {
+extern "C" {
     type VaListImpl;
 }
 
@@ -648,23 +660,33 @@ pub struct VaList<'a>(&'a mut VaListImpl);
 
 #[rustc_builtin_macro]
 #[rustc_macro_transparency = "semitransparent"]
-pub macro stringify($($t:tt)*) { /* compiler built-in */ }
+pub macro stringify($($t:tt)*) {
+    /* compiler built-in */
+}
 
 #[rustc_builtin_macro]
 #[rustc_macro_transparency = "semitransparent"]
-pub macro file() { /* compiler built-in */ }
+pub macro file() {
+    /* compiler built-in */
+}
 
 #[rustc_builtin_macro]
 #[rustc_macro_transparency = "semitransparent"]
-pub macro line() { /* compiler built-in */ }
+pub macro line() {
+    /* compiler built-in */
+}
 
 #[rustc_builtin_macro]
 #[rustc_macro_transparency = "semitransparent"]
-pub macro cfg() { /* compiler built-in */ }
+pub macro cfg() {
+    /* compiler built-in */
+}
 
 #[rustc_builtin_macro]
 #[rustc_macro_transparency = "semitransparent"]
-pub macro global_asm() { /* compiler built-in */ }
+pub macro global_asm() {
+    /* compiler built-in */
+}
 
 pub static A_STATIC: u8 = 42;
 
@@ -676,7 +698,7 @@ struct PanicLocation {
 }
 
 #[no_mangle]
-#[cfg(not(windows))]
+#[cfg(not(all(windows, target_env = "gnu")))]
 pub fn get_tls() -> u8 {
     #[thread_local]
     static A: u8 = 42;
diff --git a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
index 6ad3268e70d..5a55aa215bf 100644
--- a/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
+++ b/compiler/rustc_codegen_cranelift/example/mini_core_hello_world.rs
@@ -319,7 +319,7 @@ fn main() {
 
     from_decimal_string();
 
-    #[cfg(not(any(jit, windows)))]
+    #[cfg(all(not(jit), not(all(windows, target_env = "gnu"))))]
     test_tls();
 
     #[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "darwin")))]
@@ -524,6 +524,7 @@ pub enum E1 {
 // Computing the discriminant used to be done using the niche type (here `u8`,
 // from the `bool` field of `V1`), overflowing for variants with large enough
 // indices (`V3` and `V4`), causing them to be interpreted as other variants.
+#[rustfmt::skip]
 pub enum E2<X> {
     V1 { f: bool },
 
diff --git a/compiler/rustc_codegen_cranelift/example/mod_bench.rs b/compiler/rustc_codegen_cranelift/example/mod_bench.rs
index e3e8a3c2d6a..f15e48acc41 100644
--- a/compiler/rustc_codegen_cranelift/example/mod_bench.rs
+++ b/compiler/rustc_codegen_cranelift/example/mod_bench.rs
@@ -3,15 +3,15 @@
 
 #[cfg_attr(unix, link(name = "c"))]
 #[cfg_attr(target_env = "msvc", link(name = "msvcrt"))]
-extern {}
+extern "C" {}
 
 #[panic_handler]
-fn panic_handler(_: &core::panic::PanicInfo) -> ! {
+fn panic_handler(_: &core::panic::PanicInfo<'_>) -> ! {
     core::intrinsics::abort();
 }
 
-#[lang="eh_personality"]
-fn eh_personality(){}
+#[lang = "eh_personality"]
+fn eh_personality() {}
 
 // Required for rustc_codegen_llvm
 #[no_mangle]
diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs
index e34b35d5c4a..ab4045d11a6 100644
--- a/compiler/rustc_codegen_cranelift/example/std_example.rs
+++ b/compiler/rustc_codegen_cranelift/example/std_example.rs
@@ -1,4 +1,4 @@
-#![feature(core_intrinsics, generators, generator_trait, is_sorted)]
+#![feature(core_intrinsics, generators, generator_trait, is_sorted, repr_simd)]
 
 #[cfg(target_arch = "x86_64")]
 use std::arch::x86_64::*;
@@ -56,7 +56,10 @@ fn main() {
 
     assert_eq!(0b0000000000000000000000000010000010000000000000000000000000000000_0000000000100000000000000000000000001000000000000100000000000000u128.leading_zeros(), 26);
     assert_eq!(0b0000000000000000000000000010000000000000000000000000000000000000_0000000000000000000000000000000000001000000000000000000010000000u128.trailing_zeros(), 7);
-    assert_eq!(core::intrinsics::saturating_sub(0, -170141183460469231731687303715884105728i128), 170141183460469231731687303715884105727i128);
+    assert_eq!(
+        core::intrinsics::saturating_sub(0, -170141183460469231731687303715884105728i128),
+        170141183460469231731687303715884105727i128
+    );
 
     std::hint::black_box(std::hint::black_box(7571400400375753350092698930310845914i128) * 10);
     assert!(0i128.checked_div(2i128).is_some());
@@ -113,7 +116,9 @@ fn main() {
 
     Box::pin(move |mut _task_context| {
         yield ();
-    }).as_mut().resume(0);
+    })
+    .as_mut()
+    .resume(0);
 
     #[derive(Copy, Clone)]
     enum Nums {
@@ -148,12 +153,20 @@ fn main() {
 
         enum Never {}
     }
+
+    foo(I64X2(0, 0));
 }
 
 fn panic(_: u128) {
     panic!();
 }
 
+#[repr(simd)]
+struct I64X2(i64, i64);
+
+#[allow(improper_ctypes_definitions)]
+extern "C" fn foo(_a: I64X2) {}
+
 #[cfg(target_arch = "x86_64")]
 #[target_feature(enable = "sse2")]
 unsafe fn test_simd() {
@@ -168,7 +181,10 @@ unsafe fn test_simd() {
     let (zero0, zero1) = std::mem::transmute::<_, (u64, u64)>(x);
     assert_eq!((zero0, zero1), (0, 0));
     assert_eq!(std::mem::transmute::<_, [u16; 8]>(or), [7, 7, 7, 7, 7, 7, 7, 7]);
-    assert_eq!(std::mem::transmute::<_, [u16; 8]>(cmp_eq), [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]);
+    assert_eq!(
+        std::mem::transmute::<_, [u16; 8]>(cmp_eq),
+        [0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff]
+    );
     assert_eq!(std::mem::transmute::<_, [u16; 8]>(cmp_lt), [0, 0, 0, 0, 0, 0, 0, 0]);
 
     test_mm_slli_si128();
@@ -182,6 +198,7 @@ unsafe fn test_simd() {
     test_mm_extract_epi8();
     test_mm_insert_epi16();
 
+    #[rustfmt::skip]
     let mask1 = _mm_movemask_epi8(dbg!(_mm_setr_epi8(255u8 as i8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)));
     assert_eq!(mask1, 1);
 }
@@ -343,7 +360,7 @@ fn test_checked_mul() {
 #[derive(PartialEq)]
 enum LoopState {
     Continue(()),
-    Break(())
+    Break(()),
 }
 
 pub enum Instruction {
diff --git a/compiler/rustc_codegen_cranelift/example/subslice-patterns-const-eval.rs b/compiler/rustc_codegen_cranelift/example/subslice-patterns-const-eval.rs
index 2cb84786f56..3c878916663 100644
--- a/compiler/rustc_codegen_cranelift/example/subslice-patterns-const-eval.rs
+++ b/compiler/rustc_codegen_cranelift/example/subslice-patterns-const-eval.rs
@@ -19,7 +19,9 @@ macro_rules! n {
 // This macro has an unused variable so that it can be repeated base on the
 // number of times a repeated variable (`$e` in `z`) occurs.
 macro_rules! zed {
-    ($e:expr) => { Z }
+    ($e:expr) => {
+        Z
+    };
 }
 
 macro_rules! z {
@@ -32,12 +34,14 @@ macro_rules! z {
 macro_rules! compare_evaluation {
     ($e:expr, $t:ty $(,)?) => {{
         const CONST_EVAL: $t = $e;
-        const fn const_eval() -> $t { $e }
+        const fn const_eval() -> $t {
+            $e
+        }
         static CONST_EVAL2: $t = const_eval();
         let runtime_eval = $e;
         assert_eq!(CONST_EVAL, runtime_eval);
         assert_eq!(CONST_EVAL2, runtime_eval);
-    }}
+    }};
 }
 
 // Repeat `$test`, substituting the given macro variables with the given
@@ -65,6 +69,7 @@ macro_rules! repeat {
     }
 }
 
+#[rustfmt::skip]
 fn main() {
     repeat! {
         ($arr $Ty); n, N; z, Z:
diff --git a/compiler/rustc_codegen_cranelift/rust-toolchain b/compiler/rustc_codegen_cranelift/rust-toolchain
index 2236a6ca155..59ad80c3207 100644
--- a/compiler/rustc_codegen_cranelift/rust-toolchain
+++ b/compiler/rustc_codegen_cranelift/rust-toolchain
@@ -1,3 +1,3 @@
 [toolchain]
-channel = "nightly-2023-03-15"
+channel = "nightly-2023-04-29"
 components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
diff --git a/compiler/rustc_codegen_cranelift/scripts/cargo-clif.rs b/compiler/rustc_codegen_cranelift/scripts/cargo-clif.rs
index 939a1f1ca59..e2db7d03a9d 100644
--- a/compiler/rustc_codegen_cranelift/scripts/cargo-clif.rs
+++ b/compiler/rustc_codegen_cranelift/scripts/cargo-clif.rs
@@ -64,7 +64,7 @@ fn main() {
     };
 
     #[cfg(unix)]
-    Command::new("cargo").args(args).exec();
+    panic!("Failed to spawn cargo: {}", Command::new("cargo").args(args).exec());
 
     #[cfg(not(unix))]
     std::process::exit(
diff --git a/compiler/rustc_codegen_cranelift/scripts/rustc-clif.rs b/compiler/rustc_codegen_cranelift/scripts/rustc-clif.rs
index b9bba7f2e08..ab496a4a684 100644
--- a/compiler/rustc_codegen_cranelift/scripts/rustc-clif.rs
+++ b/compiler/rustc_codegen_cranelift/scripts/rustc-clif.rs
@@ -15,22 +15,24 @@ fn main() {
         env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
     );
 
-    let mut args = std::env::args_os().skip(1).collect::<Vec<_>>();
+    let passed_args = std::env::args_os().skip(1).collect::<Vec<_>>();
+    let mut args = vec![];
     args.push(OsString::from("-Cpanic=abort"));
     args.push(OsString::from("-Zpanic-abort-tests"));
     let mut codegen_backend_arg = OsString::from("-Zcodegen-backend=");
     codegen_backend_arg.push(cg_clif_dylib_path);
     args.push(codegen_backend_arg);
-    if !args.contains(&OsString::from("--sysroot")) {
+    if !passed_args.contains(&OsString::from("--sysroot")) {
         args.push(OsString::from("--sysroot"));
         args.push(OsString::from(sysroot.to_str().unwrap()));
     }
+    args.extend(passed_args);
 
     // Ensure that the right toolchain is used
     env::set_var("RUSTUP_TOOLCHAIN", env!("TOOLCHAIN_NAME"));
 
     #[cfg(unix)]
-    Command::new("rustc").args(args).exec();
+    panic!("Failed to spawn rustc: {}", Command::new("rustc").args(args).exec());
 
     #[cfg(not(unix))]
     std::process::exit(
diff --git a/compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs b/compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
index 167631eaf7e..545844446c5 100644
--- a/compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
+++ b/compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
@@ -15,22 +15,24 @@ fn main() {
         env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
     );
 
-    let mut args = std::env::args_os().skip(1).collect::<Vec<_>>();
+    let passed_args = std::env::args_os().skip(1).collect::<Vec<_>>();
+    let mut args = vec![];
     args.push(OsString::from("-Cpanic=abort"));
     args.push(OsString::from("-Zpanic-abort-tests"));
     let mut codegen_backend_arg = OsString::from("-Zcodegen-backend=");
     codegen_backend_arg.push(cg_clif_dylib_path);
     args.push(codegen_backend_arg);
-    if !args.contains(&OsString::from("--sysroot")) {
+    if !passed_args.contains(&OsString::from("--sysroot")) {
         args.push(OsString::from("--sysroot"));
         args.push(OsString::from(sysroot.to_str().unwrap()));
     }
+    args.extend(passed_args);
 
     // Ensure that the right toolchain is used
     env::set_var("RUSTUP_TOOLCHAIN", env!("TOOLCHAIN_NAME"));
 
     #[cfg(unix)]
-    Command::new("rustdoc").args(args).exec();
+    panic!("Failed to spawn rustdoc: {}", Command::new("rustdoc").args(args).exec());
 
     #[cfg(not(unix))]
     std::process::exit(
diff --git a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
index 20dcb4cf34d..1329d3ea076 100755
--- a/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
+++ b/compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
@@ -10,7 +10,8 @@ pushd rust
 
 command -v rg >/dev/null 2>&1 || cargo install ripgrep
 
-rm -r tests/ui/{extern/,unsized-locals/,lto/,linkage*} || true
+# FIXME add needs-asm-support to all tests in tests/ui/asm
+rm -r tests/ui/{unsized-locals/,lto/,linkage*} || true
 for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" tests/{codegen-units,ui,incremental}); do
   rm $test
 done
@@ -27,13 +28,24 @@ rm tests/ui/parser/unclosed-delimiter-in-dep.rs # submodule contains //~ERROR
 # ================
 
 # requires stack unwinding
+# FIXME add needs-unwind to these tests
 rm tests/incremental/change_crate_dep_kind.rs
 rm tests/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
+rm -r tests/run-make/c-unwind-abi-catch-lib-panic
+rm -r tests/run-make/c-unwind-abi-catch-panic
+rm -r tests/run-make/debug-assertions
+rm -r tests/run-make/foreign-double-unwind
+rm -r tests/run-make/foreign-exceptions
+rm -r tests/run-make/foreign-rust-exceptions
+rm -r tests/run-make/libtest-json
+rm -r tests/run-make/static-unwinding
 
 # requires compiling with -Cpanic=unwind
 rm -r tests/ui/macros/rfc-2011-nicer-assert-messages/
 rm -r tests/run-make/test-benches
 rm tests/ui/test-attrs/test-type.rs
+rm -r tests/run-make/const_fn_mir
+rm -r tests/run-make/intrinsic-unreachable
 
 # vendor intrinsics
 rm tests/ui/sse2.rs # cpuid not supported, so sse2 not detected
@@ -49,6 +61,7 @@ rm tests/incremental/hashes/statics.rs # same
 # variadic arguments
 rm tests/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
 rm tests/ui/abi/variadic-ffi.rs # requires callee side vararg support
+rm -r tests/run-make/c-link-to-rust-va-list-fn # requires callee side vararg support
 
 # unsized locals
 rm -r tests/run-pass-valgrind/unsized-locals
@@ -59,6 +72,19 @@ rm tests/ui/target-feature/missing-plusminus.rs # error not implemented
 rm tests/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
 rm -r tests/run-make/emit-named-files # requires full --emit support
 rm -r tests/run-make/repr128-dwarf # debuginfo test
+rm -r tests/run-make/split-debuginfo # same
+rm -r tests/run-make/symbols-include-type-name # --emit=asm not supported
+rm -r tests/run-make/target-specs # i686 not supported by Cranelift
+rm -r tests/run-make/mismatching-target-triples # same
+rm -r tests/run-make/use-extern-for-plugins # same
+
+# requires LTO
+rm -r tests/run-make/cdylib
+rm -r tests/run-make/issue-14500
+rm -r tests/run-make/issue-64153
+rm -r tests/run-make/codegen-options-parsing
+rm -r tests/run-make/lto-*
+rm -r tests/run-make/reproducible-build-2
 
 # optimization tests
 # ==================
@@ -70,7 +96,14 @@ rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
 # backend specific tests
 # ======================
 rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
+rm -r tests/run-make/cross-lang-lto # same
+rm -r tests/run-make/issue-7349 # same
+rm -r tests/run-make/sepcomp-inlining # same
+rm -r tests/run-make/sepcomp-separate # same
+rm -r tests/run-make/sepcomp-cci-copies # same
+rm -r tests/run-make/volatile-intrinsics # same
 rm tests/ui/abi/stack-protector.rs # requires stack protector support
+rm -r tests/run-make/emit-stack-sizes # requires support for -Z emit-stack-sizes
 
 # giving different but possibly correct results
 # =============================================
@@ -95,13 +128,12 @@ rm tests/ui/proc-macro/no-missing-docs.rs # same
 rm tests/ui/rust-2018/proc-macro-crate-in-paths.rs # same
 rm tests/ui/proc-macro/allowed-signatures.rs # same
 
+# rustdoc-clif passes extra args, suppressing the help message when no args are passed
+rm -r tests/run-make/issue-88756-default-output
+
 # doesn't work due to the way the rustc test suite is invoked.
 # should work when using ./x.py test the way it is intended
 # ============================================================
-rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
-rm -r tests/run-make/unstable-flag-required # same
-rm -r tests/run-make/rustdoc-* # same
-rm -r tests/run-make/issue-88756-default-output # same
 rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
 rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
 
@@ -112,17 +144,41 @@ rm tests/incremental/spike-neg2.rs # same
 
 rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
 
-rm tests/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type field (#1318)
 rm tests/ui/simd/simd-bitmask.rs # crash
 
+rm -r tests/run-make/issue-51671 # wrong filename given in case of --emit=obj
+rm -r tests/run-make/issue-30063 # same
+rm -r tests/run-make/multiple-emits # same
+rm -r tests/run-make/output-type-permutations # same
+rm -r tests/run-make/used # same
+
 # bugs in the test suite
 # ======================
 rm tests/ui/backtrace.rs # TODO warning
-rm tests/ui/simple_global_asm.rs # TODO add needs-asm-support
 rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
 
 rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
 
+cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist
+
+# prevent $(RUSTDOC) from picking up the sysroot built by x.py. It conflicts with the one used by
+# rustdoc-clif
+cat <<EOF | git apply -
+diff --git a/tests/run-make/tools.mk b/tests/run-make/tools.mk
+index ea06b620c4c..b969d0009c6 100644
+--- a/tests/run-make/tools.mk
++++ b/tests/run-make/tools.mk
+@@ -9,7 +9,7 @@ RUSTC_ORIGINAL := \$(RUSTC)
+ BARE_RUSTC := \$(HOST_RPATH_ENV) '\$(RUSTC)'
+ BARE_RUSTDOC := \$(HOST_RPATH_ENV) '\$(RUSTDOC)'
+ RUSTC := \$(BARE_RUSTC) --out-dir \$(TMPDIR) -L \$(TMPDIR) \$(RUSTFLAGS)
+-RUSTDOC := \$(BARE_RUSTDOC) -L \$(TARGET_RPATH_DIR)
++RUSTDOC := \$(BARE_RUSTDOC)
+ ifdef RUSTC_LINKER
+ RUSTC := \$(RUSTC) -Clinker='\$(RUSTC_LINKER)'
+ RUSTDOC := \$(RUSTDOC) -Clinker='\$(RUSTC_LINKER)'
+EOF
+
 echo "[TEST] rustc test suite"
-RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
+COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 --test-args=--nocapture tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
 popd
diff --git a/compiler/rustc_codegen_cranelift/src/abi/comments.rs b/compiler/rustc_codegen_cranelift/src/abi/comments.rs
index abf63e33c35..364503fd363 100644
--- a/compiler/rustc_codegen_cranelift/src/abi/comments.rs
+++ b/compiler/rustc_codegen_cranelift/src/abi/comments.rs
@@ -6,8 +6,6 @@ use std::borrow::Cow;
 use rustc_middle::mir;
 use rustc_target::abi::call::PassMode;
 
-use cranelift_codegen::entity::EntityRef;
-
 use crate::prelude::*;
 
 pub(super) fn add_args_header_comment(fx: &mut FunctionCx<'_, '_, '_>) {
@@ -91,35 +89,7 @@ pub(super) fn add_local_place_comments<'tcx>(
         largest_niche: _,
     } = layout.0.0;
 
-    let (kind, extra) = match *place.inner() {
-        CPlaceInner::Var(place_local, var) => {
-            assert_eq!(local, place_local);
-            ("ssa", Cow::Owned(format!(",var={}", var.index())))
-        }
-        CPlaceInner::VarPair(place_local, var1, var2) => {
-            assert_eq!(local, place_local);
-            ("ssa", Cow::Owned(format!("var=({}, {})", var1.index(), var2.index())))
-        }
-        CPlaceInner::VarLane(_local, _var, _lane) => unreachable!(),
-        CPlaceInner::Addr(ptr, meta) => {
-            let meta = if let Some(meta) = meta {
-                Cow::Owned(format!("meta={}", meta))
-            } else {
-                Cow::Borrowed("")
-            };
-            match ptr.debug_base_and_offset() {
-                (crate::pointer::PointerBase::Addr(addr), offset) => {
-                    ("reuse", format!("storage={}{}{}", addr, offset, meta).into())
-                }
-                (crate::pointer::PointerBase::Stack(stack_slot), offset) => {
-                    ("stack", format!("storage={}{}{}", stack_slot, offset, meta).into())
-                }
-                (crate::pointer::PointerBase::Dangling(align), offset) => {
-                    ("zst", format!("align={},offset={}", align.bytes(), offset).into())
-                }
-            }
-        }
-    };
+    let (kind, extra) = place.debug_comment();
 
     fx.add_global_comment(format!(
         "{:<5} {:5} {:30} {:4}b {}, {}{}{}",
diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs
index 0b4d4ecf2e4..e533afcfaa9 100644
--- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs
@@ -605,9 +605,9 @@ pub(crate) fn codegen_drop<'tcx>(
                 //                | ...   |
                 //                \-------/
                 //
-                let (ptr, vtable) = drop_place.to_ptr_maybe_unsized();
+                let (ptr, vtable) = drop_place.to_ptr_unsized();
                 let ptr = ptr.get_addr(fx);
-                let drop_fn = crate::vtable::drop_fn_of_obj(fx, vtable.unwrap());
+                let drop_fn = crate::vtable::drop_fn_of_obj(fx, vtable);
 
                 // FIXME(eddyb) perhaps move some of this logic into
                 // `Instance::resolve_drop_in_place`?
diff --git a/compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs b/compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs
index e5ad31eb948..d847e524f8c 100644
--- a/compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs
+++ b/compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs
@@ -84,7 +84,7 @@ impl<'tcx> ArgAbiExt<'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
                     attrs
                 )],
                 Abi::Vector { .. } => {
-                    let vector_ty = crate::intrinsics::clif_vector_type(tcx, self.layout).unwrap();
+                    let vector_ty = crate::intrinsics::clif_vector_type(tcx, self.layout);
                     smallvec![AbiParam::new(vector_ty)]
                 }
                 _ => unreachable!("{:?}", self.layout.abi),
@@ -135,7 +135,7 @@ impl<'tcx> ArgAbiExt<'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
                     (None, vec![AbiParam::new(scalar_to_clif_type(tcx, scalar))])
                 }
                 Abi::Vector { .. } => {
-                    let vector_ty = crate::intrinsics::clif_vector_type(tcx, self.layout).unwrap();
+                    let vector_ty = crate::intrinsics::clif_vector_type(tcx, self.layout);
                     (None, vec![AbiParam::new(vector_ty)])
                 }
                 _ => unreachable!("{:?}", self.layout.abi),
diff --git a/compiler/rustc_codegen_cranelift/src/abi/returning.rs b/compiler/rustc_codegen_cranelift/src/abi/returning.rs
index bd055216e36..14e54d5ee38 100644
--- a/compiler/rustc_codegen_cranelift/src/abi/returning.rs
+++ b/compiler/rustc_codegen_cranelift/src/abi/returning.rs
@@ -63,11 +63,11 @@ pub(super) fn codegen_with_call_return_arg<'tcx>(
     let (ret_temp_place, return_ptr) = match ret_arg_abi.mode {
         PassMode::Ignore => (None, None),
         PassMode::Indirect { attrs: _, extra_attrs: None, on_stack: _ } => {
-            if matches!(ret_place.inner(), CPlaceInner::Addr(_, None)) {
+            if let Some(ret_ptr) = ret_place.try_to_ptr() {
                 // This is an optimization to prevent unnecessary copies of the return value when
                 // the return place is already a memory place as opposed to a register.
                 // This match arm can be safely removed.
-                (None, Some(ret_place.to_ptr().get_addr(fx)))
+                (None, Some(ret_ptr.get_addr(fx)))
             } else {
                 let place = CPlace::new_stack_slot(fx, ret_arg_abi.layout);
                 (Some(place), Some(place.to_ptr().get_addr(fx)))
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs
index c181c73e4be..a259a4f30b2 100644
--- a/compiler/rustc_codegen_cranelift/src/base.rs
+++ b/compiler/rustc_codegen_cranelift/src/base.rs
@@ -141,16 +141,6 @@ pub(crate) fn compile_fn(
     context.clear();
     context.func = codegened_func.func;
 
-    // If the return block is not reachable, then the SSA builder may have inserted an `iconst.i128`
-    // instruction, which doesn't have an encoding.
-    context.compute_cfg();
-    context.compute_domtree();
-    context.eliminate_unreachable_code(module.isa()).unwrap();
-    context.dce(module.isa()).unwrap();
-    // Some Cranelift optimizations expect the domtree to not yet be computed and as such don't
-    // invalidate it when it would change.
-    context.domtree.clear();
-
     #[cfg(any())] // This is never true
     let _clif_guard = {
         use std::fmt::Write;
@@ -182,27 +172,6 @@ pub(crate) fn compile_fn(
     cx.profiler.generic_activity("define function").run(|| {
         context.want_disasm = cx.should_write_ir;
         module.define_function(codegened_func.func_id, context).unwrap();
-
-        if cx.profiler.enabled() {
-            let mut recording_args = false;
-            cx.profiler
-                .generic_activity_with_arg_recorder(
-                    "define function (clif pass timings)",
-                    |recorder| {
-                        let pass_times = cranelift_codegen::timing::take_current();
-                        // Replace newlines with | as measureme doesn't allow control characters like
-                        // newlines inside strings.
-                        recorder.record_arg(format!("{}", pass_times).replace('\n', " | "));
-                        recording_args = true;
-                    },
-                )
-                .run(|| {
-                    if recording_args {
-                        // Wait a tiny bit to ensure chrome's profiler doesn't hide the event
-                        std::thread::sleep(std::time::Duration::from_nanos(2))
-                    }
-                });
-        }
     });
 
     if cx.should_write_ir {
@@ -216,7 +185,7 @@ pub(crate) fn compile_fn(
             &clif_comments,
         );
 
-        if let Some(disasm) = &context.compiled_code().unwrap().disasm {
+        if let Some(disasm) = &context.compiled_code().unwrap().vcode {
             crate::pretty_clif::write_ir_file(
                 &cx.output_filenames,
                 &format!("{}.vcode", codegened_func.symbol_name),
@@ -524,13 +493,14 @@ fn codegen_stmt<'tcx>(
 
     fx.set_debug_loc(stmt.source_info);
 
-    #[cfg(any())] // This is never true
     match &stmt.kind {
         StatementKind::StorageLive(..) | StatementKind::StorageDead(..) => {} // Those are not very useful
         _ => {
             if fx.clif_comments.enabled() {
                 let inst = fx.bcx.func.layout.last_inst(cur_block).unwrap();
-                fx.add_comment(inst, format!("{:?}", stmt));
+                with_no_trimmed_paths!({
+                    fx.add_comment(inst, format!("{:?}", stmt));
+                });
             }
         }
     }
@@ -715,11 +685,11 @@ fn codegen_stmt<'tcx>(
                 }
                 Rvalue::Cast(CastKind::Pointer(PointerCast::Unsize), ref operand, _to_ty) => {
                     let operand = codegen_operand(fx, operand);
-                    operand.unsize_value(fx, lval);
+                    crate::unsize::coerce_unsized_into(fx, operand, lval);
                 }
                 Rvalue::Cast(CastKind::DynStar, ref operand, _) => {
                     let operand = codegen_operand(fx, operand);
-                    operand.coerce_dyn_star(fx, lval);
+                    crate::unsize::coerce_dyn_star(fx, operand, lval);
                 }
                 Rvalue::Cast(CastKind::Transmute, ref operand, _to_ty) => {
                     let operand = codegen_operand(fx, operand);
@@ -791,7 +761,10 @@ fn codegen_stmt<'tcx>(
                             layout.offset_of_subfield(fx, fields.iter().map(|f| f.index())).bytes()
                         }
                     };
-                    let val = CValue::const_val(fx, fx.layout_of(fx.tcx.types.usize), val.into());
+                    let val = CValue::by_val(
+                        fx.bcx.ins().iconst(fx.pointer_type, i64::try_from(val).unwrap()),
+                        fx.layout_of(fx.tcx.types.usize),
+                    );
                     lval.write_cvalue(fx, val);
                 }
                 Rvalue::Aggregate(ref kind, ref operands) => {
@@ -866,9 +839,7 @@ fn codegen_array_len<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, place: CPlace<'tcx
             let len = fx.monomorphize(len).eval_target_usize(fx.tcx, ParamEnv::reveal_all()) as i64;
             fx.bcx.ins().iconst(fx.pointer_type, len)
         }
-        ty::Slice(_elem_ty) => {
-            place.to_ptr_maybe_unsized().1.expect("Length metadata for slice place")
-        }
+        ty::Slice(_elem_ty) => place.to_ptr_unsized().1,
         _ => bug!("Rvalue::Len({:?})", place),
     }
 }
@@ -922,8 +893,7 @@ pub(crate) fn codegen_place<'tcx>(
                     ty::Slice(elem_ty) => {
                         assert!(from_end, "slice subslices should be `from_end`");
                         let elem_layout = fx.layout_of(*elem_ty);
-                        let (ptr, len) = cplace.to_ptr_maybe_unsized();
-                        let len = len.unwrap();
+                        let (ptr, len) = cplace.to_ptr_unsized();
                         cplace = CPlace::for_ptr_with_extra(
                             ptr.offset_i64(fx, elem_layout.size.bytes() as i64 * (from as i64)),
                             fx.bcx.ins().iadd_imm(len, -(from as i64 + to as i64)),
diff --git a/compiler/rustc_codegen_cranelift/src/cast.rs b/compiler/rustc_codegen_cranelift/src/cast.rs
index 032d1151041..6bf3a866ba4 100644
--- a/compiler/rustc_codegen_cranelift/src/cast.rs
+++ b/compiler/rustc_codegen_cranelift/src/cast.rs
@@ -103,7 +103,7 @@ pub(crate) fn clif_int_or_float_cast(
                     vec![AbiParam::new(types::I64X2)],
                     &[from],
                 )[0];
-                // FIXME use bitcast instead of store to get from i64x2 to i128
+                // FIXME(bytecodealliance/wasmtime#6104) use bitcast instead of store to get from i64x2 to i128
                 let stack_slot = fx.bcx.create_sized_stack_slot(StackSlotData {
                     kind: StackSlotKind::ExplicitSlot,
                     size: 16,
diff --git a/compiler/rustc_codegen_cranelift/src/codegen_i128.rs b/compiler/rustc_codegen_cranelift/src/codegen_i128.rs
index f674ce776a6..f751d8c179d 100644
--- a/compiler/rustc_codegen_cranelift/src/codegen_i128.rs
+++ b/compiler/rustc_codegen_cranelift/src/codegen_i128.rs
@@ -7,7 +7,6 @@ use crate::prelude::*;
 pub(crate) fn maybe_codegen<'tcx>(
     fx: &mut FunctionCx<'_, '_, 'tcx>,
     bin_op: BinOp,
-    checked: bool,
     lhs: CValue<'tcx>,
     rhs: CValue<'tcx>,
 ) -> Option<CValue<'tcx>> {
@@ -22,69 +21,23 @@ pub(crate) fn maybe_codegen<'tcx>(
     let is_signed = type_sign(lhs.layout().ty);
 
     match bin_op {
-        BinOp::BitAnd | BinOp::BitOr | BinOp::BitXor => {
-            assert!(!checked);
-            None
-        }
-        BinOp::Add | BinOp::Sub if !checked => None,
-        BinOp::Mul if !checked || is_signed => {
-            if !checked {
-                let args = [lhs.load_scalar(fx), rhs.load_scalar(fx)];
-                let ret_val = fx.lib_call(
-                    "__multi3",
-                    vec![AbiParam::new(types::I128), AbiParam::new(types::I128)],
-                    vec![AbiParam::new(types::I128)],
-                    &args,
-                )[0];
-                Some(CValue::by_val(
-                    ret_val,
-                    fx.layout_of(if is_signed { fx.tcx.types.i128 } else { fx.tcx.types.u128 }),
-                ))
-            } else {
-                let out_ty = fx.tcx.mk_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
-                let oflow = CPlace::new_stack_slot(fx, fx.layout_of(fx.tcx.types.i32));
-                let lhs = lhs.load_scalar(fx);
-                let rhs = rhs.load_scalar(fx);
-                let oflow_ptr = oflow.to_ptr().get_addr(fx);
-                let res = fx.lib_call_unadjusted(
-                    "__muloti4",
-                    vec![
-                        AbiParam::new(types::I128),
-                        AbiParam::new(types::I128),
-                        AbiParam::new(fx.pointer_type),
-                    ],
-                    vec![AbiParam::new(types::I128)],
-                    &[lhs, rhs, oflow_ptr],
-                )[0];
-                let oflow = oflow.to_cvalue(fx).load_scalar(fx);
-                let oflow = fx.bcx.ins().ireduce(types::I8, oflow);
-                Some(CValue::by_val_pair(res, oflow, fx.layout_of(out_ty)))
-            }
-        }
-        BinOp::Add | BinOp::Sub | BinOp::Mul => {
-            assert!(checked);
-            let out_ty = fx.tcx.mk_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
-            let out_place = CPlace::new_stack_slot(fx, fx.layout_of(out_ty));
-            let param_types = vec![
-                AbiParam::special(fx.pointer_type, ArgumentPurpose::StructReturn),
-                AbiParam::new(types::I128),
-                AbiParam::new(types::I128),
-            ];
-            let args = [out_place.to_ptr().get_addr(fx), lhs.load_scalar(fx), rhs.load_scalar(fx)];
-            let name = match (bin_op, is_signed) {
-                (BinOp::Add, false) => "__rust_u128_addo",
-                (BinOp::Add, true) => "__rust_i128_addo",
-                (BinOp::Sub, false) => "__rust_u128_subo",
-                (BinOp::Sub, true) => "__rust_i128_subo",
-                (BinOp::Mul, false) => "__rust_u128_mulo",
-                _ => unreachable!(),
-            };
-            fx.lib_call(name, param_types, vec![], &args);
-            Some(out_place.to_cvalue(fx))
+        BinOp::BitAnd | BinOp::BitOr | BinOp::BitXor => None,
+        BinOp::Add | BinOp::Sub => None,
+        BinOp::Mul => {
+            let args = [lhs.load_scalar(fx), rhs.load_scalar(fx)];
+            let ret_val = fx.lib_call(
+                "__multi3",
+                vec![AbiParam::new(types::I128), AbiParam::new(types::I128)],
+                vec![AbiParam::new(types::I128)],
+                &args,
+            )[0];
+            Some(CValue::by_val(
+                ret_val,
+                fx.layout_of(if is_signed { fx.tcx.types.i128 } else { fx.tcx.types.u128 }),
+            ))
         }
         BinOp::Offset => unreachable!("offset should only be used on pointers, not 128bit ints"),
         BinOp::Div | BinOp::Rem => {
-            assert!(!checked);
             let name = match (bin_op, is_signed) {
                 (BinOp::Div, false) => "__udivti3",
                 (BinOp::Div, true) => "__divti3",
@@ -100,7 +53,7 @@ pub(crate) fn maybe_codegen<'tcx>(
                     vec![AbiParam::new(types::I64X2)],
                     &args,
                 )[0];
-                // FIXME use bitcast instead of store to get from i64x2 to i128
+                // FIXME(bytecodealliance/wasmtime#6104) use bitcast instead of store to get from i64x2 to i128
                 let ret_place = CPlace::new_stack_slot(fx, lhs.layout());
                 ret_place.to_ptr().store(fx, ret, MemFlags::trusted());
                 Some(ret_place.to_cvalue(fx))
@@ -115,10 +68,72 @@ pub(crate) fn maybe_codegen<'tcx>(
                 Some(CValue::by_val(ret_val, lhs.layout()))
             }
         }
-        BinOp::Lt | BinOp::Le | BinOp::Eq | BinOp::Ge | BinOp::Gt | BinOp::Ne => {
-            assert!(!checked);
-            None
-        }
+        BinOp::Lt | BinOp::Le | BinOp::Eq | BinOp::Ge | BinOp::Gt | BinOp::Ne => None,
         BinOp::Shl | BinOp::Shr => None,
     }
 }
+
+pub(crate) fn maybe_codegen_checked<'tcx>(
+    fx: &mut FunctionCx<'_, '_, 'tcx>,
+    bin_op: BinOp,
+    lhs: CValue<'tcx>,
+    rhs: CValue<'tcx>,
+) -> Option<CValue<'tcx>> {
+    if lhs.layout().ty != fx.tcx.types.u128
+        && lhs.layout().ty != fx.tcx.types.i128
+        && rhs.layout().ty != fx.tcx.types.u128
+        && rhs.layout().ty != fx.tcx.types.i128
+    {
+        return None;
+    }
+
+    let is_signed = type_sign(lhs.layout().ty);
+
+    match bin_op {
+        BinOp::BitAnd | BinOp::BitOr | BinOp::BitXor => unreachable!(),
+        BinOp::Mul if is_signed => {
+            let out_ty = fx.tcx.mk_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
+            let oflow = CPlace::new_stack_slot(fx, fx.layout_of(fx.tcx.types.i32));
+            let lhs = lhs.load_scalar(fx);
+            let rhs = rhs.load_scalar(fx);
+            let oflow_ptr = oflow.to_ptr().get_addr(fx);
+            let res = fx.lib_call_unadjusted(
+                "__muloti4",
+                vec![
+                    AbiParam::new(types::I128),
+                    AbiParam::new(types::I128),
+                    AbiParam::new(fx.pointer_type),
+                ],
+                vec![AbiParam::new(types::I128)],
+                &[lhs, rhs, oflow_ptr],
+            )[0];
+            let oflow = oflow.to_cvalue(fx).load_scalar(fx);
+            let oflow = fx.bcx.ins().ireduce(types::I8, oflow);
+            Some(CValue::by_val_pair(res, oflow, fx.layout_of(out_ty)))
+        }
+        BinOp::Add | BinOp::Sub | BinOp::Mul => {
+            let out_ty = fx.tcx.mk_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
+            let out_place = CPlace::new_stack_slot(fx, fx.layout_of(out_ty));
+            let param_types = vec![
+                AbiParam::special(fx.pointer_type, ArgumentPurpose::StructReturn),
+                AbiParam::new(types::I128),
+                AbiParam::new(types::I128),
+            ];
+            let args = [out_place.to_ptr().get_addr(fx), lhs.load_scalar(fx), rhs.load_scalar(fx)];
+            let name = match (bin_op, is_signed) {
+                (BinOp::Add, false) => "__rust_u128_addo",
+                (BinOp::Add, true) => "__rust_i128_addo",
+                (BinOp::Sub, false) => "__rust_u128_subo",
+                (BinOp::Sub, true) => "__rust_i128_subo",
+                (BinOp::Mul, false) => "__rust_u128_mulo",
+                _ => unreachable!(),
+            };
+            fx.lib_call(name, param_types, vec![], &args);
+            Some(out_place.to_cvalue(fx))
+        }
+        BinOp::Offset => unreachable!("offset should only be used on pointers, not 128bit ints"),
+        BinOp::Div | BinOp::Rem => unreachable!(),
+        BinOp::Lt | BinOp::Le | BinOp::Eq | BinOp::Ge | BinOp::Gt | BinOp::Ne => unreachable!(),
+        BinOp::Shl | BinOp::Shr => unreachable!(),
+    }
+}
diff --git a/compiler/rustc_codegen_cranelift/src/common.rs b/compiler/rustc_codegen_cranelift/src/common.rs
index 528b35283d7..30f4cf4473c 100644
--- a/compiler/rustc_codegen_cranelift/src/common.rs
+++ b/compiler/rustc_codegen_cranelift/src/common.rs
@@ -72,19 +72,6 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ
                 pointer_ty(tcx)
             }
         }
-        ty::Adt(adt_def, _) if adt_def.repr().simd() => {
-            let (element, count) = match &tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().abi
-            {
-                Abi::Vector { element, count } => (*element, *count),
-                _ => unreachable!(),
-            };
-
-            match scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()) {
-                // Cranelift currently only implements icmp for 128bit vectors.
-                Some(vector_ty) if vector_ty.bits() == 128 => vector_ty,
-                _ => return None,
-            }
-        }
         ty::Param(_) => bug!("ty param {:?}", ty),
         _ => return None,
     })
@@ -96,12 +83,7 @@ fn clif_pair_type_from_ty<'tcx>(
 ) -> Option<(types::Type, types::Type)> {
     Some(match ty.kind() {
         ty::Tuple(types) if types.len() == 2 => {
-            let a = clif_type_from_ty(tcx, types[0])?;
-            let b = clif_type_from_ty(tcx, types[1])?;
-            if a.is_vector() || b.is_vector() {
-                return None;
-            }
-            (a, b)
+            (clif_type_from_ty(tcx, types[0])?, clif_type_from_ty(tcx, types[1])?)
         }
         ty::RawPtr(TypeAndMut { ty: pointee_ty, mutbl: _ }) | ty::Ref(_, pointee_ty, _) => {
             if has_ptr_meta(tcx, *pointee_ty) {
@@ -431,7 +413,11 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
 
     // Note: must be kept in sync with get_caller_location from cg_ssa
     pub(crate) fn get_caller_location(&mut self, mut source_info: mir::SourceInfo) -> CValue<'tcx> {
-        let span_to_caller_location = |fx: &mut FunctionCx<'_, '_, 'tcx>, span: Span| {
+        let span_to_caller_location = |fx: &mut FunctionCx<'_, '_, 'tcx>, mut span: Span| {
+            // Remove `Inlined` marks as they pollute `expansion_cause`.
+            while span.is_inlined() {
+                span.remove_mark();
+            }
             let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span);
             let caller = fx.tcx.sess.source_map().lookup_char_pos(topmost.lo());
             let const_loc = fx.tcx.const_caller_location((
diff --git a/compiler/rustc_codegen_cranelift/src/concurrency_limiter.rs b/compiler/rustc_codegen_cranelift/src/concurrency_limiter.rs
index 203219a8a75..54df04f8c2c 100644
--- a/compiler/rustc_codegen_cranelift/src/concurrency_limiter.rs
+++ b/compiler/rustc_codegen_cranelift/src/concurrency_limiter.rs
@@ -25,8 +25,18 @@ impl ConcurrencyLimiter {
             .clone()
             .into_helper_thread(move |token| {
                 let mut state = state_helper.lock().unwrap();
-                state.add_new_token(token.unwrap());
-                available_token_condvar_helper.notify_one();
+                match token {
+                    Ok(token) => {
+                        state.add_new_token(token);
+                        available_token_condvar_helper.notify_one();
+                    }
+                    Err(err) => {
+                        state.poison(format!("failed to acquire jobserver token: {}", err));
+                        // Notify all threads waiting for a token to give them a chance to
+                        // gracefully exit.
+                        available_token_condvar_helper.notify_all();
+                    }
+                }
             })
             .unwrap();
         ConcurrencyLimiter {
@@ -37,16 +47,31 @@ impl ConcurrencyLimiter {
         }
     }
 
-    pub(super) fn acquire(&mut self) -> ConcurrencyLimiterToken {
+    pub(super) fn acquire(&mut self, handler: &rustc_errors::Handler) -> ConcurrencyLimiterToken {
         let mut state = self.state.lock().unwrap();
         loop {
             state.assert_invariants();
 
-            if state.try_start_job() {
-                return ConcurrencyLimiterToken {
-                    state: self.state.clone(),
-                    available_token_condvar: self.available_token_condvar.clone(),
-                };
+            match state.try_start_job() {
+                Ok(true) => {
+                    return ConcurrencyLimiterToken {
+                        state: self.state.clone(),
+                        available_token_condvar: self.available_token_condvar.clone(),
+                    };
+                }
+                Ok(false) => {}
+                Err(err) => {
+                    // An error happened when acquiring the token. Raise it as fatal error.
+                    // Make sure to drop the mutex guard first to prevent poisoning the mutex.
+                    drop(state);
+                    if let Some(err) = err {
+                        handler.fatal(&err).raise();
+                    } else {
+                        // The error was already emitted, but compilation continued. Raise a silent
+                        // fatal error.
+                        rustc_errors::FatalError.raise();
+                    }
+                }
             }
 
             self.helper_thread.as_mut().unwrap().request_token();
@@ -100,13 +125,22 @@ mod state {
         pending_jobs: usize,
         active_jobs: usize,
 
+        poisoned: bool,
+        stored_error: Option<String>,
+
         // None is used to represent the implicit token, Some to represent explicit tokens
         tokens: Vec<Option<Acquired>>,
     }
 
     impl ConcurrencyLimiterState {
         pub(super) fn new(pending_jobs: usize) -> Self {
-            ConcurrencyLimiterState { pending_jobs, active_jobs: 0, tokens: vec![None] }
+            ConcurrencyLimiterState {
+                pending_jobs,
+                active_jobs: 0,
+                poisoned: false,
+                stored_error: None,
+                tokens: vec![None],
+            }
         }
 
         pub(super) fn assert_invariants(&self) {
@@ -127,14 +161,18 @@ mod state {
             self.drop_excess_capacity();
         }
 
-        pub(super) fn try_start_job(&mut self) -> bool {
+        pub(super) fn try_start_job(&mut self) -> Result<bool, Option<String>> {
+            if self.poisoned {
+                return Err(self.stored_error.take());
+            }
+
             if self.active_jobs < self.tokens.len() {
                 // Using existing token
                 self.job_started();
-                return true;
+                return Ok(true);
             }
 
-            false
+            Ok(false)
         }
 
         pub(super) fn job_started(&mut self) {
@@ -161,6 +199,11 @@ mod state {
             self.assert_invariants();
         }
 
+        pub(super) fn poison(&mut self, error: String) {
+            self.poisoned = true;
+            self.stored_error = Some(error);
+        }
+
         fn drop_excess_capacity(&mut self) {
             self.assert_invariants();
 
diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs
index aacf37bb5b7..bf5d29c16f6 100644
--- a/compiler/rustc_codegen_cranelift/src/constant.rs
+++ b/compiler/rustc_codegen_cranelift/src/constant.rs
@@ -159,6 +159,8 @@ pub(crate) fn codegen_const_value<'tcx>(
                         _ => unreachable!(),
                     };
 
+                    // FIXME avoid this extra copy to the stack and directly write to the final
+                    // destination
                     let place = CPlace::new_stack_slot(fx, layout);
                     place.to_ptr().store(fx, val, MemFlags::trusted());
                     place.to_cvalue(fx)
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
index 3e2e2af9688..0e6c6ad95aa 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs
@@ -324,6 +324,10 @@ fn module_codegen(
     OngoingModuleCodegen::Async(std::thread::spawn(move || {
         cx.profiler.clone().verbose_generic_activity_with_arg("compile functions", &*cgu_name).run(
             || {
+                cranelift_codegen::timing::set_thread_profiler(Box::new(super::MeasuremeProfiler(
+                    cx.profiler.clone(),
+                )));
+
                 let mut cached_context = Context::new();
                 for codegened_func in codegened_functions {
                     crate::base::compile_fn(
@@ -407,7 +411,7 @@ pub(crate) fn run_aot(
                                     backend_config.clone(),
                                     global_asm_config.clone(),
                                     cgu.name(),
-                                    concurrency_limiter.acquire(),
+                                    concurrency_limiter.acquire(tcx.sess.diagnostic()),
                                 ),
                                 module_codegen,
                                 Some(rustc_middle::dep_graph::hash_result),
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
index f6a48e3257b..3118105a4e2 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
@@ -224,6 +224,10 @@ pub(crate) fn codegen_and_compile_fn<'tcx>(
     module: &mut dyn Module,
     instance: Instance<'tcx>,
 ) {
+    cranelift_codegen::timing::set_thread_profiler(Box::new(super::MeasuremeProfiler(
+        cx.profiler.clone(),
+    )));
+
     tcx.prof.generic_activity("codegen and compile fn").run(|| {
         let _inst_guard =
             crate::PrintOnPanic(|| format!("{:?} {}", instance, tcx.symbol_name(instance).name));
diff --git a/compiler/rustc_codegen_cranelift/src/driver/mod.rs b/compiler/rustc_codegen_cranelift/src/driver/mod.rs
index d09d3a52975..5c52c9c18ad 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/mod.rs
@@ -4,6 +4,7 @@
 //! [`codegen_fn`]: crate::base::codegen_fn
 //! [`codegen_static`]: crate::constant::codegen_static
 
+use rustc_data_structures::profiling::SelfProfilerRef;
 use rustc_middle::mir::mono::{Linkage as RLinkage, MonoItem, Visibility};
 
 use crate::prelude::*;
@@ -39,3 +40,31 @@ fn predefine_mono_items<'tcx>(
         }
     });
 }
+
+struct MeasuremeProfiler(SelfProfilerRef);
+
+struct TimingGuard {
+    profiler: std::mem::ManuallyDrop<SelfProfilerRef>,
+    inner: Option<rustc_data_structures::profiling::TimingGuard<'static>>,
+}
+
+impl Drop for TimingGuard {
+    fn drop(&mut self) {
+        self.inner.take();
+        unsafe {
+            std::mem::ManuallyDrop::drop(&mut self.profiler);
+        }
+    }
+}
+
+impl cranelift_codegen::timing::Profiler for MeasuremeProfiler {
+    fn start_pass(&self, pass: cranelift_codegen::timing::Pass) -> Box<dyn std::any::Any> {
+        let mut timing_guard =
+            TimingGuard { profiler: std::mem::ManuallyDrop::new(self.0.clone()), inner: None };
+        timing_guard.inner = Some(
+            unsafe { &*(&*timing_guard.profiler as &SelfProfilerRef as *const SelfProfilerRef) }
+                .generic_activity(pass.description()),
+        );
+        Box::new(timing_guard)
+    }
+}
diff --git a/compiler/rustc_codegen_cranelift/src/global_asm.rs b/compiler/rustc_codegen_cranelift/src/global_asm.rs
index a74f8ffa23d..63a1f6959dd 100644
--- a/compiler/rustc_codegen_cranelift/src/global_asm.rs
+++ b/compiler/rustc_codegen_cranelift/src/global_asm.rs
@@ -104,7 +104,6 @@ pub(crate) fn compile_global_asm(
             return Ok(None);
         }
 
-        // FIXME fix linker error on macOS
         if cfg!(not(feature = "inline_asm")) {
             return Err(
                 "asm! and global_asm! support is disabled while compiling rustc_codegen_cranelift"
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
index 90b36c61114..539f8c103db 100644
--- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
@@ -51,17 +51,13 @@ fn report_atomic_type_validation_error<'tcx>(
     fx.bcx.ins().trap(TrapCode::UnreachableCodeReached);
 }
 
-pub(crate) fn clif_vector_type<'tcx>(tcx: TyCtxt<'tcx>, layout: TyAndLayout<'tcx>) -> Option<Type> {
+pub(crate) fn clif_vector_type<'tcx>(tcx: TyCtxt<'tcx>, layout: TyAndLayout<'tcx>) -> Type {
     let (element, count) = match layout.abi {
         Abi::Vector { element, count } => (element, count),
         _ => unreachable!(),
     };
 
-    match scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()) {
-        // Cranelift currently only implements icmp for 128bit vectors.
-        Some(vector_ty) if vector_ty.bits() == 128 => Some(vector_ty),
-        _ => None,
-    }
+    scalar_to_clif_type(tcx, element).by(u32::try_from(count).unwrap()).unwrap()
 }
 
 fn simd_for_each_lane<'tcx>(
@@ -1107,8 +1103,8 @@ fn codegen_regular_intrinsic_call<'tcx>(
 
             fx.bcx.ins().call_indirect(f_sig, f, &[data]);
 
-            let layout = ret.layout();
-            let ret_val = CValue::const_val(fx, layout, ty::ScalarInt::null(layout.size));
+            let layout = fx.layout_of(fx.tcx.types.i32);
+            let ret_val = CValue::by_val(fx.bcx.ins().iconst(types::I32, 0), layout);
             ret.write_cvalue(fx, ret_val);
         }
 
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
index 6f54a8d49c8..264b578c168 100644
--- a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
+++ b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
@@ -253,7 +253,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
             }
 
             ret.write_cvalue(fx, base);
-            let ret_lane = ret.place_field(fx, FieldIdx::new(idx.try_into().unwrap()));
+            let ret_lane = ret.place_lane(fx, idx.try_into().unwrap());
             ret_lane.write_cvalue(fx, val);
         }
 
diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs
index 74d9b72b90c..f0b399ae280 100644
--- a/compiler/rustc_codegen_cranelift/src/lib.rs
+++ b/compiler/rustc_codegen_cranelift/src/lib.rs
@@ -110,7 +110,7 @@ mod prelude {
     pub(crate) use crate::common::*;
     pub(crate) use crate::debuginfo::{DebugContext, UnwindContext};
     pub(crate) use crate::pointer::Pointer;
-    pub(crate) use crate::value_and_place::{CPlace, CPlaceInner, CValue};
+    pub(crate) use crate::value_and_place::{CPlace, CValue};
 }
 
 struct PrintOnPanic<F: Fn() -> String>(F);
diff --git a/compiler/rustc_codegen_cranelift/src/num.rs b/compiler/rustc_codegen_cranelift/src/num.rs
index 1357b7be1e0..ba53e01c7a2 100644
--- a/compiler/rustc_codegen_cranelift/src/num.rs
+++ b/compiler/rustc_codegen_cranelift/src/num.rs
@@ -118,7 +118,7 @@ pub(crate) fn codegen_int_binop<'tcx>(
         );
     }
 
-    if let Some(res) = crate::codegen_i128::maybe_codegen(fx, bin_op, false, in_lhs, in_rhs) {
+    if let Some(res) = crate::codegen_i128::maybe_codegen(fx, bin_op, in_lhs, in_rhs) {
         return res;
     }
 
@@ -173,7 +173,7 @@ pub(crate) fn codegen_checked_int_binop<'tcx>(
     let lhs = in_lhs.load_scalar(fx);
     let rhs = in_rhs.load_scalar(fx);
 
-    if let Some(res) = crate::codegen_i128::maybe_codegen(fx, bin_op, true, in_lhs, in_rhs) {
+    if let Some(res) = crate::codegen_i128::maybe_codegen_checked(fx, bin_op, in_lhs, in_rhs) {
         return res;
     }
 
diff --git a/compiler/rustc_codegen_cranelift/src/pretty_clif.rs b/compiler/rustc_codegen_cranelift/src/pretty_clif.rs
index e0a081c9d49..27e21183c55 100644
--- a/compiler/rustc_codegen_cranelift/src/pretty_clif.rs
+++ b/compiler/rustc_codegen_cranelift/src/pretty_clif.rs
@@ -7,48 +7,51 @@
 //! test compile
 //! target x86_64
 //!
-//! function u0:0(i64, i64, i64) system_v {
-//! ; symbol _ZN119_$LT$example..IsNotEmpty$u20$as$u20$mini_core..FnOnce$LT$$LP$$RF$$u27$a$u20$$RF$$u27$b$u20$$u5b$u16$u5d$$C$$RP$$GT$$GT$9call_once17he85059d5e6a760a0E
-//! ; instance Instance { def: Item(DefId(0/0:29 ~ example[8787]::{{impl}}[0]::call_once[0])), substs: [ReErased, ReErased] }
-//! ; sig ([IsNotEmpty, (&&[u16],)]; c_variadic: false)->(u8, u8)
+//! function u0:22(i64) -> i8, i8 system_v {
+//! ; symbol _ZN97_$LT$example..IsNotEmpty$u20$as$u20$mini_core..FnOnce$LT$$LP$$RF$$RF$$u5b$u16$u5d$$C$$RP$$GT$$GT$9call_once17hd517c453d67c0915E
+//! ; instance Instance { def: Item(WithOptConstParam { did: DefId(0:42 ~ example[4e51]::{impl#0}::call_once), const_param_did: None }), substs: [ReErased, ReErased] }
+//! ; abi FnAbi { args: [ArgAbi { layout: TyAndLayout { ty: IsNotEmpty, layout: Layout { size: Size(0 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: true }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 0 } } }, mode: Ignore }, ArgAbi { layout: TyAndLayout { ty: &&[u16], layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 } } }, mode: Direct(ArgAttributes { regular: NonNull | NoUndef, arg_ext: None, pointee_size: Size(0 bytes), pointee_align: Some(Align(8 bytes)) }) }], ret: ArgAbi { layout: TyAndLayout { ty: (u8, u8), layout: Layout { size: Size(2 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, abi: ScalarPair(Initialized { value: Int(I8, false), valid_range: 0..=255 }, Initialized { value: Int(I8, false), valid_range: 0..=255 }), fields: Arbitrary { offsets: [Size(0 bytes), Size(1 bytes)], memory_index: [0, 1] }, largest_niche: None, variants: Single { index: 0 } } }, mode: Pair(ArgAttributes { regular: NoUndef, arg_ext: None, pointee_size: Size(0 bytes), pointee_align: None }, ArgAttributes { regular: NoUndef, arg_ext: None, pointee_size: Size(0 bytes), pointee_align: None }) }, c_variadic: false, fixed_count: 1, conv: Rust, can_unwind: false }
 //!
-//! ; ssa {_2: NOT_SSA, _4: NOT_SSA, _0: NOT_SSA, _3: (empty), _1: NOT_SSA}
-//! ; msg   loc.idx    param    pass mode            ssa flags  ty
-//! ; ret    _0      = v0       ByRef                NOT_SSA    (u8, u8)
-//! ; arg    _1      = v1       ByRef                NOT_SSA    IsNotEmpty
-//! ; arg    _2.0    = v2       ByVal(types::I64)    NOT_SSA    &&[u16]
+//! ; kind  loc.idx   param    pass mode                            ty
+//! ; ssa   _0    (u8, u8)                          2b 1, 8              var=(0, 1)
+//! ; ret   _0      -          Pair(ArgAttributes { regular: NoUndef, arg_ext: None, pointee_size: Size(0 bytes), pointee_align: None }, ArgAttributes { regular: NoUndef, arg_ext: None, pointee_size: Size(0 bytes), pointee_align: None }) (u8, u8)
+//! ; arg   _1      -          Ignore                               IsNotEmpty
+//! ; arg   _2.0    = v0       Direct(ArgAttributes { regular: NonNull | NoUndef, arg_ext: None, pointee_size: Size(0 bytes), pointee_align: Some(Align(8 bytes)) }) &&[u16]
 //!
-//!     ss0 = explicit_slot 0 ; _1: IsNotEmpty size=0 align=1,8
-//!     ss1 = explicit_slot 8 ; _2: (&&[u16],) size=8 align=8,8
-//!     ss2 = explicit_slot 8 ; _4: (&&[u16],) size=8 align=8,8
-//!     sig0 = (i64, i64, i64) system_v
-//!     sig1 = (i64, i64, i64) system_v
-//!     fn0 = colocated u0:6 sig1 ; Instance { def: Item(DefId(0/0:31 ~ example[8787]::{{impl}}[1]::call_mut[0])), substs: [ReErased, ReErased] }
+//! ; kind  local ty                              size align (abi,pref)
+//! ; zst   _1    IsNotEmpty                        0b 1, 8              align=8,offset=
+//! ; stack _2    (&&[u16],)                        8b 8, 8              storage=ss0
+//! ; ssa   _3    &mut IsNotEmpty                   8b 8, 8              var=2
 //!
-//! block0(v0: i64, v1: i64, v2: i64):
-//!     v3 = stack_addr.i64 ss0
-//!     v4 = stack_addr.i64 ss1
-//!     store v2, v4
-//!     v5 = stack_addr.i64 ss2
+//!     ss0 = explicit_slot 16
+//!     sig0 = (i64, i64) -> i8, i8 system_v
+//!     fn0 = colocated u0:23 sig0 ; Instance { def: Item(WithOptConstParam { did: DefId(0:46 ~ example[4e51]::{impl#1}::call_mut), const_param_did: None }), substs: [ReErased, ReErased] }
+//!
+//! block0(v0: i64):
+//!     nop
+//! ; write_cvalue: Addr(Pointer { base: Stack(ss0), offset: Offset32(0) }, None): &&[u16] <- ByVal(v0): &&[u16]
+//!     stack_store v0, ss0
 //!     jump block1
 //!
 //! block1:
 //!     nop
 //! ; _3 = &mut _1
-//! ; _4 = _2
-//!     v6 = load.i64 v4
-//!     store v6, v5
+//!     v1 = iconst.i64 8
+//! ; write_cvalue: Var(_3, var2): &mut IsNotEmpty <- ByVal(v1): &mut IsNotEmpty
 //! ;
-//! ; _0 = const mini_core::FnMut::call_mut(move _3, move _4)
-//!     v7 = load.i64 v5
-//!     call fn0(v0, v3, v7)
+//! ; _0 = <IsNotEmpty as mini_core::FnMut<(&&[u16],)>>::call_mut(move _3, _2)
+//!     v2 = stack_load.i64 ss0
+//!     v3, v4 = call fn0(v1, v2)  ; v1 = 8
+//!     v5 -> v3
+//!     v6 -> v4
+//! ; write_cvalue: VarPair(_0, var0, var1): (u8, u8) <- ByValPair(v3, v4): (u8, u8)
 //!     jump block2
 //!
 //! block2:
 //!     nop
 //! ;
 //! ; return
-//!     return
+//!     return v5, v6
 //! }
 //! ```
 
diff --git a/compiler/rustc_codegen_cranelift/src/value_and_place.rs b/compiler/rustc_codegen_cranelift/src/value_and_place.rs
index 1b69862ce2c..c964d1ac5e0 100644
--- a/compiler/rustc_codegen_cranelift/src/value_and_place.rs
+++ b/compiler/rustc_codegen_cranelift/src/value_and_place.rs
@@ -2,8 +2,8 @@
 
 use crate::prelude::*;
 
+use cranelift_codegen::entity::EntityRef;
 use cranelift_codegen::ir::immediates::Offset32;
-use cranelift_codegen::ir::{InstructionData, Opcode};
 
 fn codegen_field<'tcx>(
     fx: &mut FunctionCx<'_, '_, 'tcx>,
@@ -214,17 +214,7 @@ impl<'tcx> CValue<'tcx> {
     ) -> CValue<'tcx> {
         let layout = self.1;
         match self.0 {
-            CValueInner::ByVal(val) => match layout.abi {
-                Abi::Vector { element: _, count } => {
-                    let count = u8::try_from(count).expect("SIMD type with more than 255 lanes???");
-                    let field = u8::try_from(field.index()).unwrap();
-                    assert!(field < count);
-                    let lane = fx.bcx.ins().extractlane(val, field);
-                    let field_layout = layout.field(&*fx, usize::from(field));
-                    CValue::by_val(lane, field_layout)
-                }
-                _ => unreachable!("value_field for ByVal with abi {:?}", layout.abi),
-            },
+            CValueInner::ByVal(_) => unreachable!(),
             CValueInner::ByValPair(val1, val2) => match layout.abi {
                 Abi::ScalarPair(_, _) => {
                     let val = match field.as_u32() {
@@ -258,16 +248,7 @@ impl<'tcx> CValue<'tcx> {
         let lane_layout = fx.layout_of(lane_ty);
         assert!(lane_idx < lane_count);
         match self.0 {
-            CValueInner::ByVal(val) => match layout.abi {
-                Abi::Vector { element: _, count: _ } => {
-                    assert!(lane_count <= u8::MAX.into(), "SIMD type with more than 255 lanes???");
-                    let lane_idx = u8::try_from(lane_idx).unwrap();
-                    let lane = fx.bcx.ins().extractlane(val, lane_idx);
-                    CValue::by_val(lane, lane_layout)
-                }
-                _ => unreachable!("value_lane for ByVal with abi {:?}", layout.abi),
-            },
-            CValueInner::ByValPair(_, _) => unreachable!(),
+            CValueInner::ByVal(_) | CValueInner::ByValPair(_, _) => unreachable!(),
             CValueInner::ByRef(ptr, None) => {
                 let field_offset = lane_layout.size * lane_idx;
                 let field_ptr = ptr.offset_i64(fx, i64::try_from(field_offset.bytes()).unwrap());
@@ -277,14 +258,6 @@ impl<'tcx> CValue<'tcx> {
         }
     }
 
-    pub(crate) fn unsize_value(self, fx: &mut FunctionCx<'_, '_, 'tcx>, dest: CPlace<'tcx>) {
-        crate::unsize::coerce_unsized_into(fx, self, dest);
-    }
-
-    pub(crate) fn coerce_dyn_star(self, fx: &mut FunctionCx<'_, '_, 'tcx>, dest: CPlace<'tcx>) {
-        crate::unsize::coerce_dyn_star(fx, self, dest);
-    }
-
     /// If `ty` is signed, `const_val` must already be sign extended.
     pub(crate) fn const_val(
         fx: &mut FunctionCx<'_, '_, 'tcx>,
@@ -345,10 +318,9 @@ pub(crate) struct CPlace<'tcx> {
 }
 
 #[derive(Debug, Copy, Clone)]
-pub(crate) enum CPlaceInner {
+enum CPlaceInner {
     Var(Local, Variable),
     VarPair(Local, Variable, Variable),
-    VarLane(Local, Variable, u8),
     Addr(Pointer, Option<Value>),
 }
 
@@ -357,10 +329,6 @@ impl<'tcx> CPlace<'tcx> {
         self.layout
     }
 
-    pub(crate) fn inner(&self) -> &CPlaceInner {
-        &self.inner
-    }
-
     pub(crate) fn new_stack_slot(
         fx: &mut FunctionCx<'_, '_, 'tcx>,
         layout: TyAndLayout<'tcx>,
@@ -442,12 +410,6 @@ impl<'tcx> CPlace<'tcx> {
                 //fx.bcx.set_val_label(val2, cranelift_codegen::ir::ValueLabel::new(var2.index()));
                 CValue::by_val_pair(val1, val2, layout)
             }
-            CPlaceInner::VarLane(_local, var, lane) => {
-                let val = fx.bcx.use_var(var);
-                //fx.bcx.set_val_label(val, cranelift_codegen::ir::ValueLabel::new(var.index()));
-                let val = fx.bcx.ins().extractlane(val, lane);
-                CValue::by_val(val, layout)
-            }
             CPlaceInner::Addr(ptr, extra) => {
                 if let Some(extra) = extra {
                     CValue::by_ref_unsized(ptr, extra, layout)
@@ -458,21 +420,56 @@ impl<'tcx> CPlace<'tcx> {
         }
     }
 
+    pub(crate) fn debug_comment(self) -> (&'static str, String) {
+        match self.inner {
+            CPlaceInner::Var(_local, var) => ("ssa", format!("var={}", var.index())),
+            CPlaceInner::VarPair(_local, var1, var2) => {
+                ("ssa", format!("var=({}, {})", var1.index(), var2.index()))
+            }
+            CPlaceInner::Addr(ptr, meta) => {
+                let meta =
+                    if let Some(meta) = meta { format!(",meta={}", meta) } else { String::new() };
+                match ptr.debug_base_and_offset() {
+                    (crate::pointer::PointerBase::Addr(addr), offset) => {
+                        ("reuse", format!("storage={}{}{}", addr, offset, meta))
+                    }
+                    (crate::pointer::PointerBase::Stack(stack_slot), offset) => {
+                        ("stack", format!("storage={}{}{}", stack_slot, offset, meta))
+                    }
+                    (crate::pointer::PointerBase::Dangling(align), offset) => {
+                        ("zst", format!("align={},offset={}", align.bytes(), offset))
+                    }
+                }
+            }
+        }
+    }
+
     #[track_caller]
     pub(crate) fn to_ptr(self) -> Pointer {
-        match self.to_ptr_maybe_unsized() {
-            (ptr, None) => ptr,
-            (_, Some(_)) => bug!("Expected sized cplace, found {:?}", self),
+        match self.inner {
+            CPlaceInner::Addr(ptr, None) => ptr,
+            CPlaceInner::Addr(_, Some(_)) => bug!("Expected sized cplace, found {:?}", self),
+            CPlaceInner::Var(_, _) | CPlaceInner::VarPair(_, _, _) => {
+                bug!("Expected CPlace::Addr, found {:?}", self)
+            }
         }
     }
 
     #[track_caller]
-    pub(crate) fn to_ptr_maybe_unsized(self) -> (Pointer, Option<Value>) {
+    pub(crate) fn to_ptr_unsized(self) -> (Pointer, Value) {
         match self.inner {
-            CPlaceInner::Addr(ptr, extra) => (ptr, extra),
-            CPlaceInner::Var(_, _)
-            | CPlaceInner::VarPair(_, _, _)
-            | CPlaceInner::VarLane(_, _, _) => bug!("Expected CPlace::Addr, found {:?}", self),
+            CPlaceInner::Addr(ptr, Some(extra)) => (ptr, extra),
+            CPlaceInner::Addr(_, None) | CPlaceInner::Var(_, _) | CPlaceInner::VarPair(_, _, _) => {
+                bug!("Expected unsized cplace, found {:?}", self)
+            }
+        }
+    }
+
+    pub(crate) fn try_to_ptr(self) -> Option<Pointer> {
+        match self.inner {
+            CPlaceInner::Var(_, _) | CPlaceInner::VarPair(_, _, _) => None,
+            CPlaceInner::Addr(ptr, None) => Some(ptr),
+            CPlaceInner::Addr(_, Some(_)) => bug!("Expected sized cplace, found {:?}", self),
         }
     }
 
@@ -496,7 +493,7 @@ impl<'tcx> CPlace<'tcx> {
         from: CValue<'tcx>,
         method: &'static str,
     ) {
-        fn transmute_value<'tcx>(
+        fn transmute_scalar<'tcx>(
             fx: &mut FunctionCx<'_, '_, 'tcx>,
             var: Variable,
             data: Value,
@@ -520,7 +517,7 @@ impl<'tcx> CPlace<'tcx> {
                 | (types::F64, types::I64) => codegen_bitcast(fx, dst_ty, data),
                 _ if src_ty.is_vector() && dst_ty.is_vector() => codegen_bitcast(fx, dst_ty, data),
                 _ if src_ty.is_vector() || dst_ty.is_vector() => {
-                    // FIXME do something more efficient for transmutes between vectors and integers.
+                    // FIXME(bytecodealliance/wasmtime#6104) do something more efficient for transmutes between vectors and integers.
                     let stack_slot = fx.bcx.create_sized_stack_slot(StackSlotData {
                         kind: StackSlotKind::ExplicitSlot,
                         // FIXME Don't force the size to a multiple of 16 bytes once Cranelift gets a way to
@@ -554,7 +551,7 @@ impl<'tcx> CPlace<'tcx> {
                 format!(
                     "{}: {:?}: {:?} <- {:?}: {:?}",
                     method,
-                    self.inner(),
+                    self.inner,
                     self.layout().ty,
                     from.0,
                     from.layout().ty
@@ -563,32 +560,11 @@ impl<'tcx> CPlace<'tcx> {
         }
 
         let dst_layout = self.layout();
-        let to_ptr = match self.inner {
+        match self.inner {
             CPlaceInner::Var(_local, var) => {
-                if let ty::Array(element, len) = dst_layout.ty.kind() {
-                    // Can only happen for vector types
-                    let len = u32::try_from(len.eval_target_usize(fx.tcx, ParamEnv::reveal_all()))
-                        .unwrap();
-                    let vector_ty = fx.clif_type(*element).unwrap().by(len).unwrap();
-
-                    let data = match from.0 {
-                        CValueInner::ByRef(ptr, None) => {
-                            let mut flags = MemFlags::new();
-                            flags.set_notrap();
-                            ptr.load(fx, vector_ty, flags)
-                        }
-                        CValueInner::ByVal(_)
-                        | CValueInner::ByValPair(_, _)
-                        | CValueInner::ByRef(_, Some(_)) => bug!("array should be ByRef"),
-                    };
-
-                    fx.bcx.def_var(var, data);
-                    return;
-                }
                 let data = CValue(from.0, dst_layout).load_scalar(fx);
                 let dst_ty = fx.clif_type(self.layout().ty).unwrap();
-                transmute_value(fx, var, data, dst_ty);
-                return;
+                transmute_scalar(fx, var, data, dst_ty);
             }
             CPlaceInner::VarPair(_local, var1, var2) => {
                 let (data1, data2) = if from.layout().ty == dst_layout.ty {
@@ -599,80 +575,61 @@ impl<'tcx> CPlace<'tcx> {
                     CValue(CValueInner::ByRef(ptr, None), dst_layout).load_scalar_pair(fx)
                 };
                 let (dst_ty1, dst_ty2) = fx.clif_pair_type(self.layout().ty).unwrap();
-                transmute_value(fx, var1, data1, dst_ty1);
-                transmute_value(fx, var2, data2, dst_ty2);
-                return;
+                transmute_scalar(fx, var1, data1, dst_ty1);
+                transmute_scalar(fx, var2, data2, dst_ty2);
             }
-            CPlaceInner::VarLane(_local, var, lane) => {
-                let data = from.load_scalar(fx);
-
-                // First get the old vector
-                let vector = fx.bcx.use_var(var);
-                //fx.bcx.set_val_label(vector, cranelift_codegen::ir::ValueLabel::new(var.index()));
-
-                // Next insert the written lane into the vector
-                let vector = fx.bcx.ins().insertlane(vector, data, lane);
-
-                // Finally write the new vector
-                //fx.bcx.set_val_label(vector, cranelift_codegen::ir::ValueLabel::new(var.index()));
-                fx.bcx.def_var(var, vector);
-
-                return;
-            }
-            CPlaceInner::Addr(ptr, None) => {
+            CPlaceInner::Addr(_, Some(_)) => bug!("Can't write value to unsized place {:?}", self),
+            CPlaceInner::Addr(to_ptr, None) => {
                 if dst_layout.size == Size::ZERO || dst_layout.abi == Abi::Uninhabited {
                     return;
                 }
-                ptr
-            }
-            CPlaceInner::Addr(_, Some(_)) => bug!("Can't write value to unsized place {:?}", self),
-        };
 
-        let mut flags = MemFlags::new();
-        flags.set_notrap();
-        match from.layout().abi {
-            // FIXME make Abi::Vector work too
-            Abi::Scalar(_) => {
-                let val = from.load_scalar(fx);
-                to_ptr.store(fx, val, flags);
-                return;
-            }
-            Abi::ScalarPair(a_scalar, b_scalar) => {
-                let (value, extra) = from.load_scalar_pair(fx);
-                let b_offset = scalar_pair_calculate_b_offset(fx.tcx, a_scalar, b_scalar);
-                to_ptr.store(fx, value, flags);
-                to_ptr.offset(fx, b_offset).store(fx, extra, flags);
-                return;
-            }
-            _ => {}
-        }
+                let mut flags = MemFlags::new();
+                flags.set_notrap();
+                match from.layout().abi {
+                    Abi::Scalar(_) => {
+                        let val = from.load_scalar(fx);
+                        to_ptr.store(fx, val, flags);
+                        return;
+                    }
+                    Abi::ScalarPair(a_scalar, b_scalar) => {
+                        let (value, extra) = from.load_scalar_pair(fx);
+                        let b_offset = scalar_pair_calculate_b_offset(fx.tcx, a_scalar, b_scalar);
+                        to_ptr.store(fx, value, flags);
+                        to_ptr.offset(fx, b_offset).store(fx, extra, flags);
+                        return;
+                    }
+                    _ => {}
+                }
 
-        match from.0 {
-            CValueInner::ByVal(val) => {
-                to_ptr.store(fx, val, flags);
-            }
-            CValueInner::ByValPair(_, _) => {
-                bug!("Non ScalarPair abi {:?} for ByValPair CValue", dst_layout.abi);
-            }
-            CValueInner::ByRef(from_ptr, None) => {
-                let from_addr = from_ptr.get_addr(fx);
-                let to_addr = to_ptr.get_addr(fx);
-                let src_layout = from.1;
-                let size = dst_layout.size.bytes();
-                let src_align = src_layout.align.abi.bytes() as u8;
-                let dst_align = dst_layout.align.abi.bytes() as u8;
-                fx.bcx.emit_small_memory_copy(
-                    fx.target_config,
-                    to_addr,
-                    from_addr,
-                    size,
-                    dst_align,
-                    src_align,
-                    true,
-                    flags,
-                );
+                match from.0 {
+                    CValueInner::ByVal(val) => {
+                        to_ptr.store(fx, val, flags);
+                    }
+                    CValueInner::ByValPair(_, _) => {
+                        bug!("Non ScalarPair abi {:?} for ByValPair CValue", dst_layout.abi);
+                    }
+                    CValueInner::ByRef(from_ptr, None) => {
+                        let from_addr = from_ptr.get_addr(fx);
+                        let to_addr = to_ptr.get_addr(fx);
+                        let src_layout = from.1;
+                        let size = dst_layout.size.bytes();
+                        let src_align = src_layout.align.abi.bytes() as u8;
+                        let dst_align = dst_layout.align.abi.bytes() as u8;
+                        fx.bcx.emit_small_memory_copy(
+                            fx.target_config,
+                            to_addr,
+                            from_addr,
+                            size,
+                            dst_align,
+                            src_align,
+                            true,
+                            flags,
+                        );
+                    }
+                    CValueInner::ByRef(_, Some(_)) => todo!(),
+                }
             }
-            CValueInner::ByRef(_, Some(_)) => todo!(),
         }
     }
 
@@ -692,40 +649,6 @@ impl<'tcx> CPlace<'tcx> {
         let layout = self.layout();
 
         match self.inner {
-            CPlaceInner::Var(local, var) => match layout.ty.kind() {
-                ty::Array(_, _) => {
-                    // Can only happen for vector types
-                    return CPlace {
-                        inner: CPlaceInner::VarLane(local, var, field.as_u32().try_into().unwrap()),
-                        layout: layout.field(fx, field.as_u32().try_into().unwrap()),
-                    };
-                }
-                ty::Adt(adt_def, substs) if layout.ty.is_simd() => {
-                    let f0 = &adt_def.non_enum_variant().fields[FieldIdx::from_u32(0)];
-                    let f0_ty = f0.ty(fx.tcx, substs);
-
-                    match f0_ty.kind() {
-                        ty::Array(_, _) => {
-                            assert_eq!(field.as_u32(), 0);
-                            return CPlace {
-                                inner: CPlaceInner::Var(local, var),
-                                layout: layout.field(fx, field.as_u32().try_into().unwrap()),
-                            };
-                        }
-                        _ => {
-                            return CPlace {
-                                inner: CPlaceInner::VarLane(
-                                    local,
-                                    var,
-                                    field.as_u32().try_into().unwrap(),
-                                ),
-                                layout: layout.field(fx, field.as_u32().try_into().unwrap()),
-                            };
-                        }
-                    }
-                }
-                _ => {}
-            },
             CPlaceInner::VarPair(local, var1, var2) => {
                 let layout = layout.field(&*fx, field.index());
 
@@ -738,7 +661,12 @@ impl<'tcx> CPlace<'tcx> {
             _ => {}
         }
 
-        let (base, extra) = self.to_ptr_maybe_unsized();
+        let (base, extra) = match self.inner {
+            CPlaceInner::Addr(ptr, extra) => (ptr, extra),
+            CPlaceInner::Var(_, _) | CPlaceInner::VarPair(_, _, _) => {
+                bug!("Expected CPlace::Addr, found {:?}", self)
+            }
+        };
 
         let (field_ptr, field_layout) = codegen_field(fx, base, extra, layout, field);
         if field_layout.is_unsized() {
@@ -767,15 +695,8 @@ impl<'tcx> CPlace<'tcx> {
         assert!(lane_idx < lane_count);
 
         match self.inner {
-            CPlaceInner::Var(local, var) => {
-                assert!(matches!(layout.abi, Abi::Vector { .. }));
-                CPlace {
-                    inner: CPlaceInner::VarLane(local, var, lane_idx.try_into().unwrap()),
-                    layout: lane_layout,
-                }
-            }
+            CPlaceInner::Var(_, _) => unreachable!(),
             CPlaceInner::VarPair(_, _, _) => unreachable!(),
-            CPlaceInner::VarLane(_, _, _) => unreachable!(),
             CPlaceInner::Addr(ptr, None) => {
                 let field_offset = lane_layout.size * lane_idx;
                 let field_ptr = ptr.offset_i64(fx, i64::try_from(field_offset.bytes()).unwrap());
@@ -794,34 +715,13 @@ impl<'tcx> CPlace<'tcx> {
             ty::Array(elem_ty, _) => {
                 let elem_layout = fx.layout_of(*elem_ty);
                 match self.inner {
-                    CPlaceInner::Var(local, var) => {
-                        // This is a hack to handle `vector_val.0[1]`. It doesn't allow dynamic
-                        // indexing.
-                        let lane_idx = match fx.bcx.func.dfg.insts
-                            [fx.bcx.func.dfg.value_def(index).unwrap_inst()]
-                        {
-                            InstructionData::UnaryImm { opcode: Opcode::Iconst, imm } => imm,
-                            _ => bug!(
-                                "Dynamic indexing into a vector type is not supported: {self:?}[{index}]"
-                            ),
-                        };
-                        return CPlace {
-                            inner: CPlaceInner::VarLane(
-                                local,
-                                var,
-                                lane_idx.bits().try_into().unwrap(),
-                            ),
-                            layout: elem_layout,
-                        };
-                    }
                     CPlaceInner::Addr(addr, None) => (elem_layout, addr),
-                    CPlaceInner::Addr(_, Some(_))
-                    | CPlaceInner::VarPair(_, _, _)
-                    | CPlaceInner::VarLane(_, _, _) => bug!("Can't index into {self:?}"),
+                    CPlaceInner::Var(_, _)
+                    | CPlaceInner::Addr(_, Some(_))
+                    | CPlaceInner::VarPair(_, _, _) => bug!("Can't index into {self:?}"),
                 }
-                // FIXME use VarLane in case of Var with simd type
             }
-            ty::Slice(elem_ty) => (fx.layout_of(*elem_ty), self.to_ptr_maybe_unsized().0),
+            ty::Slice(elem_ty) => (fx.layout_of(*elem_ty), self.to_ptr_unsized().0),
             _ => bug!("place_index({:?})", self.layout().ty),
         };
 
@@ -846,12 +746,8 @@ impl<'tcx> CPlace<'tcx> {
         layout: TyAndLayout<'tcx>,
     ) -> CValue<'tcx> {
         if has_ptr_meta(fx.tcx, self.layout().ty) {
-            let (ptr, extra) = self.to_ptr_maybe_unsized();
-            CValue::by_val_pair(
-                ptr.get_addr(fx),
-                extra.expect("unsized type without metadata"),
-                layout,
-            )
+            let (ptr, extra) = self.to_ptr_unsized();
+            CValue::by_val_pair(ptr.get_addr(fx), extra, layout)
         } else {
             CValue::by_val(self.to_ptr().get_addr(fx), layout)
         }
diff --git a/compiler/rustc_codegen_cranelift/y.rs b/compiler/rustc_codegen_cranelift/y.rs
index fd825d02e35..a68a10500f5 100755
--- a/compiler/rustc_codegen_cranelift/y.rs
+++ b/compiler/rustc_codegen_cranelift/y.rs
@@ -3,10 +3,14 @@
 # This block is ignored by rustc
 set -e
 echo "[BUILD] y.rs" 1>&2
-rustc $0 -o ${0/.rs/.bin} -Cdebuginfo=1 --edition 2021 -Cpanic=abort
+rustc $0 -o ${0/.rs/.bin} -Cdebuginfo=1 --edition 2021
 exec ${0/.rs/.bin} $@
 */
 
+#![warn(rust_2018_idioms)]
+#![warn(unused_lifetimes)]
+#![warn(unreachable_pub)]
+
 //! The build system for cg_clif
 //!
 //! # Manual compilation
diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml
index a421535c9b4..4f73b731f5a 100644
--- a/compiler/rustc_codegen_ssa/Cargo.toml
+++ b/compiler/rustc_codegen_ssa/Cargo.toml
@@ -49,3 +49,7 @@ libc = "0.2.50"
 version = "0.30.1"
 default-features = false
 features = ["read_core", "elf", "macho", "pe", "unaligned", "archive", "write"]
+
+[target.'cfg(windows)'.dependencies.windows]
+version = "0.46.0"
+features = ["Win32_Globalization"]
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 02e21e74fad..c63e156beae 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -349,7 +349,10 @@ fn link_rlib<'a>(
         let NativeLibKind::Static { bundle: None | Some(true), whole_archive } = lib.kind else {
             continue;
         };
-        if whole_archive == Some(true) && !codegen_results.crate_info.feature_packed_bundled_libs {
+        if whole_archive == Some(true)
+            && flavor == RlibFlavor::Normal
+            && !codegen_results.crate_info.feature_packed_bundled_libs
+        {
             sess.emit_err(errors::IncompatibleLinkingModifiers);
         }
         if flavor == RlibFlavor::Normal && let Some(filename) = lib.filename {
@@ -857,7 +860,7 @@ fn link_natively<'a>(
             if !prog.status.success() {
                 let mut output = prog.stderr.clone();
                 output.extend_from_slice(&prog.stdout);
-                let escaped_output = escape_string(&output);
+                let escaped_output = escape_linker_output(&output, flavor);
                 // FIXME: Add UI tests for this error.
                 let err = errors::LinkingFailed {
                     linker_path: &linker_path,
@@ -1049,6 +1052,83 @@ fn escape_string(s: &[u8]) -> String {
     }
 }
 
+#[cfg(not(windows))]
+fn escape_linker_output(s: &[u8], _flavour: LinkerFlavor) -> String {
+    escape_string(s)
+}
+
+/// If the output of the msvc linker is not UTF-8 and the host is Windows,
+/// then try to convert the string from the OEM encoding.
+#[cfg(windows)]
+fn escape_linker_output(s: &[u8], flavour: LinkerFlavor) -> String {
+    // This only applies to the actual MSVC linker.
+    if flavour != LinkerFlavor::Msvc(Lld::No) {
+        return escape_string(s);
+    }
+    match str::from_utf8(s) {
+        Ok(s) => return s.to_owned(),
+        Err(_) => match win::locale_byte_str_to_string(s, win::oem_code_page()) {
+            Some(s) => s,
+            // The string is not UTF-8 and isn't valid for the OEM code page
+            None => format!("Non-UTF-8 output: {}", s.escape_ascii()),
+        },
+    }
+}
+
+/// Wrappers around the Windows API.
+#[cfg(windows)]
+mod win {
+    use windows::Win32::Globalization::{
+        GetLocaleInfoEx, MultiByteToWideChar, CP_OEMCP, LOCALE_IUSEUTF8LEGACYOEMCP,
+        LOCALE_NAME_SYSTEM_DEFAULT, LOCALE_RETURN_NUMBER, MB_ERR_INVALID_CHARS,
+    };
+
+    /// Get the Windows system OEM code page. This is most notably the code page
+    /// used for link.exe's output.
+    pub fn oem_code_page() -> u32 {
+        unsafe {
+            let mut cp: u32 = 0;
+            // We're using the `LOCALE_RETURN_NUMBER` flag to return a u32.
+            // But the API requires us to pass the data as though it's a [u16] string.
+            let len = std::mem::size_of::<u32>() / std::mem::size_of::<u16>();
+            let data = std::slice::from_raw_parts_mut(&mut cp as *mut u32 as *mut u16, len);
+            let len_written = GetLocaleInfoEx(
+                LOCALE_NAME_SYSTEM_DEFAULT,
+                LOCALE_IUSEUTF8LEGACYOEMCP | LOCALE_RETURN_NUMBER,
+                Some(data),
+            );
+            if len_written as usize == len { cp } else { CP_OEMCP }
+        }
+    }
+    /// Try to convert a multi-byte string to a UTF-8 string using the given code page
+    /// The string does not need to be null terminated.
+    ///
+    /// This is implemented as a wrapper around `MultiByteToWideChar`.
+    /// See <https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar>
+    ///
+    /// It will fail if the multi-byte string is longer than `i32::MAX` or if it contains
+    /// any invalid bytes for the expected encoding.
+    pub fn locale_byte_str_to_string(s: &[u8], code_page: u32) -> Option<String> {
+        // `MultiByteToWideChar` requires a length to be a "positive integer".
+        if s.len() > isize::MAX as usize {
+            return None;
+        }
+        // Error if the string is not valid for the expected code page.
+        let flags = MB_ERR_INVALID_CHARS;
+        // Call MultiByteToWideChar twice.
+        // First to calculate the length then to convert the string.
+        let mut len = unsafe { MultiByteToWideChar(code_page, flags, s, None) };
+        if len > 0 {
+            let mut utf16 = vec![0; len as usize];
+            len = unsafe { MultiByteToWideChar(code_page, flags, s, Some(&mut utf16)) };
+            if len > 0 {
+                return utf16.get(..len as usize).map(String::from_utf16_lossy);
+            }
+        }
+        None
+    }
+}
+
 fn add_sanitizer_libraries(sess: &Session, crate_type: CrateType, linker: &mut dyn Linker) {
     // On macOS the runtimes are distributed as dylibs which should be linked to
     // both executables and dynamic shared objects. Everywhere else the runtimes
diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs
index f6e937a740c..f706ecea975 100644
--- a/compiler/rustc_codegen_ssa/src/mir/mod.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs
@@ -304,7 +304,17 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
                     bug!("spread argument isn't a tuple?!");
                 };
 
-                let place = PlaceRef::alloca(bx, bx.layout_of(arg_ty));
+                let layout = bx.layout_of(arg_ty);
+
+                // FIXME: support unsized params in "rust-call" ABI
+                if layout.is_unsized() {
+                    span_bug!(
+                        arg_decl.source_info.span,
+                        "\"rust-call\" ABI does not support unsized params",
+                    );
+                }
+
+                let place = PlaceRef::alloca(bx, layout);
                 for i in 0..tupled_arg_tys.len() {
                     let arg = &fx.fn_abi.args[idx];
                     idx += 1;
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
index 94de19a9c29..64452472eec 100644
--- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
@@ -819,8 +819,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                     .builtin_deref(true)
                     .unwrap_or_else(|| bug!("deref of non-pointer {:?}", input_ty))
                     .ty;
-                let llty = bx.cx().backend_type(bx.cx().layout_of(pointee_type));
-                bx.inbounds_gep(llty, lhs, &[rhs])
+                let pointee_layout = bx.cx().layout_of(pointee_type);
+                if pointee_layout.is_zst() {
+                    // `Offset` works in terms of the size of pointee,
+                    // so offsetting a pointer to ZST is a noop.
+                    lhs
+                } else {
+                    let llty = bx.cx().backend_type(pointee_layout);
+                    bx.inbounds_gep(llty, lhs, &[rhs])
+                }
             }
             mir::BinOp::Shl => common::build_unchecked_lshift(bx, lhs, rhs),
             mir::BinOp::Shr => common::build_unchecked_rshift(bx, input_ty, lhs, rhs),
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index bfca58a15b3..814b67b46ec 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -559,20 +559,11 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
     }
 
     fn binary_ptr_op(
-        ecx: &InterpCx<'mir, 'tcx, Self>,
-        bin_op: mir::BinOp,
-        left: &ImmTy<'tcx>,
-        right: &ImmTy<'tcx>,
+        _ecx: &InterpCx<'mir, 'tcx, Self>,
+        _bin_op: mir::BinOp,
+        _left: &ImmTy<'tcx>,
+        _right: &ImmTy<'tcx>,
     ) -> InterpResult<'tcx, (Scalar, bool, Ty<'tcx>)> {
-        if bin_op == mir::BinOp::Offset {
-            let ptr = left.to_scalar().to_pointer(ecx)?;
-            let offset_count = right.to_scalar().to_target_isize(ecx)?;
-            let pointee_ty = left.layout.ty.builtin_deref(true).unwrap().ty;
-
-            let offset_ptr = ecx.ptr_offset_inbounds(ptr, pointee_ty, offset_count)?;
-            return Ok((Scalar::from_maybe_pointer(offset_ptr, ecx), false, left.layout.ty));
-        }
-
         throw_unsup_format!("pointer arithmetic or comparison is not supported at compile-time");
     }
 
diff --git a/compiler/rustc_const_eval/src/interpret/operator.rs b/compiler/rustc_const_eval/src/interpret/operator.rs
index 4decfe863e6..7186148daf0 100644
--- a/compiler/rustc_const_eval/src/interpret/operator.rs
+++ b/compiler/rustc_const_eval/src/interpret/operator.rs
@@ -299,6 +299,30 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
         Ok((val, false, ty))
     }
 
+    fn binary_ptr_op(
+        &self,
+        bin_op: mir::BinOp,
+        left: &ImmTy<'tcx, M::Provenance>,
+        right: &ImmTy<'tcx, M::Provenance>,
+    ) -> InterpResult<'tcx, (Scalar<M::Provenance>, bool, Ty<'tcx>)> {
+        use rustc_middle::mir::BinOp::*;
+
+        match bin_op {
+            // Pointer ops that are always supported.
+            Offset => {
+                let ptr = left.to_scalar().to_pointer(self)?;
+                let offset_count = right.to_scalar().to_target_isize(self)?;
+                let pointee_ty = left.layout.ty.builtin_deref(true).unwrap().ty;
+
+                let offset_ptr = self.ptr_offset_inbounds(ptr, pointee_ty, offset_count)?;
+                Ok((Scalar::from_maybe_pointer(offset_ptr, self), false, left.layout.ty))
+            }
+
+            // Fall back to machine hook so Miri can support more pointer ops.
+            _ => M::binary_ptr_op(self, bin_op, left, right),
+        }
+    }
+
     /// Returns the result of the specified operation, whether it overflowed, and
     /// the result type.
     pub fn overflowing_binary_op(
@@ -368,7 +392,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                     right.layout.ty
                 );
 
-                M::binary_ptr_op(self, bin_op, left, right)
+                self.binary_ptr_op(bin_op, left, right)
             }
             _ => span_bug!(
                 self.cur_span(),
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index 6c11edb742c..4fb66854571 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -296,7 +296,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
                 diag_trait(&mut err, self_ty, tcx.require_lang_item(LangItem::Deref, Some(span)));
                 err
             }
-            _ if tcx.opt_parent(callee) == tcx.get_diagnostic_item(sym::ArgumentV1Methods) => ccx
+            _ if tcx.opt_parent(callee) == tcx.get_diagnostic_item(sym::ArgumentMethods) => ccx
                 .tcx
                 .sess
                 .create_err(errors::NonConstFmtMacroCall { span, kind: ccx.const_kind() }),
diff --git a/compiler/rustc_data_structures/src/sharded.rs b/compiler/rustc_data_structures/src/sharded.rs
index bd7a86f6780..7ed70ba1e0f 100644
--- a/compiler/rustc_data_structures/src/sharded.rs
+++ b/compiler/rustc_data_structures/src/sharded.rs
@@ -1,14 +1,10 @@
 use crate::fx::{FxHashMap, FxHasher};
-use crate::sync::{Lock, LockGuard};
+use crate::sync::{CacheAligned, Lock, LockGuard};
 use std::borrow::Borrow;
 use std::collections::hash_map::RawEntryMut;
 use std::hash::{Hash, Hasher};
 use std::mem;
 
-#[derive(Default)]
-#[cfg_attr(parallel_compiler, repr(align(64)))]
-struct CacheAligned<T>(T);
-
 #[cfg(parallel_compiler)]
 // 32 shards is sufficient to reduce contention on an 8-core Ryzen 7 1700,
 // but this should be tested on higher core count CPUs. How the `Sharded` type gets used
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs
index ef1da85198f..e73ca56efa0 100644
--- a/compiler/rustc_data_structures/src/sync.rs
+++ b/compiler/rustc_data_structures/src/sync.rs
@@ -45,6 +45,9 @@ use std::hash::{BuildHasher, Hash};
 use std::ops::{Deref, DerefMut};
 use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe};
 
+mod worker_local;
+pub use worker_local::{Registry, WorkerLocal};
+
 pub use std::sync::atomic::Ordering;
 pub use std::sync::atomic::Ordering::SeqCst;
 
@@ -205,33 +208,6 @@ cfg_if! {
 
         use std::cell::Cell;
 
-        #[derive(Debug)]
-        pub struct WorkerLocal<T>(OneThread<T>);
-
-        impl<T> WorkerLocal<T> {
-            /// Creates a new worker local where the `initial` closure computes the
-            /// value this worker local should take for each thread in the thread pool.
-            #[inline]
-            pub fn new<F: FnMut(usize) -> T>(mut f: F) -> WorkerLocal<T> {
-                WorkerLocal(OneThread::new(f(0)))
-            }
-
-            /// Returns the worker-local value for each thread
-            #[inline]
-            pub fn into_inner(self) -> Vec<T> {
-                vec![OneThread::into_inner(self.0)]
-            }
-        }
-
-        impl<T> Deref for WorkerLocal<T> {
-            type Target = T;
-
-            #[inline(always)]
-            fn deref(&self) -> &T {
-                &self.0
-            }
-        }
-
         pub type MTLockRef<'a, T> = &'a mut MTLock<T>;
 
         #[derive(Debug, Default)]
@@ -351,8 +327,6 @@ cfg_if! {
             };
         }
 
-        pub use rayon_core::WorkerLocal;
-
         pub use rayon::iter::ParallelIterator;
         use rayon::iter::IntoParallelIterator;
 
@@ -383,6 +357,10 @@ pub fn assert_send<T: ?Sized + Send>() {}
 pub fn assert_send_val<T: ?Sized + Send>(_t: &T) {}
 pub fn assert_send_sync_val<T: ?Sized + Sync + Send>(_t: &T) {}
 
+#[derive(Default)]
+#[cfg_attr(parallel_compiler, repr(align(64)))]
+pub struct CacheAligned<T>(pub T);
+
 pub trait HashMapExt<K, V> {
     /// Same as HashMap::insert, but it may panic if there's already an
     /// entry for `key` with a value not equal to `value`
diff --git a/compiler/rustc_data_structures/src/sync/worker_local.rs b/compiler/rustc_data_structures/src/sync/worker_local.rs
new file mode 100644
index 00000000000..bfb04ba8a73
--- /dev/null
+++ b/compiler/rustc_data_structures/src/sync/worker_local.rs
@@ -0,0 +1,180 @@
+use crate::sync::Lock;
+use std::cell::Cell;
+use std::cell::OnceCell;
+use std::ops::Deref;
+use std::ptr;
+use std::sync::Arc;
+
+#[cfg(parallel_compiler)]
+use {crate::cold_path, crate::sync::CacheAligned};
+
+/// A pointer to the `RegistryData` which uniquely identifies a registry.
+/// This identifier can be reused if the registry gets freed.
+#[derive(Clone, Copy, PartialEq)]
+struct RegistryId(*const RegistryData);
+
+impl RegistryId {
+    #[inline(always)]
+    /// Verifies that the current thread is associated with the registry and returns its unique
+    /// index within the registry. This panics if the current thread is not associated with this
+    /// registry.
+    ///
+    /// Note that there's a race possible where the identifer in `THREAD_DATA` could be reused
+    /// so this can succeed from a different registry.
+    #[cfg(parallel_compiler)]
+    fn verify(self) -> usize {
+        let (id, index) = THREAD_DATA.with(|data| (data.registry_id.get(), data.index.get()));
+
+        if id == self {
+            index
+        } else {
+            cold_path(|| panic!("Unable to verify registry association"))
+        }
+    }
+}
+
+struct RegistryData {
+    thread_limit: usize,
+    threads: Lock<usize>,
+}
+
+/// Represents a list of threads which can access worker locals.
+#[derive(Clone)]
+pub struct Registry(Arc<RegistryData>);
+
+thread_local! {
+    /// The registry associated with the thread.
+    /// This allows the `WorkerLocal` type to clone the registry in its constructor.
+    static REGISTRY: OnceCell<Registry> = OnceCell::new();
+}
+
+struct ThreadData {
+    registry_id: Cell<RegistryId>,
+    index: Cell<usize>,
+}
+
+thread_local! {
+    /// A thread local which contains the identifer of `REGISTRY` but allows for faster access.
+    /// It also holds the index of the current thread.
+    static THREAD_DATA: ThreadData = const { ThreadData {
+        registry_id: Cell::new(RegistryId(ptr::null())),
+        index: Cell::new(0),
+    }};
+}
+
+impl Registry {
+    /// Creates a registry which can hold up to `thread_limit` threads.
+    pub fn new(thread_limit: usize) -> Self {
+        Registry(Arc::new(RegistryData { thread_limit, threads: Lock::new(0) }))
+    }
+
+    /// Gets the registry associated with the current thread. Panics if there's no such registry.
+    pub fn current() -> Self {
+        REGISTRY.with(|registry| registry.get().cloned().expect("No assocated registry"))
+    }
+
+    /// Registers the current thread with the registry so worker locals can be used on it.
+    /// Panics if the thread limit is hit or if the thread already has an associated registry.
+    pub fn register(&self) {
+        let mut threads = self.0.threads.lock();
+        if *threads < self.0.thread_limit {
+            REGISTRY.with(|registry| {
+                if registry.get().is_some() {
+                    drop(threads);
+                    panic!("Thread already has a registry");
+                }
+                registry.set(self.clone()).ok();
+                THREAD_DATA.with(|data| {
+                    data.registry_id.set(self.id());
+                    data.index.set(*threads);
+                });
+                *threads += 1;
+            });
+        } else {
+            drop(threads);
+            panic!("Thread limit reached");
+        }
+    }
+
+    /// Gets the identifer of this registry.
+    fn id(&self) -> RegistryId {
+        RegistryId(&*self.0)
+    }
+}
+
+/// Holds worker local values for each possible thread in a registry. You can only access the
+/// worker local value through the `Deref` impl on the registry associated with the thread it was
+/// created on. It will panic otherwise.
+pub struct WorkerLocal<T> {
+    #[cfg(not(parallel_compiler))]
+    local: T,
+    #[cfg(parallel_compiler)]
+    locals: Box<[CacheAligned<T>]>,
+    #[cfg(parallel_compiler)]
+    registry: Registry,
+}
+
+// This is safe because the `deref` call will return a reference to a `T` unique to each thread
+// or it will panic for threads without an associated local. So there isn't a need for `T` to do
+// it's own synchronization. The `verify` method on `RegistryId` has an issue where the the id
+// can be reused, but `WorkerLocal` has a reference to `Registry` which will prevent any reuse.
+#[cfg(parallel_compiler)]
+unsafe impl<T: Send> Sync for WorkerLocal<T> {}
+
+impl<T> WorkerLocal<T> {
+    /// Creates a new worker local where the `initial` closure computes the
+    /// value this worker local should take for each thread in the registry.
+    #[inline]
+    pub fn new<F: FnMut(usize) -> T>(mut initial: F) -> WorkerLocal<T> {
+        #[cfg(parallel_compiler)]
+        {
+            let registry = Registry::current();
+            WorkerLocal {
+                locals: (0..registry.0.thread_limit).map(|i| CacheAligned(initial(i))).collect(),
+                registry,
+            }
+        }
+        #[cfg(not(parallel_compiler))]
+        {
+            WorkerLocal { local: initial(0) }
+        }
+    }
+
+    /// Returns the worker-local values for each thread
+    #[inline]
+    pub fn into_inner(self) -> impl Iterator<Item = T> {
+        #[cfg(parallel_compiler)]
+        {
+            self.locals.into_vec().into_iter().map(|local| local.0)
+        }
+        #[cfg(not(parallel_compiler))]
+        {
+            std::iter::once(self.local)
+        }
+    }
+}
+
+impl<T> WorkerLocal<Vec<T>> {
+    /// Joins the elements of all the worker locals into one Vec
+    pub fn join(self) -> Vec<T> {
+        self.into_inner().into_iter().flat_map(|v| v).collect()
+    }
+}
+
+impl<T> Deref for WorkerLocal<T> {
+    type Target = T;
+
+    #[inline(always)]
+    #[cfg(not(parallel_compiler))]
+    fn deref(&self) -> &T {
+        &self.local
+    }
+
+    #[inline(always)]
+    #[cfg(parallel_compiler)]
+    fn deref(&self) -> &T {
+        // This is safe because `verify` will only return values less than
+        // `self.registry.thread_limit` which is the size of the `self.locals` array.
+        unsafe { &self.locals.get_unchecked(self.registry.id().verify()).0 }
+    }
+}
diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs
index 691e92f196a..e893a2c7813 100644
--- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs
+++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs
@@ -82,11 +82,13 @@ where
     /// drop, use [`TaggedPtr`] instead.
     ///
     /// [`TaggedPtr`]: crate::tagged_ptr::TaggedPtr
+    #[inline]
     pub fn new(pointer: P, tag: T) -> Self {
         Self { packed: Self::pack(P::into_ptr(pointer), tag), tag_ghost: PhantomData }
     }
 
     /// Retrieves the pointer.
+    #[inline]
     pub fn pointer(self) -> P
     where
         P: Copy,
@@ -123,6 +125,7 @@ where
     /// according to `self.packed` encoding scheme.
     ///
     /// [`P::into_ptr`]: Pointer::into_ptr
+    #[inline]
     fn pack(ptr: NonNull<P::Target>, tag: T) -> NonNull<P::Target> {
         // Trigger assert!
         let () = Self::ASSERTION;
@@ -145,6 +148,7 @@ where
     }
 
     /// Retrieves the original raw pointer from `self.packed`.
+    #[inline]
     pub(super) fn pointer_raw(&self) -> NonNull<P::Target> {
         self.packed.map_addr(|addr| unsafe { NonZeroUsize::new_unchecked(addr.get() << T::BITS) })
     }
@@ -184,6 +188,7 @@ where
     P: Pointer + Copy,
     T: Tag,
 {
+    #[inline]
     fn clone(&self) -> Self {
         *self
     }
@@ -196,6 +201,7 @@ where
 {
     type Target = P::Target;
 
+    #[inline]
     fn deref(&self) -> &Self::Target {
         // Safety:
         // `pointer_raw` returns the original pointer from `P::into_ptr` which,
@@ -209,6 +215,7 @@ where
     P: Pointer + DerefMut,
     T: Tag,
 {
+    #[inline]
     fn deref_mut(&mut self) -> &mut Self::Target {
         // Safety:
         // `pointer_raw` returns the original pointer from `P::into_ptr` which,
@@ -235,6 +242,7 @@ where
     P: Pointer,
     T: Tag,
 {
+    #[inline]
     fn eq(&self, other: &Self) -> bool {
         self.packed == other.packed
     }
@@ -252,6 +260,7 @@ where
     P: Pointer,
     T: Tag,
 {
+    #[inline]
     fn hash<H: Hasher>(&self, state: &mut H) {
         self.packed.hash(state);
     }
diff --git a/compiler/rustc_data_structures/src/tagged_ptr/drop.rs b/compiler/rustc_data_structures/src/tagged_ptr/drop.rs
index d418c06b7eb..4e42b5b4afe 100644
--- a/compiler/rustc_data_structures/src/tagged_ptr/drop.rs
+++ b/compiler/rustc_data_structures/src/tagged_ptr/drop.rs
@@ -30,16 +30,19 @@ where
     T: Tag,
 {
     /// Tags `pointer` with `tag`.
+    #[inline]
     pub fn new(pointer: P, tag: T) -> Self {
         TaggedPtr { raw: CopyTaggedPtr::new(pointer, tag) }
     }
 
     /// Retrieves the tag.
+    #[inline]
     pub fn tag(&self) -> T {
         self.raw.tag()
     }
 
     /// Sets the tag to a new value.
+    #[inline]
     pub fn set_tag(&mut self, tag: T) {
         self.raw.set_tag(tag)
     }
@@ -63,6 +66,8 @@ where
     T: Tag,
 {
     type Target = P::Target;
+
+    #[inline]
     fn deref(&self) -> &Self::Target {
         self.raw.deref()
     }
@@ -73,6 +78,7 @@ where
     P: Pointer + DerefMut,
     T: Tag,
 {
+    #[inline]
     fn deref_mut(&mut self) -> &mut Self::Target {
         self.raw.deref_mut()
     }
@@ -108,6 +114,7 @@ where
     P: Pointer,
     T: Tag,
 {
+    #[inline]
     fn eq(&self, other: &Self) -> bool {
         self.raw.eq(&other.raw)
     }
@@ -125,6 +132,7 @@ where
     P: Pointer,
     T: Tag,
 {
+    #[inline]
     fn hash<H: Hasher>(&self, state: &mut H) {
         self.raw.hash(state);
     }
diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs
index 3d644de1665..3b9fc5e9a51 100644
--- a/compiler/rustc_feature/src/accepted.rs
+++ b/compiler/rustc_feature/src/accepted.rs
@@ -239,7 +239,7 @@ declare_features! (
     /// Allows using `Self` and associated types in struct expressions and patterns.
     (accepted, more_struct_aliases, "1.16.0", Some(37544), None),
     /// Allows using the MOVBE target feature.
-    (accepted, movbe_target_feature, "CURRENT_RUSTC_VERSION", Some(44839), None),
+    (accepted, movbe_target_feature, "1.70.0", Some(44839), None),
     /// Allows patterns with concurrent by-move and by-ref bindings.
     /// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref.
     (accepted, move_ref_pattern, "1.49.0", Some(68354), None),
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 48f5bd1cb50..052d312d9a0 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -417,7 +417,7 @@ declare_features! (
     /// Allows `if let` guard in match arms.
     (active, if_let_guard, "1.47.0", Some(51114), None),
     /// Allows `impl Trait` to be used inside associated types (RFC 2515).
-    (active, impl_trait_in_assoc_type, "CURRENT_RUSTC_VERSION", Some(63063), None),
+    (active, impl_trait_in_assoc_type, "1.70.0", Some(63063), None),
     /// Allows `impl Trait` as output type in `Fn` traits in return position of functions.
     (active, impl_trait_in_fn_trait_return, "1.64.0", Some(99697), None),
     /// Allows referencing `Self` and projections in impl-trait.
@@ -498,7 +498,7 @@ declare_features! (
     /// Allows return-position `impl Trait` in traits.
     (incomplete, return_position_impl_trait_in_trait, "1.65.0", Some(91611), None),
     /// Allows bounding the return type of AFIT/RPITIT.
-    (incomplete, return_type_notation, "CURRENT_RUSTC_VERSION", Some(109417), None),
+    (incomplete, return_type_notation, "1.70.0", Some(109417), None),
     /// Allows `extern "rust-cold"`.
     (active, rust_cold_cc, "1.63.0", Some(97544), None),
     /// Allows the use of SIMD types in functions declared in `extern` blocks.
@@ -521,7 +521,7 @@ declare_features! (
     /// Dyn upcasting is casting, e.g., `dyn Foo -> dyn Bar` where `Foo: Bar`.
     (active, trait_upcasting, "1.56.0", Some(65991), None),
     /// Allows for transmuting between arrays with sizes that contain generic consts.
-    (active, transmute_generic_consts, "CURRENT_RUSTC_VERSION", Some(109929), None),
+    (active, transmute_generic_consts, "1.70.0", Some(109929), None),
     /// Allows #[repr(transparent)] on unions (RFC 2645).
     (active, transparent_unions, "1.37.0", Some(60405), None),
     /// Allows inconsistent bounds in where clauses.
diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs
index 876a31abdf8..8bca24b2bf0 100644
--- a/compiler/rustc_feature/src/removed.rs
+++ b/compiler/rustc_feature/src/removed.rs
@@ -53,7 +53,7 @@ declare_features! (
     (removed, await_macro, "1.38.0", Some(50547), None,
      Some("subsumed by `.await` syntax")),
     /// Allows using the `box $expr` syntax.
-    (removed, box_syntax, "CURRENT_RUSTC_VERSION", Some(49733), None, Some("replaced with `#[rustc_box]`")),
+    (removed, box_syntax, "1.70.0", Some(49733), None, Some("replaced with `#[rustc_box]`")),
     /// Allows capturing disjoint fields in a closure/generator (RFC 2229).
     (removed, capture_disjoint_fields, "1.49.0", Some(53488), None, Some("stabilized in Rust 2021")),
     /// Allows comparing raw pointers during const eval.
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index 21b4a3370d3..e220a029339 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -26,7 +26,7 @@ use rustc_target::spec::abi::Abi;
 use smallvec::SmallVec;
 use std::fmt;
 
-#[derive(Debug, Copy, Clone, Encodable, HashStable_Generic)]
+#[derive(Debug, Copy, Clone, HashStable_Generic)]
 pub struct Lifetime {
     pub hir_id: HirId,
 
@@ -41,8 +41,7 @@ pub struct Lifetime {
     pub res: LifetimeName,
 }
 
-#[derive(Debug, Clone, PartialEq, Eq, Encodable, Hash, Copy)]
-#[derive(HashStable_Generic)]
+#[derive(Debug, Copy, Clone, HashStable_Generic)]
 pub enum ParamName {
     /// Some user-given name like `T` or `'x`.
     Plain(Ident),
@@ -85,8 +84,7 @@ impl ParamName {
     }
 }
 
-#[derive(Debug, Clone, PartialEq, Eq, Encodable, Hash, Copy)]
-#[derive(HashStable_Generic)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, HashStable_Generic)]
 pub enum LifetimeName {
     /// User-given names or fresh (synthetic) names.
     Param(LocalDefId),
@@ -243,13 +241,13 @@ impl<'hir> PathSegment<'hir> {
     }
 }
 
-#[derive(Encodable, Clone, Copy, Debug, HashStable_Generic)]
+#[derive(Clone, Copy, Debug, HashStable_Generic)]
 pub struct ConstArg {
     pub value: AnonConst,
     pub span: Span,
 }
 
-#[derive(Encodable, Clone, Copy, Debug, HashStable_Generic)]
+#[derive(Clone, Copy, Debug, HashStable_Generic)]
 pub struct InferArg {
     pub hir_id: HirId,
     pub span: Span,
@@ -422,8 +420,7 @@ impl<'hir> GenericArgs<'hir> {
     }
 }
 
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Hash, Debug)]
-#[derive(HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug, HashStable_Generic)]
 pub enum GenericArgsParentheses {
     No,
     /// Bounds for `feature(return_type_notation)`, like `T: Trait<method(..): Send>`,
@@ -435,8 +432,7 @@ pub enum GenericArgsParentheses {
 
 /// A modifier on a bound, currently this is only used for `?Sized`, where the
 /// modifier is `Maybe`. Negative bounds should also be handled here.
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Hash, Debug)]
-#[derive(HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, HashStable_Generic)]
 pub enum TraitBoundModifier {
     None,
     Maybe,
@@ -474,7 +470,7 @@ impl GenericBound<'_> {
 
 pub type GenericBounds<'hir> = &'hir [GenericBound<'hir>];
 
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub enum LifetimeParamKind {
     // Indicates that the lifetime definition was explicitly declared (e.g., in
     // `fn foo<'a>(x: &'a u8) -> &'a u8 { x }`).
@@ -539,7 +535,7 @@ impl<'hir> GenericParam<'hir> {
 /// early-bound (but can be a late-bound lifetime in functions, for example),
 /// or from a `for<...>` binder, in which case it's late-bound (and notably,
 /// does not show up in the parent item's generics).
-#[derive(Debug, HashStable_Generic, PartialEq, Eq, Copy, Clone)]
+#[derive(Debug, Clone, Copy, HashStable_Generic)]
 pub enum GenericParamSource {
     // Early or late-bound parameters defined on an item
     Generics,
@@ -1097,7 +1093,7 @@ pub struct PatField<'hir> {
     pub span: Span,
 }
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum RangeEnd {
     Included,
     Excluded,
@@ -1197,7 +1193,7 @@ pub enum PatKind<'hir> {
     Slice(&'hir [Pat<'hir>], Option<&'hir Pat<'hir>>, &'hir [Pat<'hir>]),
 }
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum BinOpKind {
     /// The `+` operator (addition).
     Add,
@@ -1325,7 +1321,7 @@ impl Into<ast::BinOpKind> for BinOpKind {
 
 pub type BinOp = Spanned<BinOpKind>;
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum UnOp {
     /// The `*` operator (dereferencing).
     Deref,
@@ -1450,19 +1446,19 @@ pub struct ExprField<'hir> {
     pub is_shorthand: bool,
 }
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum BlockCheckMode {
     DefaultBlock,
     UnsafeBlock(UnsafeSource),
 }
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum UnsafeSource {
     CompilerGenerated,
     UserProvided,
 }
 
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
 pub struct BodyId {
     pub hir_id: HirId,
 }
@@ -1506,7 +1502,7 @@ impl<'hir> Body<'hir> {
 }
 
 /// The type of source expression that caused this generator to be created.
-#[derive(Clone, PartialEq, PartialOrd, Eq, Hash, Debug, Copy)]
+#[derive(Clone, PartialEq, Eq, Debug, Copy, Hash)]
 #[derive(HashStable_Generic, Encodable, Decodable)]
 pub enum GeneratorKind {
     /// An explicit `async` block or the body of an async function.
@@ -1539,7 +1535,7 @@ impl GeneratorKind {
 ///
 /// This helps error messages but is also used to drive coercions in
 /// type-checking (see #60424).
-#[derive(Clone, PartialEq, PartialOrd, Eq, Hash, Debug, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug, Copy)]
 #[derive(HashStable_Generic, Encodable, Decodable)]
 pub enum AsyncGeneratorKind {
     /// An explicit `async` block written by the user.
@@ -1649,7 +1645,7 @@ impl fmt::Display for ConstContext {
 /// A literal.
 pub type Lit = Spanned<LitKind>;
 
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub enum ArrayLen {
     Infer(HirId, Span),
     Body(AnonConst),
@@ -1671,7 +1667,7 @@ impl ArrayLen {
 ///
 /// You can check if this anon const is a default in a const param
 /// `const N: usize = { ... }` with `tcx.hir().opt_const_param_default_param_def_id(..)`
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub struct AnonConst {
     pub hir_id: HirId,
     pub def_id: LocalDefId,
@@ -2105,7 +2101,7 @@ impl<'hir> QPath<'hir> {
 }
 
 /// Hints at the original code for a let statement.
-#[derive(Copy, Clone, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub enum LocalSource {
     /// A `match _ { .. }`.
     Normal,
@@ -2158,7 +2154,7 @@ impl MatchSource {
 }
 
 /// The loop type that yielded an `ExprKind::Loop`.
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum LoopSource {
     /// A `loop { .. }` loop.
     Loop,
@@ -2178,7 +2174,7 @@ impl LoopSource {
     }
 }
 
-#[derive(Copy, Clone, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub enum LoopIdError {
     OutsideLoopScope,
     UnlabeledCfInWhileCondition,
@@ -2197,7 +2193,7 @@ impl fmt::Display for LoopIdError {
     }
 }
 
-#[derive(Copy, Clone, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub struct Destination {
     /// This is `Some(_)` iff there is an explicit user-specified 'label
     pub label: Option<Label>,
@@ -2208,7 +2204,7 @@ pub struct Destination {
 }
 
 /// The yield kind that caused an `ExprKind::Yield`.
-#[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable, Decodable, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub enum YieldSource {
     /// An `<expr>.await`.
     Await { expr: Option<HirId> },
@@ -2327,7 +2323,7 @@ impl<'hir> TraitItem<'hir> {
 }
 
 /// Represents a trait method's body (or just argument names).
-#[derive(Encodable, Debug, Clone, Copy, HashStable_Generic)]
+#[derive(Debug, Clone, Copy, HashStable_Generic)]
 pub enum TraitFn<'hir> {
     /// No default body in the trait, just a signature.
     Required(&'hir [Ident]),
@@ -2658,7 +2654,7 @@ pub struct OpaqueTy<'hir> {
 }
 
 /// From whence the opaque type came.
-#[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug, HashStable_Generic)]
 pub enum OpaqueTyOrigin {
     /// `-> impl Trait`
     FnReturn(LocalDefId),
@@ -2818,7 +2814,7 @@ impl ImplicitSelfKind {
     }
 }
 
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Encodable, Decodable, Debug)]
+#[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug)]
 #[derive(HashStable_Generic)]
 pub enum IsAsync {
     Async,
@@ -2831,7 +2827,7 @@ impl IsAsync {
     }
 }
 
-#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, Encodable, Decodable, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable, Decodable, HashStable_Generic)]
 pub enum Defaultness {
     Default { has_value: bool },
     Final,
@@ -2887,13 +2883,13 @@ pub enum ClosureBinder {
     For { span: Span },
 }
 
-#[derive(Encodable, Debug, Clone, Copy, HashStable_Generic)]
+#[derive(Debug, Clone, Copy, HashStable_Generic)]
 pub struct Mod<'hir> {
     pub spans: ModSpans,
     pub item_ids: &'hir [ItemId],
 }
 
-#[derive(Copy, Clone, Debug, HashStable_Generic, Encodable)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub struct ModSpans {
     /// A span from the first token past `{` to the last token until `}`.
     /// For `mod foo;`, the inner span ranges from the first token
@@ -2922,7 +2918,7 @@ pub struct Variant<'hir> {
     pub span: Span,
 }
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum UseKind {
     /// One import, e.g., `use foo::bar` or `use foo::bar as baz`.
     /// Also produced for each element of a list `use`, e.g.
@@ -3233,7 +3229,7 @@ impl fmt::Display for Unsafety {
     }
 }
 
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
 #[derive(Encodable, Decodable, HashStable_Generic)]
 pub enum Constness {
     Const,
@@ -3249,7 +3245,7 @@ impl fmt::Display for Constness {
     }
 }
 
-#[derive(Copy, Clone, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, Debug, HashStable_Generic)]
 pub struct FnHeader {
     pub unsafety: Unsafety,
     pub constness: Constness,
@@ -3381,7 +3377,7 @@ impl ItemKind<'_> {
 /// type or method, and whether it is public). This allows other
 /// passes to find the impl they want without loading the ID (which
 /// means fewer edges in the incremental compilation graph).
-#[derive(Encodable, Debug, Clone, Copy, HashStable_Generic)]
+#[derive(Debug, Clone, Copy, HashStable_Generic)]
 pub struct TraitItemRef {
     pub id: TraitItemId,
     pub ident: Ident,
@@ -3405,7 +3401,7 @@ pub struct ImplItemRef {
     pub trait_item_def_id: Option<DefId>,
 }
 
-#[derive(Copy, Clone, PartialEq, Encodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Debug, HashStable_Generic)]
 pub enum AssocItemKind {
     Const,
     Fn { has_self: bool },
@@ -3474,7 +3470,7 @@ pub enum ForeignItemKind<'hir> {
 }
 
 /// A variable captured by a closure.
-#[derive(Debug, Copy, Clone, Encodable, HashStable_Generic)]
+#[derive(Debug, Copy, Clone, HashStable_Generic)]
 pub struct Upvar {
     /// First span where it is accessed (there can be multiple).
     pub span: Span,
@@ -3483,7 +3479,7 @@ pub struct Upvar {
 // The TraitCandidate's import_ids is empty if the trait is defined in the same module, and
 // has length > 0 if the trait is found through an chain of imports, starting with the
 // import/use statement in the scope where the trait is used.
-#[derive(Encodable, Decodable, Debug, Clone, HashStable_Generic)]
+#[derive(Debug, Clone, HashStable_Generic)]
 pub struct TraitCandidate {
     pub def_id: DefId,
     pub import_ids: SmallVec<[LocalDefId; 1]>,
diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs
index 0fcbaa2efab..d505d8b8e0b 100644
--- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs
+++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs
@@ -215,7 +215,8 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
 
             sym::type_name => (1, Vec::new(), tcx.mk_static_str()),
             sym::type_id => (1, Vec::new(), tcx.types.u64),
-            sym::offset | sym::arith_offset => (
+            sym::offset => (2, vec![param(0), param(1)], param(0)),
+            sym::arith_offset => (
                 1,
                 vec![
                     tcx.mk_ptr(ty::TypeAndMut { ty: param(0), mutbl: hir::Mutability::Not }),
diff --git a/compiler/rustc_hir_analysis/src/check/region.rs b/compiler/rustc_hir_analysis/src/check/region.rs
index 421b3df2d53..6ab5556e951 100644
--- a/compiler/rustc_hir_analysis/src/check/region.rs
+++ b/compiler/rustc_hir_analysis/src/check/region.rs
@@ -421,7 +421,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
             let target_scopes = visitor.fixup_scopes.drain(start_point..);
 
             for scope in target_scopes {
-                let mut yield_data =
+                let yield_data =
                     visitor.scope_tree.yield_in_scope.get_mut(&scope).unwrap().last_mut().unwrap();
                 let count = yield_data.expr_and_pat_count;
                 let span = yield_data.span;
diff --git a/compiler/rustc_hir_typeck/src/lib.rs b/compiler/rustc_hir_typeck/src/lib.rs
index 5ccac9a6925..d50be47c915 100644
--- a/compiler/rustc_hir_typeck/src/lib.rs
+++ b/compiler/rustc_hir_typeck/src/lib.rs
@@ -221,12 +221,6 @@ fn typeck_with_fallback<'tcx>(
             }))
         } else if let Node::AnonConst(_) = node {
             match tcx.hir().get(tcx.hir().parent_id(id)) {
-                Node::Expr(&hir::Expr {
-                    kind: hir::ExprKind::ConstBlock(ref anon_const), ..
-                }) if anon_const.hir_id == id => Some(fcx.next_ty_var(TypeVariableOrigin {
-                    kind: TypeVariableOriginKind::TypeInference,
-                    span,
-                })),
                 Node::Ty(&hir::Ty { kind: hir::TyKind::Typeof(ref anon_const), .. })
                     if anon_const.hir_id == id =>
                 {
@@ -461,15 +455,9 @@ fn fatally_break_rust(sess: &Session) {
     ));
 }
 
-fn has_expected_num_generic_args(
-    tcx: TyCtxt<'_>,
-    trait_did: Option<DefId>,
-    expected: usize,
-) -> bool {
-    trait_did.map_or(true, |trait_did| {
-        let generics = tcx.generics_of(trait_did);
-        generics.count() == expected + if generics.has_self { 1 } else { 0 }
-    })
+fn has_expected_num_generic_args(tcx: TyCtxt<'_>, trait_did: DefId, expected: usize) -> bool {
+    let generics = tcx.generics_of(trait_did);
+    generics.count() == expected + if generics.has_self { 1 } else { 0 }
 }
 
 pub fn provide(providers: &mut Providers) {
diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs
index db1f10f645f..43f40ada5ac 100644
--- a/compiler/rustc_hir_typeck/src/method/suggest.rs
+++ b/compiler/rustc_hir_typeck/src/method/suggest.rs
@@ -27,8 +27,8 @@ use rustc_middle::traits::util::supertraits;
 use rustc_middle::ty::fast_reject::DeepRejectCtxt;
 use rustc_middle::ty::fast_reject::{simplify_type, TreatParams};
 use rustc_middle::ty::print::{with_crate_prefix, with_forced_trimmed_paths};
+use rustc_middle::ty::IsSuggestable;
 use rustc_middle::ty::{self, GenericArgKind, Ty, TyCtxt, TypeVisitableExt};
-use rustc_middle::ty::{IsSuggestable, ToPolyTraitRef};
 use rustc_span::symbol::{kw, sym, Ident};
 use rustc_span::Symbol;
 use rustc_span::{edit_distance, source_map, ExpnKind, FileName, MacroKind, Span};
@@ -2068,7 +2068,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
         let mut derives = Vec::<(String, Span, Symbol)>::new();
         let mut traits = Vec::new();
         for (pred, _, _) in unsatisfied_predicates {
-            let ty::PredicateKind::Clause(ty::Clause::Trait(trait_pred)) = pred.kind().skip_binder() else { continue };
+            let Some(ty::PredicateKind::Clause(ty::Clause::Trait(trait_pred))) =
+                pred.kind().no_bound_vars()
+            else {
+                continue
+            };
             let adt = match trait_pred.self_ty().ty_adt_def() {
                 Some(adt) if adt.did().is_local() => adt,
                 _ => continue,
@@ -2085,22 +2089,31 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     | sym::Hash
                     | sym::Debug => true,
                     _ => false,
+                } && match trait_pred.trait_ref.substs.as_slice() {
+                    // Only suggest deriving if lhs == rhs...
+                    [lhs, rhs] => {
+                        if let Some(lhs) = lhs.as_type()
+                            && let Some(rhs) = rhs.as_type()
+                        {
+                            self.can_eq(self.param_env, lhs, rhs)
+                        } else {
+                            false
+                        }
+                    },
+                    // Unary ops can always be derived
+                    [_] => true,
+                    _ => false,
                 };
                 if can_derive {
                     let self_name = trait_pred.self_ty().to_string();
                     let self_span = self.tcx.def_span(adt.did());
-                    if let Some(poly_trait_ref) = pred.to_opt_poly_trait_pred() {
-                        for super_trait in supertraits(self.tcx, poly_trait_ref.to_poly_trait_ref())
+                    for super_trait in
+                        supertraits(self.tcx, ty::Binder::dummy(trait_pred.trait_ref))
+                    {
+                        if let Some(parent_diagnostic_name) =
+                            self.tcx.get_diagnostic_name(super_trait.def_id())
                         {
-                            if let Some(parent_diagnostic_name) =
-                                self.tcx.get_diagnostic_name(super_trait.def_id())
-                            {
-                                derives.push((
-                                    self_name.clone(),
-                                    self_span,
-                                    parent_diagnostic_name,
-                                ));
-                            }
+                            derives.push((self_name.clone(), self_span, parent_diagnostic_name));
                         }
                     }
                     derives.push((self_name, self_span, diagnostic_name));
diff --git a/compiler/rustc_hir_typeck/src/op.rs b/compiler/rustc_hir_typeck/src/op.rs
index a52c94cb00c..e91ae4466eb 100644
--- a/compiler/rustc_hir_typeck/src/op.rs
+++ b/compiler/rustc_hir_typeck/src/op.rs
@@ -408,7 +408,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                     }
                 };
 
-                let is_compatible = |lhs_ty, rhs_ty| {
+                let is_compatible_after_call = |lhs_ty, rhs_ty| {
                     self.lookup_op_method(
                         lhs_ty,
                         Some((rhs_expr, rhs_ty)),
@@ -416,6 +416,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         expected,
                     )
                     .is_ok()
+                        // Suggest calling even if, after calling, the types don't
+                        // implement the operator, since it'll lead to better
+                        // diagnostics later.
+                        || self.can_eq(self.param_env, lhs_ty, rhs_ty)
                 };
 
                 // We should suggest `a + b` => `*a + b` if `a` is copy, and suggest
@@ -436,16 +440,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         suggest_deref_binop(*lhs_deref_ty);
                     }
                 } else if self.suggest_fn_call(&mut err, lhs_expr, lhs_ty, |lhs_ty| {
-                    is_compatible(lhs_ty, rhs_ty)
+                    is_compatible_after_call(lhs_ty, rhs_ty)
                 }) || self.suggest_fn_call(&mut err, rhs_expr, rhs_ty, |rhs_ty| {
-                    is_compatible(lhs_ty, rhs_ty)
+                    is_compatible_after_call(lhs_ty, rhs_ty)
                 }) || self.suggest_two_fn_call(
                     &mut err,
                     rhs_expr,
                     rhs_ty,
                     lhs_expr,
                     lhs_ty,
-                    |lhs_ty, rhs_ty| is_compatible(lhs_ty, rhs_ty),
+                    |lhs_ty, rhs_ty| is_compatible_after_call(lhs_ty, rhs_ty),
                 ) {
                     // Cool
                 }
@@ -719,7 +723,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             Op::Binary(op, _) => op.span,
             Op::Unary(_, span) => span,
         };
-        let (opname, trait_did) = lang_item_for_op(self.tcx, op, span);
+        let (opname, Some(trait_did)) = lang_item_for_op(self.tcx, op, span) else {
+            // Bail if the operator trait is not defined.
+            return Err(vec![]);
+        };
 
         debug!(
             "lookup_op_method(lhs_ty={:?}, op={:?}, opname={:?}, trait_did={:?})",
@@ -759,18 +766,33 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             },
         );
 
-        let method = trait_did.and_then(|trait_did| {
-            self.lookup_method_in_trait(cause.clone(), opname, trait_did, lhs_ty, Some(input_types))
-        });
-
-        match (method, trait_did) {
-            (Some(ok), _) => {
+        let method = self.lookup_method_in_trait(
+            cause.clone(),
+            opname,
+            trait_did,
+            lhs_ty,
+            Some(input_types),
+        );
+        match method {
+            Some(ok) => {
                 let method = self.register_infer_ok_obligations(ok);
                 self.select_obligations_where_possible(|_| {});
                 Ok(method)
             }
-            (None, None) => Err(vec![]),
-            (None, Some(trait_did)) => {
+            None => {
+                // This path may do some inference, so make sure we've really
+                // doomed compilation so as to not accidentally stabilize new
+                // inference or something here...
+                self.tcx.sess.delay_span_bug(span, "this path really should be doomed...");
+                // Guide inference for the RHS expression if it's provided --
+                // this will allow us to better error reporting, at the expense
+                // of making some error messages a bit more specific.
+                if let Some((rhs_expr, rhs_ty)) = opt_rhs
+                    && rhs_ty.is_ty_var()
+                {
+                    self.check_expr_coercible_to_type(rhs_expr, rhs_ty, None);
+                }
+
                 let (obligation, _) =
                     self.obligation_for_method(cause, trait_did, lhs_ty, Some(input_types));
                 // FIXME: This should potentially just add the obligation to the `FnCtxt`
diff --git a/compiler/rustc_hir_typeck/src/place_op.rs b/compiler/rustc_hir_typeck/src/place_op.rs
index 2cca45de5e9..1f7e7ba9f5b 100644
--- a/compiler/rustc_hir_typeck/src/place_op.rs
+++ b/compiler/rustc_hir_typeck/src/place_op.rs
@@ -200,9 +200,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
     ) -> Option<InferOk<'tcx, MethodCallee<'tcx>>> {
         debug!("try_overloaded_place_op({:?},{:?},{:?})", span, base_ty, op);
 
-        let (imm_tr, imm_op) = match op {
+        let (Some(imm_tr), imm_op) = (match op {
             PlaceOp::Deref => (self.tcx.lang_items().deref_trait(), sym::deref),
             PlaceOp::Index => (self.tcx.lang_items().index_trait(), sym::index),
+        }) else {
+            // Bail if `Deref` or `Index` isn't defined.
+            return None;
         };
 
         // If the lang item was declared incorrectly, stop here so that we don't
@@ -219,15 +222,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             return None;
         }
 
-        imm_tr.and_then(|trait_did| {
-            self.lookup_method_in_trait(
-                self.misc(span),
-                Ident::with_dummy_span(imm_op),
-                trait_did,
-                base_ty,
-                Some(arg_tys),
-            )
-        })
+        self.lookup_method_in_trait(
+            self.misc(span),
+            Ident::with_dummy_span(imm_op),
+            imm_tr,
+            base_ty,
+            Some(arg_tys),
+        )
     }
 
     fn try_mutable_overloaded_place_op(
@@ -239,9 +240,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
     ) -> Option<InferOk<'tcx, MethodCallee<'tcx>>> {
         debug!("try_mutable_overloaded_place_op({:?},{:?},{:?})", span, base_ty, op);
 
-        let (mut_tr, mut_op) = match op {
+        let (Some(mut_tr), mut_op) = (match op {
             PlaceOp::Deref => (self.tcx.lang_items().deref_mut_trait(), sym::deref_mut),
             PlaceOp::Index => (self.tcx.lang_items().index_mut_trait(), sym::index_mut),
+        }) else {
+            // Bail if `DerefMut` or `IndexMut` isn't defined.
+            return None;
         };
 
         // If the lang item was declared incorrectly, stop here so that we don't
@@ -258,15 +262,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             return None;
         }
 
-        mut_tr.and_then(|trait_did| {
-            self.lookup_method_in_trait(
-                self.misc(span),
-                Ident::with_dummy_span(mut_op),
-                trait_did,
-                base_ty,
-                Some(arg_tys),
-            )
-        })
+        self.lookup_method_in_trait(
+            self.misc(span),
+            Ident::with_dummy_span(mut_op),
+            mut_tr,
+            base_ty,
+            Some(arg_tys),
+        )
     }
 
     /// Convert auto-derefs, indices, etc of an expression from `Deref` and `Index`
diff --git a/compiler/rustc_infer/src/traits/project.rs b/compiler/rustc_infer/src/traits/project.rs
index 8d0af738dd1..e375d611936 100644
--- a/compiler/rustc_infer/src/traits/project.rs
+++ b/compiler/rustc_infer/src/traits/project.rs
@@ -20,7 +20,7 @@ pub struct MismatchedProjectionTypes<'tcx> {
     pub err: ty::error::TypeError<'tcx>,
 }
 
-#[derive(Clone, TypeFoldable, TypeVisitable)]
+#[derive(Clone)]
 pub struct Normalized<'tcx, T> {
     pub value: T,
     pub obligations: Vec<PredicateObligation<'tcx>>,
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index 612903810d2..a27a1e2978a 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -4,6 +4,8 @@ use libloading::Library;
 use rustc_ast as ast;
 use rustc_codegen_ssa::traits::CodegenBackend;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
+#[cfg(parallel_compiler)]
+use rustc_data_structures::sync;
 use rustc_errors::registry::Registry;
 use rustc_parse::validate_attr;
 use rustc_session as session;
@@ -170,6 +172,7 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
     use rustc_middle::ty::tls;
     use rustc_query_impl::{deadlock, QueryContext, QueryCtxt};
 
+    let registry = sync::Registry::new(threads);
     let mut builder = rayon::ThreadPoolBuilder::new()
         .thread_name(|_| "rustc".to_string())
         .acquire_thread_handler(jobserver::acquire_thread)
@@ -200,6 +203,9 @@ pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
                 .build_scoped(
                     // Initialize each new worker thread when created.
                     move |thread: rayon::ThreadBuilder| {
+                        // Register the thread for use with the `WorkerLocal` type.
+                        registry.register();
+
                         rustc_span::set_session_globals_then(session_globals, || thread.run())
                     },
                     // Run `f` on the first thread in the thread pool.
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs
index b223b8c137a..a3d7bd3ef59 100644
--- a/compiler/rustc_lint_defs/src/builtin.rs
+++ b/compiler/rustc_lint_defs/src/builtin.rs
@@ -3273,110 +3273,115 @@ declare_lint_pass! {
     /// Does nothing as a lint pass, but registers some `Lint`s
     /// that are used by other parts of the compiler.
     HardwiredLints => [
-        FORBIDDEN_LINT_GROUPS,
-        ILLEGAL_FLOATING_POINT_LITERAL_PATTERN,
+        // tidy-alphabetical-start
+        ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE,
+        AMBIGUOUS_ASSOCIATED_ITEMS,
+        AMBIGUOUS_GLOB_REEXPORTS,
         ARITHMETIC_OVERFLOW,
-        UNCONDITIONAL_PANIC,
-        UNUSED_IMPORTS,
-        UNUSED_EXTERN_CRATES,
-        UNUSED_CRATE_DEPENDENCIES,
-        UNUSED_QUALIFICATIONS,
-        UNKNOWN_LINTS,
-        UNFULFILLED_LINT_EXPECTATIONS,
-        UNUSED_VARIABLES,
-        UNUSED_ASSIGNMENTS,
-        DEAD_CODE,
-        UNREACHABLE_CODE,
-        UNREACHABLE_PATTERNS,
-        OVERLAPPING_RANGE_ENDPOINTS,
+        ASM_SUB_REGISTER,
+        BAD_ASM_STYLE,
+        BARE_TRAIT_OBJECTS,
         BINDINGS_WITH_VARIANT_NAME,
-        UNUSED_MACROS,
-        UNUSED_MACRO_RULES,
-        WARNINGS,
-        UNUSED_FEATURES,
-        STABLE_FEATURES,
-        UNKNOWN_CRATE_TYPES,
-        TRIVIAL_CASTS,
-        TRIVIAL_NUMERIC_CASTS,
-        PRIVATE_IN_PUBLIC,
-        EXPORTED_PRIVATE_DEPENDENCIES,
-        PUB_USE_OF_PRIVATE_EXTERN_CRATE,
-        INVALID_TYPE_PARAM_DEFAULT,
-        RENAMED_AND_REMOVED_LINTS,
-        CONST_ITEM_MUTATION,
-        PATTERNS_IN_FNS_WITHOUT_BODY,
-        MISSING_FRAGMENT_SPECIFIER,
-        LATE_BOUND_LIFETIME_ARGUMENTS,
-        ORDER_DEPENDENT_TRAIT_OBJECTS,
+        BREAK_WITH_LABEL_AND_LOOP,
+        BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE,
+        CENUM_IMPL_DROP_CAST,
         COHERENCE_LEAK_CHECK,
+        CONFLICTING_REPR_HINTS,
+        CONST_EVALUATABLE_UNCHECKED,
+        CONST_ITEM_MUTATION,
+        DEAD_CODE,
         DEPRECATED,
-        UNUSED_UNSAFE,
-        UNUSED_MUT,
-        UNCONDITIONAL_RECURSION,
-        SINGLE_USE_LIFETIMES,
-        UNUSED_LIFETIMES,
-        UNUSED_LABELS,
-        TYVAR_BEHIND_RAW_POINTER,
+        DEPRECATED_CFG_ATTR_CRATE_TYPE_NAME,
+        DEPRECATED_IN_FUTURE,
+        DEPRECATED_WHERE_CLAUSE_LOCATION,
+        DUPLICATE_MACRO_ATTRIBUTES,
         ELIDED_LIFETIMES_IN_PATHS,
-        BARE_TRAIT_OBJECTS,
-        ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE,
-        UNSTABLE_NAME_COLLISIONS,
-        IRREFUTABLE_LET_PATTERNS,
-        WHERE_CLAUSES_OBJECT_SAFETY,
-        PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
-        MACRO_USE_EXTERN_CRATE,
-        MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
+        EXPORTED_PRIVATE_DEPENDENCIES,
+        FFI_UNWIND_CALLS,
+        FORBIDDEN_LINT_GROUPS,
+        FUNCTION_ITEM_REFERENCES,
+        FUZZY_PROVENANCE_CASTS,
         ILL_FORMED_ATTRIBUTE_INPUT,
-        CONFLICTING_REPR_HINTS,
-        META_VARIABLE_MISUSE,
-        DEPRECATED_IN_FUTURE,
-        AMBIGUOUS_ASSOCIATED_ITEMS,
-        INDIRECT_STRUCTURAL_MATCH,
-        POINTER_STRUCTURAL_MATCH,
-        NONTRIVIAL_STRUCTURAL_MATCH,
-        SOFT_UNSTABLE,
-        UNSTABLE_SYNTAX_PRE_EXPANSION,
-        INLINE_NO_SANITIZE,
-        BAD_ASM_STYLE,
-        ASM_SUB_REGISTER,
-        UNSAFE_OP_IN_UNSAFE_FN,
+        ILLEGAL_FLOATING_POINT_LITERAL_PATTERN,
+        IMPLIED_BOUNDS_ENTAILMENT,
         INCOMPLETE_INCLUDE,
-        CENUM_IMPL_DROP_CAST,
-        FUZZY_PROVENANCE_CASTS,
-        LOSSY_PROVENANCE_CASTS,
-        CONST_EVALUATABLE_UNCHECKED,
+        INDIRECT_STRUCTURAL_MATCH,
         INEFFECTIVE_UNSTABLE_TRAIT_IMPL,
-        MUST_NOT_SUSPEND,
-        UNINHABITED_STATIC,
-        FUNCTION_ITEM_REFERENCES,
-        USELESS_DEPRECATED,
-        MISSING_ABI,
+        INLINE_NO_SANITIZE,
+        INVALID_ALIGNMENT,
         INVALID_DOC_ATTRIBUTES,
-        SEMICOLON_IN_EXPRESSIONS_FROM_MACROS,
-        RUST_2021_INCOMPATIBLE_CLOSURE_CAPTURES,
+        INVALID_MACRO_EXPORT_ARGUMENTS,
+        INVALID_TYPE_PARAM_DEFAULT,
+        IRREFUTABLE_LET_PATTERNS,
+        LARGE_ASSIGNMENTS,
+        LATE_BOUND_LIFETIME_ARGUMENTS,
         LEGACY_DERIVE_HELPERS,
+        LOSSY_PROVENANCE_CASTS,
+        MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
+        MACRO_USE_EXTERN_CRATE,
+        META_VARIABLE_MISUSE,
+        MISSING_ABI,
+        MISSING_FRAGMENT_SPECIFIER,
+        MUST_NOT_SUSPEND,
+        NAMED_ARGUMENTS_USED_POSITIONALLY,
+        NON_EXHAUSTIVE_OMITTED_PATTERNS,
+        NONTRIVIAL_STRUCTURAL_MATCH,
+        ORDER_DEPENDENT_TRAIT_OBJECTS,
+        OVERLAPPING_RANGE_ENDPOINTS,
+        PATTERNS_IN_FNS_WITHOUT_BODY,
+        POINTER_STRUCTURAL_MATCH,
+        PRIVATE_IN_PUBLIC,
         PROC_MACRO_BACK_COMPAT,
+        PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
+        PUB_USE_OF_PRIVATE_EXTERN_CRATE,
+        RENAMED_AND_REMOVED_LINTS,
+        REPR_TRANSPARENT_EXTERNAL_PRIVATE_FIELDS,
+        RUST_2021_INCOMPATIBLE_CLOSURE_CAPTURES,
         RUST_2021_INCOMPATIBLE_OR_PATTERNS,
-        LARGE_ASSIGNMENTS,
-        RUST_2021_PRELUDE_COLLISIONS,
         RUST_2021_PREFIXES_INCOMPATIBLE_SYNTAX,
+        RUST_2021_PRELUDE_COLLISIONS,
+        SEMICOLON_IN_EXPRESSIONS_FROM_MACROS,
+        SINGLE_USE_LIFETIMES,
+        SOFT_UNSTABLE,
+        STABLE_FEATURES,
+        SUSPICIOUS_AUTO_TRAIT_IMPLS,
+        TEST_UNSTABLE_LINT,
+        TEXT_DIRECTION_CODEPOINT_IN_COMMENT,
+        TRIVIAL_CASTS,
+        TRIVIAL_NUMERIC_CASTS,
+        TYVAR_BEHIND_RAW_POINTER,
+        UNCONDITIONAL_PANIC,
+        UNCONDITIONAL_RECURSION,
+        UNDEFINED_NAKED_FUNCTION_ABI,
+        UNFULFILLED_LINT_EXPECTATIONS,
+        UNINHABITED_STATIC,
+        UNKNOWN_CRATE_TYPES,
+        UNKNOWN_LINTS,
+        UNREACHABLE_CODE,
+        UNREACHABLE_PATTERNS,
+        UNSAFE_OP_IN_UNSAFE_FN,
+        UNSTABLE_NAME_COLLISIONS,
+        UNSTABLE_SYNTAX_PRE_EXPANSION,
         UNSUPPORTED_CALLING_CONVENTIONS,
-        BREAK_WITH_LABEL_AND_LOOP,
+        UNUSED_ASSIGNMENTS,
         UNUSED_ATTRIBUTES,
+        UNUSED_CRATE_DEPENDENCIES,
+        UNUSED_EXTERN_CRATES,
+        UNUSED_FEATURES,
+        UNUSED_IMPORTS,
+        UNUSED_LABELS,
+        UNUSED_LIFETIMES,
+        UNUSED_MACRO_RULES,
+        UNUSED_MACROS,
+        UNUSED_MUT,
+        UNUSED_QUALIFICATIONS,
         UNUSED_TUPLE_STRUCT_FIELDS,
-        NON_EXHAUSTIVE_OMITTED_PATTERNS,
-        TEXT_DIRECTION_CODEPOINT_IN_COMMENT,
-        DEPRECATED_CFG_ATTR_CRATE_TYPE_NAME,
-        DUPLICATE_MACRO_ATTRIBUTES,
-        SUSPICIOUS_AUTO_TRAIT_IMPLS,
-        DEPRECATED_WHERE_CLAUSE_LOCATION,
-        TEST_UNSTABLE_LINT,
-        FFI_UNWIND_CALLS,
-        REPR_TRANSPARENT_EXTERNAL_PRIVATE_FIELDS,
-        NAMED_ARGUMENTS_USED_POSITIONALLY,
-        IMPLIED_BOUNDS_ENTAILMENT,
-        BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE,
-        AMBIGUOUS_GLOB_REEXPORTS,
+        UNUSED_UNSAFE,
+        UNUSED_VARIABLES,
+        USELESS_DEPRECATED,
+        WARNINGS,
+        WHERE_CLAUSES_OBJECT_SAFETY,
+        // tidy-alphabetical-end
     ]
 }
 
diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs
index 179453238f2..01b69966ca9 100644
--- a/compiler/rustc_metadata/src/creader.rs
+++ b/compiler/rustc_metadata/src/creader.rs
@@ -27,6 +27,7 @@ use rustc_span::{Span, DUMMY_SP};
 use rustc_target::spec::{PanicStrategy, TargetTriple};
 
 use proc_macro::bridge::client::ProcMacro;
+use std::error::Error;
 use std::ops::Fn;
 use std::path::Path;
 use std::time::Duration;
@@ -1094,5 +1095,12 @@ fn load_dylib(path: &Path, max_attempts: usize) -> Result<libloading::Library, S
     }
 
     debug!("Failed to load proc-macro `{}` even after {} attempts.", path.display(), max_attempts);
-    Err(format!("{} (retried {} times)", last_error.unwrap(), max_attempts))
+
+    let last_error = last_error.unwrap();
+    let message = if let Some(src) = last_error.source() {
+        format!("{last_error} ({src}) (retried {max_attempts} times)")
+    } else {
+        format!("{last_error} (retried {max_attempts} times)")
+    };
+    Err(message)
 }
diff --git a/compiler/rustc_middle/src/hir/place.rs b/compiler/rustc_middle/src/hir/place.rs
index 80b4c964ce4..8a22de931c3 100644
--- a/compiler/rustc_middle/src/hir/place.rs
+++ b/compiler/rustc_middle/src/hir/place.rs
@@ -66,7 +66,6 @@ pub struct Place<'tcx> {
 ///
 /// This is an HIR version of [`rustc_middle::mir::Place`].
 #[derive(Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, HashStable)]
-#[derive(TypeFoldable, TypeVisitable)]
 pub struct PlaceWithHirId<'tcx> {
     /// `HirId` of the expression or pattern producing this value.
     pub hir_id: HirId,
diff --git a/compiler/rustc_middle/src/middle/region.rs b/compiler/rustc_middle/src/middle/region.rs
index 94ca38c0e75..10712e14686 100644
--- a/compiler/rustc_middle/src/middle/region.rs
+++ b/compiler/rustc_middle/src/middle/region.rs
@@ -203,7 +203,7 @@ impl Scope {
 pub type ScopeDepth = u32;
 
 /// The region scope tree encodes information about region relationships.
-#[derive(TyEncodable, TyDecodable, Default, Debug)]
+#[derive(Default, Debug)]
 pub struct ScopeTree {
     /// If not empty, this body is the root of this region hierarchy.
     pub root_body: Option<hir::HirId>,
@@ -317,13 +317,13 @@ pub struct ScopeTree {
 /// candidates in general). In constants, the `lifetime` field is None
 /// to indicate that certain expressions escape into 'static and
 /// should have no local cleanup scope.
-#[derive(Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]
+#[derive(Debug, Copy, Clone, HashStable)]
 pub enum RvalueCandidateType {
     Borrow { target: hir::ItemLocalId, lifetime: Option<Scope> },
     Pattern { target: hir::ItemLocalId, lifetime: Option<Scope> },
 }
 
-#[derive(Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]
+#[derive(Debug, Copy, Clone, HashStable)]
 pub struct YieldData {
     /// The `Span` of the yield.
     pub span: Span,
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs
index 039194284b8..2490b17aac0 100644
--- a/compiler/rustc_middle/src/mir/mod.rs
+++ b/compiler/rustc_middle/src/mir/mod.rs
@@ -9,7 +9,7 @@ use crate::mir::visit::MirVisitable;
 use crate::ty::codec::{TyDecoder, TyEncoder};
 use crate::ty::fold::{FallibleTypeFolder, TypeFoldable};
 use crate::ty::print::{FmtPrinter, Printer};
-use crate::ty::visit::{TypeVisitable, TypeVisitableExt, TypeVisitor};
+use crate::ty::visit::TypeVisitableExt;
 use crate::ty::{self, List, Ty, TyCtxt};
 use crate::ty::{AdtDef, InstanceDef, ScalarInt, UserTypeAnnotationIndex};
 use crate::ty::{GenericArg, InternalSubsts, SubstsRef};
@@ -36,7 +36,7 @@ use either::Either;
 
 use std::borrow::Cow;
 use std::fmt::{self, Debug, Display, Formatter, Write};
-use std::ops::{ControlFlow, Index, IndexMut};
+use std::ops::{Index, IndexMut};
 use std::{iter, mem};
 
 pub use self::query::*;
@@ -2722,6 +2722,7 @@ impl<'tcx> UserTypeProjections {
 ///   `field[0]` (aka `.0`), indicating that the type of `s` is
 ///   determined by finding the type of the `.0` field from `T`.
 #[derive(Clone, Debug, TyEncodable, TyDecodable, Hash, HashStable, PartialEq)]
+#[derive(TypeFoldable, TypeVisitable)]
 pub struct UserTypeProjection {
     pub base: UserTypeAnnotationIndex,
     pub projs: Vec<ProjectionKind>,
@@ -2765,28 +2766,6 @@ impl UserTypeProjection {
     }
 }
 
-impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for UserTypeProjection {
-    fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>(
-        self,
-        folder: &mut F,
-    ) -> Result<Self, F::Error> {
-        Ok(UserTypeProjection {
-            base: self.base.try_fold_with(folder)?,
-            projs: self.projs.try_fold_with(folder)?,
-        })
-    }
-}
-
-impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for UserTypeProjection {
-    fn visit_with<Vs: TypeVisitor<TyCtxt<'tcx>>>(
-        &self,
-        visitor: &mut Vs,
-    ) -> ControlFlow<Vs::BreakTy> {
-        self.base.visit_with(visitor)
-        // Note: there's nothing in `self.proj` to visit.
-    }
-}
-
 rustc_index::newtype_index! {
     #[derive(HashStable)]
     #[debug_format = "promoted[{}]"]
diff --git a/compiler/rustc_middle/src/thir.rs b/compiler/rustc_middle/src/thir.rs
index da86cfd4772..813e109c41e 100644
--- a/compiler/rustc_middle/src/thir.rs
+++ b/compiler/rustc_middle/src/thir.rs
@@ -234,7 +234,6 @@ pub enum StmtKind<'tcx> {
 }
 
 #[derive(Clone, Debug, Copy, PartialEq, Eq, Hash, HashStable, TyEncodable, TyDecodable)]
-#[derive(TypeFoldable, TypeVisitable)]
 pub struct LocalVarId(pub hir::HirId);
 
 /// A THIR expression.
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs
index 6a8ae525069..d69d42bb5d3 100644
--- a/compiler/rustc_middle/src/traits/mod.rs
+++ b/compiler/rustc_middle/src/traits/mod.rs
@@ -199,7 +199,7 @@ impl<'tcx> ObligationCause<'tcx> {
     }
 }
 
-#[derive(Clone, Debug, PartialEq, Eq, Hash, Lift, HashStable, TyEncodable, TyDecodable)]
+#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
 #[derive(TypeVisitable, TypeFoldable)]
 pub struct UnifyReceiverContext<'tcx> {
     pub assoc_item: ty::AssocItem,
@@ -207,7 +207,7 @@ pub struct UnifyReceiverContext<'tcx> {
     pub substs: SubstsRef<'tcx>,
 }
 
-#[derive(Clone, PartialEq, Eq, Hash, Lift, Default, HashStable)]
+#[derive(Clone, PartialEq, Eq, Lift, Default, HashStable)]
 #[derive(TypeVisitable, TypeFoldable, TyEncodable, TyDecodable)]
 pub struct InternedObligationCauseCode<'tcx> {
     /// `None` for `ObligationCauseCode::MiscObligation` (a common case, occurs ~60% of
@@ -243,7 +243,7 @@ impl<'tcx> std::ops::Deref for InternedObligationCauseCode<'tcx> {
     }
 }
 
-#[derive(Clone, Debug, PartialEq, Eq, Hash, Lift, HashStable, TyEncodable, TyDecodable)]
+#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
 #[derive(TypeVisitable, TypeFoldable)]
 pub enum ObligationCauseCode<'tcx> {
     /// Not well classified or should be obvious from the span.
@@ -468,7 +468,7 @@ pub enum WellFormedLoc {
     },
 }
 
-#[derive(Clone, Debug, PartialEq, Eq, Hash, Lift, HashStable, TyEncodable, TyDecodable)]
+#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
 #[derive(TypeVisitable, TypeFoldable)]
 pub struct ImplDerivedObligationCause<'tcx> {
     pub derived: DerivedObligationCause<'tcx>,
@@ -529,7 +529,7 @@ impl<'tcx> ty::Lift<'tcx> for StatementAsExpression {
     }
 }
 
-#[derive(Clone, Debug, PartialEq, Eq, Hash, Lift, HashStable, TyEncodable, TyDecodable)]
+#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
 #[derive(TypeVisitable, TypeFoldable)]
 pub struct MatchExpressionArmCause<'tcx> {
     pub arm_block_id: Option<hir::HirId>,
@@ -545,7 +545,7 @@ pub struct MatchExpressionArmCause<'tcx> {
     pub opt_suggest_box_span: Option<Span>,
 }
 
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
 #[derive(Lift, TypeFoldable, TypeVisitable, HashStable, TyEncodable, TyDecodable)]
 pub struct IfExpressionCause<'tcx> {
     pub then_id: hir::HirId,
@@ -556,7 +556,7 @@ pub struct IfExpressionCause<'tcx> {
     pub opt_suggest_box_span: Option<Span>,
 }
 
-#[derive(Clone, Debug, PartialEq, Eq, Hash, Lift, HashStable, TyEncodable, TyDecodable)]
+#[derive(Clone, Debug, PartialEq, Eq, Lift, HashStable, TyEncodable, TyDecodable)]
 #[derive(TypeVisitable, TypeFoldable)]
 pub struct DerivedObligationCause<'tcx> {
     /// The trait predicate of the parent obligation that led to the
@@ -569,7 +569,7 @@ pub struct DerivedObligationCause<'tcx> {
     pub parent_code: InternedObligationCauseCode<'tcx>,
 }
 
-#[derive(Clone, Debug, TypeFoldable, TypeVisitable, Lift)]
+#[derive(Clone, Debug, TypeVisitable, Lift)]
 pub enum SelectionError<'tcx> {
     /// The trait is not implemented.
     Unimplemented,
diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs
index 1cc9fd526b4..f2dda003b99 100644
--- a/compiler/rustc_middle/src/traits/select.rs
+++ b/compiler/rustc_middle/src/traits/select.rs
@@ -103,7 +103,7 @@ pub type EvaluationCache<'tcx> = Cache<
 /// required for associated types to work in default impls, as the bounds
 /// are visible both as projection bounds and as where-clauses from the
 /// parameter environment.
-#[derive(PartialEq, Eq, Debug, Clone, TypeFoldable, TypeVisitable)]
+#[derive(PartialEq, Eq, Debug, Clone, TypeVisitable)]
 pub enum SelectionCandidate<'tcx> {
     /// A builtin implementation for some specific traits, used in cases
     /// where we cannot rely an ordinary library implementations.
diff --git a/compiler/rustc_middle/src/traits/solve.rs b/compiler/rustc_middle/src/traits/solve.rs
index fef2be133e8..6b7b910a59b 100644
--- a/compiler/rustc_middle/src/traits/solve.rs
+++ b/compiler/rustc_middle/src/traits/solve.rs
@@ -120,7 +120,7 @@ impl<'tcx> std::ops::Deref for ExternalConstraints<'tcx> {
 }
 
 /// Additional constraints returned on success.
-#[derive(Debug, PartialEq, Eq, Clone, Hash, Default, TypeFoldable, TypeVisitable)]
+#[derive(Debug, PartialEq, Eq, Clone, Hash, Default)]
 pub struct ExternalConstraintsData<'tcx> {
     // FIXME: implement this.
     pub region_constraints: QueryRegionConstraints<'tcx>,
diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs
index 30e488a9e47..6187fc43cf8 100644
--- a/compiler/rustc_middle/src/ty/adt.rs
+++ b/compiler/rustc_middle/src/ty/adt.rs
@@ -188,7 +188,7 @@ impl<'tcx> AdtDef<'tcx> {
     }
 }
 
-#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, HashStable, TyEncodable, TyDecodable)]
+#[derive(Copy, Clone, Debug, Eq, PartialEq, HashStable, TyEncodable, TyDecodable)]
 pub enum AdtKind {
     Struct,
     Union,
diff --git a/compiler/rustc_middle/src/ty/error.rs b/compiler/rustc_middle/src/ty/error.rs
index aff6c77e039..1be61e16dbe 100644
--- a/compiler/rustc_middle/src/ty/error.rs
+++ b/compiler/rustc_middle/src/ty/error.rs
@@ -28,7 +28,7 @@ impl<T> ExpectedFound<T> {
 }
 
 // Data structures used in type unification
-#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable, Lift, PartialEq, Eq)]
+#[derive(Copy, Clone, Debug, TypeVisitable, Lift, PartialEq, Eq)]
 #[rustc_pass_by_value]
 pub enum TypeError<'tcx> {
     Mismatch,
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index 1c1432ecd5a..2aced27f7bb 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -2690,7 +2690,7 @@ impl<'tcx> ty::PolyTraitPredicate<'tcx> {
     }
 }
 
-#[derive(Debug, Copy, Clone, TypeFoldable, TypeVisitable, Lift)]
+#[derive(Debug, Copy, Clone, Lift)]
 pub struct PrintClosureAsImpl<'tcx> {
     pub closure: ty::ClosureSubsts<'tcx>,
 }
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs
index b35b514d795..29a3bc8bb97 100644
--- a/compiler/rustc_middle/src/ty/structural_impls.rs
+++ b/compiler/rustc_middle/src/ty/structural_impls.rs
@@ -4,7 +4,6 @@
 //! to help with the tedium.
 
 use crate::mir::interpret;
-use crate::mir::ProjectionKind;
 use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeSuperFoldable};
 use crate::ty::print::{with_no_trimmed_paths, FmtPrinter, Printer};
 use crate::ty::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitor};
@@ -373,16 +372,6 @@ impl<'a, 'tcx> Lift<'tcx> for ty::ParamEnv<'a> {
 ///////////////////////////////////////////////////////////////////////////
 // Traversal implementations.
 
-/// AdtDefs are basically the same as a DefId.
-impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ty::AdtDef<'tcx> {
-    fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>(
-        self,
-        _folder: &mut F,
-    ) -> Result<Self, F::Error> {
-        Ok(self)
-    }
-}
-
 impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for ty::AdtDef<'tcx> {
     fn visit_with<V: TypeVisitor<TyCtxt<'tcx>>>(
         &self,
@@ -445,15 +434,6 @@ impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx ty::List<ty::Const<'tcx>> {
     }
 }
 
-impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for &'tcx ty::List<ProjectionKind> {
-    fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>(
-        self,
-        folder: &mut F,
-    ) -> Result<Self, F::Error> {
-        ty::util::fold_list(self, folder, |tcx, v| tcx.mk_projs(v))
-    }
-}
-
 impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for Ty<'tcx> {
     fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>(
         self,
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index 82dec7d98ad..7bda20ffe9a 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -631,7 +631,7 @@ impl<'tcx> UpvarSubsts<'tcx> {
 /// type of the constant. The reason that `R` is represented as an extra type parameter
 /// is the same reason that [`ClosureSubsts`] have `CS` and `U` as type parameters:
 /// inline const can reference lifetimes that are internal to the creating function.
-#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable)]
+#[derive(Copy, Clone, Debug)]
 pub struct InlineConstSubsts<'tcx> {
     /// Generic parameters from the enclosing item,
     /// concatenated with the inferred type of the constant.
diff --git a/compiler/rustc_mir_transform/src/check_packed_ref.rs b/compiler/rustc_mir_transform/src/check_packed_ref.rs
index f5f1c1010e1..b9bc89fcf8f 100644
--- a/compiler/rustc_mir_transform/src/check_packed_ref.rs
+++ b/compiler/rustc_mir_transform/src/check_packed_ref.rs
@@ -56,8 +56,11 @@ impl<'tcx> Visitor<'tcx> for PackedRefChecker<'_, 'tcx> {
                         "reference to packed field is unaligned"
                     )
                     .note(
-                        "fields of packed structs are not properly aligned, and creating \
-                        a misaligned reference is undefined behavior (even if that \
+                        "packed structs are only aligned by one byte, and many modern architectures \
+                        penalize unaligned field accesses"
+                    )
+                    .note(
+                        "creating a misaligned reference is undefined behavior (even if that \
                         reference is never dereferenced)",
                     ).help(
                         "copy the field contents to a local variable, or replace the \
diff --git a/compiler/rustc_mir_transform/src/elaborate_drops.rs b/compiler/rustc_mir_transform/src/elaborate_drops.rs
index 1e115be2c2a..443f469ce52 100644
--- a/compiler/rustc_mir_transform/src/elaborate_drops.rs
+++ b/compiler/rustc_mir_transform/src/elaborate_drops.rs
@@ -1,7 +1,7 @@
 use crate::deref_separator::deref_finder;
 use crate::MirPass;
-use rustc_data_structures::fx::FxHashMap;
 use rustc_index::bit_set::BitSet;
+use rustc_index::IndexVec;
 use rustc_middle::mir::patch::MirPatch;
 use rustc_middle::mir::*;
 use rustc_middle::ty::{self, TyCtxt};
@@ -84,12 +84,13 @@ impl<'tcx> MirPass<'tcx> for ElaborateDrops {
 
             let reachable = traversal::reachable_as_bitset(body);
 
+            let drop_flags = IndexVec::from_elem(None, &env.move_data.move_paths);
             ElaborateDropsCtxt {
                 tcx,
                 body,
                 env: &env,
                 init_data: InitializationData { inits, uninits },
-                drop_flags: Default::default(),
+                drop_flags,
                 patch: MirPatch::new(body),
                 un_derefer: un_derefer,
                 reachable,
@@ -293,7 +294,7 @@ struct ElaborateDropsCtxt<'a, 'tcx> {
     body: &'a Body<'tcx>,
     env: &'a MoveDataParamEnv<'tcx>,
     init_data: InitializationData<'a, 'tcx>,
-    drop_flags: FxHashMap<MovePathIndex, Local>,
+    drop_flags: IndexVec<MovePathIndex, Option<Local>>,
     patch: MirPatch<'tcx>,
     un_derefer: UnDerefer<'tcx>,
     reachable: BitSet<BasicBlock>,
@@ -312,11 +313,11 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
         let tcx = self.tcx;
         let patch = &mut self.patch;
         debug!("create_drop_flag({:?})", self.body.span);
-        self.drop_flags.entry(index).or_insert_with(|| patch.new_internal(tcx.types.bool, span));
+        self.drop_flags[index].get_or_insert_with(|| patch.new_internal(tcx.types.bool, span));
     }
 
     fn drop_flag(&mut self, index: MovePathIndex) -> Option<Place<'tcx>> {
-        self.drop_flags.get(&index).map(|t| Place::from(*t))
+        self.drop_flags[index].map(Place::from)
     }
 
     /// create a patch that elaborates all drops in the input
@@ -463,7 +464,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
     }
 
     fn set_drop_flag(&mut self, loc: Location, path: MovePathIndex, val: DropFlagState) {
-        if let Some(&flag) = self.drop_flags.get(&path) {
+        if let Some(flag) = self.drop_flags[path] {
             let span = self.patch.source_info_for_location(self.body, loc).span;
             let val = self.constant_bool(span, val.value());
             self.patch.add_assign(loc, Place::from(flag), val);
@@ -474,7 +475,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
         let loc = Location::START;
         let span = self.patch.source_info_for_location(self.body, loc).span;
         let false_ = self.constant_bool(span, false);
-        for flag in self.drop_flags.values() {
+        for flag in self.drop_flags.iter().flatten() {
             self.patch.add_assign(loc, Place::from(*flag), false_.clone());
         }
     }
diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl
index d45fa90a11b..9c4fac84fc2 100644
--- a/compiler/rustc_parse/messages.ftl
+++ b/compiler/rustc_parse/messages.ftl
@@ -772,3 +772,75 @@ parse_const_bounds_missing_tilde = const bounds must start with `~`
     .suggestion = add `~`
 
 parse_underscore_literal_suffix = underscore literal suffix is not allowed
+
+parse_expect_label_found_ident = expected a label, found an identifier
+    .suggestion = labels start with a tick
+
+parse_inappropriate_default = {$article} {$descr} cannot be `default`
+    .label = `default` because of this
+    .note = only associated `fn`, `const`, and `type` items can be `default`
+
+parse_recover_import_as_use = expected item, found {$token_name}
+    .suggestion = items are imported using the `use` keyword
+
+parse_single_colon_import_path = expected `::`, found `:`
+    .suggestion = use double colon
+    .note = import paths are delimited using `::`
+
+parse_bad_item_kind = {$descr} is not supported in {$ctx}
+    .help = consider moving the {$descr} out to a nearby module scope
+
+parse_single_colon_struct_type = found single colon in a struct field type path
+    .suggestion = write a path separator here
+
+parse_equals_struct_default = default values on `struct` fields aren't supported
+    .suggestion = remove this unsupported default value
+
+parse_macro_rules_missing_bang = expected `!` after `macro_rules`
+    .suggestion = add a `!`
+
+parse_macro_name_remove_bang = macro names aren't followed by a `!`
+    .suggestion = remove the `!`
+
+parse_macro_rules_visibility = can't qualify macro_rules invocation with `{$vis}`
+    .suggestion = try exporting the macro
+
+parse_macro_invocation_visibility = can't qualify macro invocation with `pub`
+    .suggestion = remove the visibility
+    .help = try adjusting the macro to put `{$vis}` inside the invocation
+
+parse_nested_adt = `{$kw_str}` definition cannot be nested inside `{$keyword}`
+    .suggestion = consider creating a new `{$kw_str}` definition instead of nesting
+
+parse_function_body_equals_expr = function body cannot be `= expression;`
+    .suggestion = surround the expression with `{"{"}` and `{"}"}` instead of `=` and `;`
+
+parse_box_not_pat = expected pattern, found {$descr}
+    .note = `box` is a reserved keyword
+    .suggestion = escape `box` to use it as an identifier
+
+parse_unmatched_angle = unmatched angle {$plural ->
+    [true] brackets
+    *[false] bracket
+    }
+    .suggestion = remove extra angle {$plural ->
+    [true] brackets
+    *[false] bracket
+    }
+
+parse_missing_plus_in_bounds = expected `+` between lifetime and {$sym}
+    .suggestion = add `+`
+
+parse_incorrect_braces_trait_bounds = incorrect braces around trait bounds
+    .suggestion = remove the parentheses
+
+parse_kw_bad_case = keyword `{$kw}` is written in the wrong case
+    .suggestion = write it in the correct case
+
+parse_meta_bad_delim = wrong meta list delimiters
+parse_cfg_attr_bad_delim = wrong `cfg_attr` delimiters
+parse_meta_bad_delim_suggestion = the delimiters should be `(` and `)`
+
+parse_malformed_cfg_attr = malformed `cfg_attr` attribute input
+    .suggestion = missing condition and attribute
+    .note = for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index b0e1189851a..f286707a9c0 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -2421,3 +2421,227 @@ pub(crate) struct UnderscoreLiteralSuffix {
     #[primary_span]
     pub span: Span,
 }
+
+#[derive(Diagnostic)]
+#[diag(parse_expect_label_found_ident)]
+pub(crate) struct ExpectedLabelFoundIdent {
+    #[primary_span]
+    pub span: Span,
+    #[suggestion(code = "'", applicability = "machine-applicable", style = "short")]
+    pub start: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_inappropriate_default)]
+#[note]
+pub(crate) struct InappropriateDefault {
+    #[primary_span]
+    #[label]
+    pub span: Span,
+    pub article: &'static str,
+    pub descr: &'static str,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_recover_import_as_use)]
+pub(crate) struct RecoverImportAsUse {
+    #[primary_span]
+    #[suggestion(code = "use", applicability = "machine-applicable", style = "short")]
+    pub span: Span,
+    pub token_name: String,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_single_colon_import_path)]
+#[note]
+pub(crate) struct SingleColonImportPath {
+    #[primary_span]
+    #[suggestion(code = "::", applicability = "machine-applicable", style = "short")]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_bad_item_kind)]
+#[help]
+pub(crate) struct BadItemKind {
+    #[primary_span]
+    pub span: Span,
+    pub descr: &'static str,
+    pub ctx: &'static str,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_single_colon_struct_type)]
+pub(crate) struct SingleColonStructType {
+    #[primary_span]
+    #[suggestion(code = "::", applicability = "maybe-incorrect", style = "verbose")]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_equals_struct_default)]
+pub(crate) struct EqualsStructDefault {
+    #[primary_span]
+    #[suggestion(code = "", applicability = "machine-applicable")]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_macro_rules_missing_bang)]
+pub(crate) struct MacroRulesMissingBang {
+    #[primary_span]
+    pub span: Span,
+    #[suggestion(code = "!", applicability = "machine-applicable", style = "verbose")]
+    pub hi: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_macro_name_remove_bang)]
+pub(crate) struct MacroNameRemoveBang {
+    #[primary_span]
+    #[suggestion(code = "", applicability = "machine-applicable")]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_macro_rules_visibility)]
+pub(crate) struct MacroRulesVisibility<'a> {
+    #[primary_span]
+    #[suggestion(code = "#[macro_export]", applicability = "maybe-incorrect")]
+    pub span: Span,
+    pub vis: &'a str,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_macro_invocation_visibility)]
+#[help]
+pub(crate) struct MacroInvocationVisibility<'a> {
+    #[primary_span]
+    #[suggestion(code = "", applicability = "machine-applicable")]
+    pub span: Span,
+    pub vis: &'a str,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_nested_adt)]
+pub(crate) struct NestedAdt<'a> {
+    #[primary_span]
+    pub span: Span,
+    #[suggestion(code = "", applicability = "maybe-incorrect")]
+    pub item: Span,
+    pub keyword: &'a str,
+    pub kw_str: Cow<'a, str>,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_function_body_equals_expr)]
+pub(crate) struct FunctionBodyEqualsExpr {
+    #[primary_span]
+    pub span: Span,
+    #[subdiagnostic]
+    pub sugg: FunctionBodyEqualsExprSugg,
+}
+
+#[derive(Subdiagnostic)]
+#[multipart_suggestion(parse_suggestion, applicability = "machine-applicable")]
+pub(crate) struct FunctionBodyEqualsExprSugg {
+    #[suggestion_part(code = "{{")]
+    pub eq: Span,
+    #[suggestion_part(code = " }}")]
+    pub semi: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_box_not_pat)]
+pub(crate) struct BoxNotPat {
+    #[primary_span]
+    pub span: Span,
+    #[note]
+    pub kw: Span,
+    #[suggestion(code = "r#", applicability = "maybe-incorrect", style = "verbose")]
+    pub lo: Span,
+    pub descr: String,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_unmatched_angle)]
+pub(crate) struct UnmatchedAngle {
+    #[primary_span]
+    #[suggestion(code = "", applicability = "machine-applicable")]
+    pub span: Span,
+    pub plural: bool,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_missing_plus_in_bounds)]
+pub(crate) struct MissingPlusBounds {
+    #[primary_span]
+    pub span: Span,
+    #[suggestion(code = " +", applicability = "maybe-incorrect", style = "verbose")]
+    pub hi: Span,
+    pub sym: Symbol,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_incorrect_braces_trait_bounds)]
+pub(crate) struct IncorrectBracesTraitBounds {
+    #[primary_span]
+    pub span: Vec<Span>,
+    #[subdiagnostic]
+    pub sugg: IncorrectBracesTraitBoundsSugg,
+}
+
+#[derive(Subdiagnostic)]
+#[multipart_suggestion(parse_suggestion, applicability = "machine-applicable")]
+pub(crate) struct IncorrectBracesTraitBoundsSugg {
+    #[suggestion_part(code = " ")]
+    pub l: Span,
+    #[suggestion_part(code = "")]
+    pub r: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_kw_bad_case)]
+pub(crate) struct KwBadCase<'a> {
+    #[primary_span]
+    #[suggestion(code = "{kw}", applicability = "machine-applicable")]
+    pub span: Span,
+    pub kw: &'a str,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_meta_bad_delim)]
+pub(crate) struct MetaBadDelim {
+    #[primary_span]
+    pub span: Span,
+    #[subdiagnostic]
+    pub sugg: MetaBadDelimSugg,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_cfg_attr_bad_delim)]
+pub(crate) struct CfgAttrBadDelim {
+    #[primary_span]
+    pub span: Span,
+    #[subdiagnostic]
+    pub sugg: MetaBadDelimSugg,
+}
+
+#[derive(Subdiagnostic)]
+#[multipart_suggestion(parse_meta_bad_delim_suggestion, applicability = "machine-applicable")]
+pub(crate) struct MetaBadDelimSugg {
+    #[suggestion_part(code = "(")]
+    pub open: Span,
+    #[suggestion_part(code = ")")]
+    pub close: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_malformed_cfg_attr)]
+#[note]
+pub(crate) struct MalformedCfgAttr {
+    #[primary_span]
+    #[suggestion(code = "{sugg}")]
+    pub span: Span,
+    pub sugg: &'static str,
+}
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs
index 507f6e4182e..61a1cdeb540 100644
--- a/compiler/rustc_parse/src/lib.rs
+++ b/compiler/rustc_parse/src/lib.rs
@@ -18,7 +18,7 @@ use rustc_ast::tokenstream::TokenStream;
 use rustc_ast::{AttrItem, Attribute, MetaItem};
 use rustc_ast_pretty::pprust;
 use rustc_data_structures::sync::Lrc;
-use rustc_errors::{Applicability, Diagnostic, FatalError, Level, PResult};
+use rustc_errors::{Diagnostic, FatalError, Level, PResult};
 use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
 use rustc_fluent_macro::fluent_messages;
 use rustc_session::parse::ParseSess;
@@ -243,8 +243,7 @@ pub fn parse_cfg_attr(
         ast::AttrArgs::Delimited(ast::DelimArgs { dspan, delim, ref tokens })
             if !tokens.is_empty() =>
         {
-            let msg = "wrong `cfg_attr` delimiters";
-            crate::validate_attr::check_meta_bad_delim(parse_sess, dspan, delim, msg);
+            crate::validate_attr::check_cfg_attr_bad_delim(parse_sess, dspan, delim);
             match parse_in(parse_sess, tokens.clone(), "`cfg_attr` input", |p| p.parse_cfg_attr()) {
                 Ok(r) => return Some(r),
                 Err(mut e) => {
@@ -265,15 +264,5 @@ const CFG_ATTR_NOTE_REF: &str = "for more information, visit \
     #the-cfg_attr-attribute>";
 
 fn error_malformed_cfg_attr_missing(span: Span, parse_sess: &ParseSess) {
-    parse_sess
-        .span_diagnostic
-        .struct_span_err(span, "malformed `cfg_attr` attribute input")
-        .span_suggestion(
-            span,
-            "missing condition and attribute",
-            CFG_ATTR_GRAMMAR_HELP,
-            Applicability::HasPlaceholders,
-        )
-        .note(CFG_ATTR_NOTE_REF)
-        .emit();
+    parse_sess.emit_err(errors::MalformedCfgAttr { span, sugg: CFG_ATTR_GRAMMAR_HELP });
 }
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index 03c82fbd329..27de9bd7268 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -3151,14 +3151,10 @@ impl<'a> Parser<'a> {
         let label = format!("'{}", ident.name);
         let ident = Ident { name: Symbol::intern(&label), span: ident.span };
 
-        self.struct_span_err(ident.span, "expected a label, found an identifier")
-            .span_suggestion(
-                ident.span,
-                "labels start with a tick",
-                label,
-                Applicability::MachineApplicable,
-            )
-            .emit();
+        self.sess.emit_err(errors::ExpectedLabelFoundIdent {
+            span: ident.span,
+            start: ident.span.shrink_to_lo(),
+        });
 
         Label { ident }
     }
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs
index f5fef6ad019..9e003bfc097 100644
--- a/compiler/rustc_parse/src/parser/item.rs
+++ b/compiler/rustc_parse/src/parser/item.rs
@@ -181,11 +181,11 @@ impl<'a> Parser<'a> {
     /// Error in-case `default` was parsed in an in-appropriate context.
     fn error_on_unconsumed_default(&self, def: Defaultness, kind: &ItemKind) {
         if let Defaultness::Default(span) = def {
-            let msg = format!("{} {} cannot be `default`", kind.article(), kind.descr());
-            self.struct_span_err(span, &msg)
-                .span_label(span, "`default` because of this")
-                .note("only associated `fn`, `const`, and `type` items can be `default`")
-                .emit();
+            self.sess.emit_err(errors::InappropriateDefault {
+                span,
+                article: kind.article(),
+                descr: kind.descr(),
+            });
         }
     }
 
@@ -310,14 +310,7 @@ impl<'a> Parser<'a> {
         self.bump();
         match self.parse_use_item() {
             Ok(u) => {
-                self.struct_span_err(span, format!("expected item, found {token_name}"))
-                    .span_suggestion_short(
-                        span,
-                        "items are imported using the `use` keyword",
-                        "use",
-                        Applicability::MachineApplicable,
-                    )
-                    .emit();
+                self.sess.emit_err(errors::RecoverImportAsUse { span, token_name });
                 Ok(Some(u))
             }
             Err(e) => {
@@ -963,15 +956,8 @@ impl<'a> Parser<'a> {
             } else {
                 // Recover from using a colon as path separator.
                 while self.eat_noexpect(&token::Colon) {
-                    self.struct_span_err(self.prev_token.span, "expected `::`, found `:`")
-                        .span_suggestion_short(
-                            self.prev_token.span,
-                            "use double colon",
-                            "::",
-                            Applicability::MachineApplicable,
-                        )
-                        .note_once("import paths are delimited using `::`")
-                        .emit();
+                    self.sess
+                        .emit_err(errors::SingleColonImportPath { span: self.prev_token.span });
 
                     // We parse the rest of the path and append it to the original prefix.
                     self.parse_path_segments(&mut prefix.segments, PathStyle::Mod, None)?;
@@ -1134,13 +1120,11 @@ impl<'a> Parser<'a> {
         ))
     }
 
-    fn error_bad_item_kind<T>(&self, span: Span, kind: &ItemKind, ctx: &str) -> Option<T> {
+    fn error_bad_item_kind<T>(&self, span: Span, kind: &ItemKind, ctx: &'static str) -> Option<T> {
         // FIXME(#100717): needs variant for each `ItemKind` (instead of using `ItemKind::descr()`)
         let span = self.sess.source_map().guess_head_span(span);
         let descr = kind.descr();
-        self.struct_span_err(span, &format!("{descr} is not supported in {ctx}"))
-            .help(&format!("consider moving the {descr} out to a nearby module scope"))
-            .emit();
+        self.sess.emit_err(errors::BadItemKind { span, descr, ctx });
         None
     }
 
@@ -1713,27 +1697,13 @@ impl<'a> Parser<'a> {
         self.expect_field_ty_separator()?;
         let ty = self.parse_ty()?;
         if self.token.kind == token::Colon && self.look_ahead(1, |tok| tok.kind != token::Colon) {
-            self.struct_span_err(self.token.span, "found single colon in a struct field type path")
-                .span_suggestion_verbose(
-                    self.token.span,
-                    "write a path separator here",
-                    "::",
-                    Applicability::MaybeIncorrect,
-                )
-                .emit();
+            self.sess.emit_err(errors::SingleColonStructType { span: self.token.span });
         }
         if self.token.kind == token::Eq {
             self.bump();
             let const_expr = self.parse_expr_anon_const()?;
             let sp = ty.span.shrink_to_hi().to(const_expr.value.span);
-            self.struct_span_err(sp, "default values on `struct` fields aren't supported")
-                .span_suggestion(
-                    sp,
-                    "remove this unsupported default value",
-                    "",
-                    Applicability::MachineApplicable,
-                )
-                .emit();
+            self.sess.emit_err(errors::EqualsStructDefault { span: sp });
         }
         Ok(FieldDef {
             span: lo.to(self.prev_token.span),
@@ -1871,14 +1841,10 @@ impl<'a> Parser<'a> {
                 return IsMacroRulesItem::Yes { has_bang: true };
             } else if self.look_ahead(1, |t| (t.is_ident())) {
                 // macro_rules foo
-                self.struct_span_err(macro_rules_span, "expected `!` after `macro_rules`")
-                    .span_suggestion(
-                        macro_rules_span,
-                        "add a `!`",
-                        "macro_rules!",
-                        Applicability::MachineApplicable,
-                    )
-                    .emit();
+                self.sess.emit_err(errors::MacroRulesMissingBang {
+                    span: macro_rules_span,
+                    hi: macro_rules_span.shrink_to_hi(),
+                });
 
                 return IsMacroRulesItem::Yes { has_bang: false };
             }
@@ -1903,9 +1869,7 @@ impl<'a> Parser<'a> {
         if self.eat(&token::Not) {
             // Handle macro_rules! foo!
             let span = self.prev_token.span;
-            self.struct_span_err(span, "macro names aren't followed by a `!`")
-                .span_suggestion(span, "remove the `!`", "", Applicability::MachineApplicable)
-                .emit();
+            self.sess.emit_err(errors::MacroNameRemoveBang { span });
         }
 
         let body = self.parse_delim_args()?;
@@ -1925,25 +1889,9 @@ impl<'a> Parser<'a> {
         let vstr = pprust::vis_to_string(vis);
         let vstr = vstr.trim_end();
         if macro_rules {
-            let msg = format!("can't qualify macro_rules invocation with `{vstr}`");
-            self.struct_span_err(vis.span, &msg)
-                .span_suggestion(
-                    vis.span,
-                    "try exporting the macro",
-                    "#[macro_export]",
-                    Applicability::MaybeIncorrect, // speculative
-                )
-                .emit();
+            self.sess.emit_err(errors::MacroRulesVisibility { span: vis.span, vis: vstr });
         } else {
-            self.struct_span_err(vis.span, "can't qualify macro invocation with `pub`")
-                .span_suggestion(
-                    vis.span,
-                    "remove the visibility",
-                    "",
-                    Applicability::MachineApplicable,
-                )
-                .help(&format!("try adjusting the macro to put `{vstr}` inside the invocation"))
-                .emit();
+            self.sess.emit_err(errors::MacroInvocationVisibility { span: vis.span, vis: vstr });
         }
     }
 
@@ -1989,18 +1937,12 @@ impl<'a> Parser<'a> {
             let kw_token = self.token.clone();
             let kw_str = pprust::token_to_string(&kw_token);
             let item = self.parse_item(ForceCollect::No)?;
-
-            self.struct_span_err(
-                kw_token.span,
-                &format!("`{kw_str}` definition cannot be nested inside `{keyword}`"),
-            )
-            .span_suggestion(
-                item.unwrap().span,
-                &format!("consider creating a new `{kw_str}` definition instead of nesting"),
-                "",
-                Applicability::MaybeIncorrect,
-            )
-            .emit();
+            self.sess.emit_err(errors::NestedAdt {
+                span: kw_token.span,
+                item: item.unwrap().span,
+                kw_str,
+                keyword: keyword.as_str(),
+            });
             // We successfully parsed the item but we must inform the caller about nested problem.
             return Ok(false);
         }
@@ -2139,13 +2081,10 @@ impl<'a> Parser<'a> {
             let _ = self.parse_expr()?;
             self.expect_semi()?; // `;`
             let span = eq_sp.to(self.prev_token.span);
-            self.struct_span_err(span, "function body cannot be `= expression;`")
-                .multipart_suggestion(
-                    "surround the expression with `{` and `}` instead of `=` and `;`",
-                    vec![(eq_sp, "{".to_string()), (self.prev_token.span, " }".to_string())],
-                    Applicability::MachineApplicable,
-                )
-                .emit();
+            self.sess.emit_err(errors::FunctionBodyEqualsExpr {
+                span,
+                sugg: errors::FunctionBodyEqualsExprSugg { eq: eq_sp, semi: self.prev_token.span },
+            });
             (AttrVec::new(), Some(self.mk_block_err(span)))
         } else {
             let expected = if req_body {
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index aa57b804779..1c34e491f21 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -43,7 +43,7 @@ use thin_vec::ThinVec;
 use tracing::debug;
 
 use crate::errors::{
-    IncorrectVisibilityRestriction, MismatchedClosingDelimiter, NonStringAbiLiteral,
+    self, IncorrectVisibilityRestriction, MismatchedClosingDelimiter, NonStringAbiLiteral,
 };
 
 bitflags::bitflags! {
@@ -663,15 +663,10 @@ impl<'a> Parser<'a> {
         if case == Case::Insensitive
         && let Some((ident, /* is_raw */ false)) = self.token.ident()
         && ident.as_str().to_lowercase() == kw.as_str().to_lowercase() {
-            self
-                .struct_span_err(ident.span, format!("keyword `{kw}` is written in a wrong case"))
-                .span_suggestion(
-                    ident.span,
-                    "write it in the correct case",
-                    kw,
-                    Applicability::MachineApplicable
-                ).emit();
-
+            self.sess.emit_err(errors::KwBadCase {
+                span: ident.span,
+                kw: kw.as_str()
+            });
             self.bump();
             return true;
         }
diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs
index 2246002f5d3..f2422fe307c 100644
--- a/compiler/rustc_parse/src/parser/pat.rs
+++ b/compiler/rustc_parse/src/parser/pat.rs
@@ -1,6 +1,6 @@
 use super::{ForceCollect, Parser, PathStyle, TrailingToken};
 use crate::errors::{
-    AmbiguousRangePattern, DotDotDotForRemainingFields, DotDotDotRangeToPatternNotAllowed,
+    self, AmbiguousRangePattern, DotDotDotForRemainingFields, DotDotDotRangeToPatternNotAllowed,
     DotDotDotRestPattern, EnumPatternInsteadOfIdentifier, ExpectedBindingLeftOfAt,
     ExpectedCommaAfterPatternField, InclusiveRangeExtraEquals, InclusiveRangeMatchArrow,
     InclusiveRangeNoEnd, InvalidMutInPattern, PatternOnWrongSideOfAt, RefMutOrderIncorrect,
@@ -908,18 +908,13 @@ impl<'a> Parser<'a> {
         let box_span = self.prev_token.span;
 
         if self.isnt_pattern_start() {
-            self.struct_span_err(
-                self.token.span,
-                format!("expected pattern, found {}", super::token_descr(&self.token)),
-            )
-            .span_note(box_span, "`box` is a reserved keyword")
-            .span_suggestion_verbose(
-                box_span.shrink_to_lo(),
-                "escape `box` to use it as an identifier",
-                "r#",
-                Applicability::MaybeIncorrect,
-            )
-            .emit();
+            let descr = super::token_descr(&self.token);
+            self.sess.emit_err(errors::BoxNotPat {
+                span: self.token.span,
+                kw: box_span,
+                lo: box_span.shrink_to_lo(),
+                descr,
+            });
 
             // We cannot use `parse_pat_ident()` since it will complain `box`
             // is not an identifier.
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs
index 6cceb47ff83..ae73760bd8c 100644
--- a/compiler/rustc_parse/src/parser/path.rs
+++ b/compiler/rustc_parse/src/parser/path.rs
@@ -8,7 +8,7 @@ use rustc_ast::{
     AssocConstraintKind, BlockCheckMode, GenericArg, GenericArgs, Generics, ParenthesizedArgs,
     Path, PathSegment, QSelf,
 };
-use rustc_errors::{pluralize, Applicability, PResult};
+use rustc_errors::{Applicability, PResult};
 use rustc_span::source_map::{BytePos, Span};
 use rustc_span::symbol::{kw, sym, Ident};
 use std::mem;
@@ -464,23 +464,10 @@ impl<'a> Parser<'a> {
                     // i.e. no multibyte characters, in this range.
                     let span =
                         lo.with_hi(lo.lo() + BytePos(snapshot.unmatched_angle_bracket_count));
-                    self.struct_span_err(
+                    self.sess.emit_err(errors::UnmatchedAngle {
                         span,
-                        &format!(
-                            "unmatched angle bracket{}",
-                            pluralize!(snapshot.unmatched_angle_bracket_count)
-                        ),
-                    )
-                    .span_suggestion(
-                        span,
-                        &format!(
-                            "remove extra angle bracket{}",
-                            pluralize!(snapshot.unmatched_angle_bracket_count)
-                        ),
-                        "",
-                        Applicability::MachineApplicable,
-                    )
-                    .emit();
+                        plural: snapshot.unmatched_angle_bracket_count > 1,
+                    });
 
                     // Try again without unmatched angle bracket characters.
                     self.parse_angle_args(ty_generics)
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs
index f5f6788362b..3ceb3a2bef1 100644
--- a/compiler/rustc_parse/src/parser/ty.rs
+++ b/compiler/rustc_parse/src/parser/ty.rs
@@ -588,20 +588,14 @@ impl<'a> Parser<'a> {
         // Always parse bounds greedily for better error recovery.
         if self.token.is_lifetime() {
             self.look_ahead(1, |t| {
-                if let token::Ident(symname, _) = t.kind {
+                if let token::Ident(sym, _) = t.kind {
                     // parse pattern with "'a Sized" we're supposed to give suggestion like
                     // "'a + Sized"
-                    self.struct_span_err(
-                        self.token.span,
-                        &format!("expected `+` between lifetime and {}", symname),
-                    )
-                    .span_suggestion_verbose(
-                        self.token.span.shrink_to_hi(),
-                        "add `+`",
-                        " +",
-                        Applicability::MaybeIncorrect,
-                    )
-                    .emit();
+                    self.sess.emit_err(errors::MissingPlusBounds {
+                        span: self.token.span,
+                        hi: self.token.span.shrink_to_hi(),
+                        sym,
+                    });
                 }
             })
         }
@@ -926,14 +920,10 @@ impl<'a> Parser<'a> {
                 self.parse_remaining_bounds(bounds, true)?;
                 self.expect(&token::CloseDelim(Delimiter::Parenthesis))?;
                 let sp = vec![lo, self.prev_token.span];
-                let sugg = vec![(lo, String::from(" ")), (self.prev_token.span, String::new())];
-                self.struct_span_err(sp, "incorrect braces around trait bounds")
-                    .multipart_suggestion(
-                        "remove the parentheses",
-                        sugg,
-                        Applicability::MachineApplicable,
-                    )
-                    .emit();
+                self.sess.emit_err(errors::IncorrectBracesTraitBounds {
+                    span: sp,
+                    sugg: errors::IncorrectBracesTraitBoundsSugg { l: lo, r: self.prev_token.span },
+                });
             } else {
                 self.expect(&token::CloseDelim(Delimiter::Parenthesis))?;
             }
diff --git a/compiler/rustc_parse/src/validate_attr.rs b/compiler/rustc_parse/src/validate_attr.rs
index 2f397e303e5..815b7c85679 100644
--- a/compiler/rustc_parse/src/validate_attr.rs
+++ b/compiler/rustc_parse/src/validate_attr.rs
@@ -1,6 +1,6 @@
 //! Meta-syntax validation logic of attributes for post-expansion.
 
-use crate::parse_in;
+use crate::{errors, parse_in};
 
 use rustc_ast::tokenstream::DelimSpan;
 use rustc_ast::MetaItemKind;
@@ -45,7 +45,7 @@ pub fn parse_meta<'a>(sess: &'a ParseSess, attr: &Attribute) -> PResult<'a, Meta
         kind: match &item.args {
             AttrArgs::Empty => MetaItemKind::Word,
             AttrArgs::Delimited(DelimArgs { dspan, delim, tokens }) => {
-                check_meta_bad_delim(sess, *dspan, *delim, "wrong meta list delimiters");
+                check_meta_bad_delim(sess, *dspan, *delim);
                 let nmis = parse_in(sess, tokens.clone(), "meta list", |p| p.parse_meta_seq_top())?;
                 MetaItemKind::List(nmis)
             }
@@ -84,19 +84,24 @@ pub fn parse_meta<'a>(sess: &'a ParseSess, attr: &Attribute) -> PResult<'a, Meta
     })
 }
 
-pub fn check_meta_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter, msg: &str) {
+pub fn check_meta_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter) {
     if let ast::MacDelimiter::Parenthesis = delim {
         return;
     }
+    sess.emit_err(errors::MetaBadDelim {
+        span: span.entire(),
+        sugg: errors::MetaBadDelimSugg { open: span.open, close: span.close },
+    });
+}
 
-    sess.span_diagnostic
-        .struct_span_err(span.entire(), msg)
-        .multipart_suggestion(
-            "the delimiters should be `(` and `)`",
-            vec![(span.open, "(".to_string()), (span.close, ")".to_string())],
-            Applicability::MachineApplicable,
-        )
-        .emit();
+pub fn check_cfg_attr_bad_delim(sess: &ParseSess, span: DelimSpan, delim: MacDelimiter) {
+    if let ast::MacDelimiter::Parenthesis = delim {
+        return;
+    }
+    sess.emit_err(errors::CfgAttrBadDelim {
+        span: span.entire(),
+        sugg: errors::MetaBadDelimSugg { open: span.open, close: span.close },
+    });
 }
 
 /// Checks that the given meta-item is compatible with this `AttributeTemplate`.
diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl
index 055682a1509..40680150601 100644
--- a/compiler/rustc_passes/messages.ftl
+++ b/compiler/rustc_passes/messages.ftl
@@ -139,7 +139,6 @@ passes_doc_attr_not_crate_level =
 passes_attr_crate_level =
     this attribute can only be applied at the crate level
     .suggestion = to apply to the crate, use an inner attribute
-    .help = to apply to the crate, use an inner attribute
     .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
 
 passes_doc_test_unknown =
@@ -724,3 +723,45 @@ passes_skipping_const_checks = skipping const checks
 passes_invalid_macro_export_arguments = `{$name}` isn't a valid `#[macro_export]` argument
 
 passes_invalid_macro_export_arguments_too_many_items = `#[macro_export]` can only take 1 or 0 arguments
+
+passes_unreachable_due_to_uninhabited = unreachable {$descr}
+    .label = unreachable {$descr}
+    .label_orig = any code following this expression is unreachable
+    .note = this expression has type `{$ty}`, which is uninhabited
+
+passes_unused_var_maybe_capture_ref = unused variable: `{$name}`
+    .help = did you mean to capture by reference instead?
+
+passes_unused_capture_maybe_capture_ref = value captured by `{$name}` is never read
+    .help = did you mean to capture by reference instead?
+
+passes_unused_var_remove_field = unused variable: `{$name}`
+passes_unused_var_remove_field_suggestion = try removing the field
+
+passes_unused_var_assigned_only = variable `{$name}` is assigned to, but never used
+    .note = consider using `_{$name}` instead
+
+passes_unnecessary_stable_feature = the feature `{$feature}` has been stable since {$since} and no longer requires an attribute to enable
+
+passes_unnecessary_partial_stable_feature = the feature `{$feature}` has been partially stabilized since {$since} and is succeeded by the feature `{$implies}`
+    .suggestion = if you are using features which are still unstable, change to using `{$implies}`
+    .suggestion_remove = if you are using features which are now stable, remove this line
+
+passes_ineffective_unstable_impl = an `#[unstable]` annotation here has no effect
+    .note = see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
+
+passes_unused_assign = value assigned to `{$name}` is never read
+    .help = maybe it is overwritten before being read?
+
+passes_unused_assign_passed = value passed to `{$name}` is never read
+    .help = maybe it is overwritten before being read?
+
+passes_maybe_string_interpolation = you might have meant to use string interpolation in this string literal
+passes_string_interpolation_only_works = string interpolation only works in `format!` invocations
+
+passes_unused_variable_try_prefix = unused variable: `{$name}`
+    .label = unused variable
+    .suggestion = if this is intentional, prefix it with an underscore
+
+passes_unused_variable_try_ignore = unused variable: `{$name}`
+    .suggestion = try ignoring the field
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 085a28626ea..3f28ac26f86 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -29,7 +29,7 @@ use rustc_session::lint::builtin::{
 };
 use rustc_session::parse::feature_err;
 use rustc_span::symbol::{kw, sym, Symbol};
-use rustc_span::{Span, DUMMY_SP};
+use rustc_span::{BytePos, Span, DUMMY_SP};
 use rustc_target::spec::abi::Abi;
 use rustc_trait_selection::infer::{TyCtxtInferExt, ValuePairs};
 use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt;
@@ -927,30 +927,18 @@ impl CheckAttrVisitor<'_> {
         hir_id: HirId,
     ) -> bool {
         if hir_id != CRATE_HIR_ID {
-            self.tcx.struct_span_lint_hir(
+            // insert a bang between `#` and `[...`
+            let bang_span = attr.span.lo() + BytePos(1);
+            let sugg = (attr.style == AttrStyle::Outer
+                && self.tcx.hir().get_parent_item(hir_id) == CRATE_OWNER_ID)
+                .then_some(errors::AttrCrateLevelOnlySugg {
+                    attr: attr.span.with_lo(bang_span).with_hi(bang_span),
+                });
+            self.tcx.emit_spanned_lint(
                 INVALID_DOC_ATTRIBUTES,
                 hir_id,
                 meta.span(),
-                fluent::passes_attr_crate_level,
-                |err| {
-                    if attr.style == AttrStyle::Outer
-                        && self.tcx.hir().get_parent_item(hir_id) == CRATE_OWNER_ID
-                    {
-                        if let Ok(mut src) = self.tcx.sess.source_map().span_to_snippet(attr.span) {
-                            src.insert(1, '!');
-                            err.span_suggestion_verbose(
-                                attr.span,
-                                fluent::passes_suggestion,
-                                src,
-                                Applicability::MaybeIncorrect,
-                            );
-                        } else {
-                            err.span_help(attr.span, fluent::passes_help);
-                        }
-                    }
-                    err.note(fluent::passes_note);
-                    err
-                },
+                errors::AttrCrateLevelOnly { sugg },
             );
             return false;
         }
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs
index e8603b3a2f1..99fc69d1bec 100644
--- a/compiler/rustc_passes/src/errors.rs
+++ b/compiler/rustc_passes/src/errors.rs
@@ -6,7 +6,8 @@ use std::{
 use crate::fluent_generated as fluent;
 use rustc_ast::Label;
 use rustc_errors::{
-    error_code, Applicability, DiagnosticSymbolList, ErrorGuaranteed, IntoDiagnostic, MultiSpan,
+    error_code, AddToDiagnostic, Applicability, Diagnostic, DiagnosticSymbolList, ErrorGuaranteed,
+    IntoDiagnostic, MultiSpan,
 };
 use rustc_hir::{self as hir, ExprKind, Target};
 use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
@@ -1555,3 +1556,160 @@ pub struct SkippingConstChecks {
     #[primary_span]
     pub span: Span,
 }
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unreachable_due_to_uninhabited)]
+pub struct UnreachableDueToUninhabited<'desc, 'tcx> {
+    pub descr: &'desc str,
+    #[label]
+    pub expr: Span,
+    #[label(passes_label_orig)]
+    #[note]
+    pub orig: Span,
+    pub ty: Ty<'tcx>,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_var_maybe_capture_ref)]
+#[help]
+pub struct UnusedVarMaybeCaptureRef {
+    pub name: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_capture_maybe_capture_ref)]
+#[help]
+pub struct UnusedCaptureMaybeCaptureRef {
+    pub name: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_var_remove_field)]
+pub struct UnusedVarRemoveField {
+    pub name: String,
+    #[subdiagnostic]
+    pub sugg: UnusedVarRemoveFieldSugg,
+}
+
+#[derive(Subdiagnostic)]
+#[multipart_suggestion(
+    passes_unused_var_remove_field_suggestion,
+    applicability = "machine-applicable"
+)]
+pub struct UnusedVarRemoveFieldSugg {
+    #[suggestion_part(code = "")]
+    pub spans: Vec<Span>,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_var_assigned_only)]
+#[note]
+pub struct UnusedVarAssignedOnly {
+    pub name: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unnecessary_stable_feature)]
+pub struct UnnecessaryStableFeature {
+    pub feature: Symbol,
+    pub since: Symbol,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unnecessary_partial_stable_feature)]
+pub struct UnnecessaryPartialStableFeature {
+    #[suggestion(code = "{implies}", applicability = "maybe-incorrect")]
+    pub span: Span,
+    #[suggestion(passes_suggestion_remove, code = "", applicability = "maybe-incorrect")]
+    pub line: Span,
+    pub feature: Symbol,
+    pub since: Symbol,
+    pub implies: Symbol,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_ineffective_unstable_impl)]
+#[note]
+pub struct IneffectiveUnstableImpl;
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_assign)]
+#[help]
+pub struct UnusedAssign {
+    pub name: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_assign_passed)]
+#[help]
+pub struct UnusedAssignPassed {
+    pub name: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_variable_try_prefix)]
+pub struct UnusedVariableTryPrefix {
+    #[label]
+    pub label: Option<Span>,
+    #[subdiagnostic]
+    pub string_interp: Vec<UnusedVariableStringInterp>,
+    #[subdiagnostic]
+    pub sugg: UnusedVariableTryPrefixSugg,
+}
+
+#[derive(Subdiagnostic)]
+#[multipart_suggestion(passes_suggestion, applicability = "machine-applicable")]
+pub struct UnusedVariableTryPrefixSugg {
+    #[suggestion_part(code = "_{name}")]
+    pub spans: Vec<Span>,
+    pub name: String,
+}
+
+pub struct UnusedVariableStringInterp {
+    pub lit: Span,
+    pub lo: Span,
+    pub hi: Span,
+}
+
+impl AddToDiagnostic for UnusedVariableStringInterp {
+    fn add_to_diagnostic_with<F>(self, diag: &mut Diagnostic, _: F) {
+        diag.span_label(self.lit, crate::fluent_generated::passes_maybe_string_interpolation);
+        diag.multipart_suggestion(
+            crate::fluent_generated::passes_string_interpolation_only_works,
+            vec![(self.lo, String::from("format!(")), (self.hi, String::from(")"))],
+            Applicability::MachineApplicable,
+        );
+    }
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_unused_variable_try_ignore)]
+pub struct UnusedVarTryIgnore {
+    #[subdiagnostic]
+    pub sugg: UnusedVarTryIgnoreSugg,
+}
+
+#[derive(Subdiagnostic)]
+#[multipart_suggestion(passes_suggestion, applicability = "machine-applicable")]
+pub struct UnusedVarTryIgnoreSugg {
+    #[suggestion_part(code = "{name}: _")]
+    pub shorthands: Vec<Span>,
+    #[suggestion_part(code = "_")]
+    pub non_shorthands: Vec<Span>,
+    pub name: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(passes_attr_crate_level)]
+#[note]
+pub struct AttrCrateLevelOnly {
+    #[subdiagnostic]
+    pub sugg: Option<AttrCrateLevelOnlySugg>,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(passes_suggestion, applicability = "maybe-incorrect", code = "!", style = "verbose")]
+pub struct AttrCrateLevelOnlySugg {
+    #[primary_span]
+    pub attr: Span,
+}
diff --git a/compiler/rustc_passes/src/lib.rs b/compiler/rustc_passes/src/lib.rs
index eca3bae9a1c..8b7338e29aa 100644
--- a/compiler/rustc_passes/src/lib.rs
+++ b/compiler/rustc_passes/src/lib.rs
@@ -12,6 +12,8 @@
 #![feature(min_specialization)]
 #![feature(try_blocks)]
 #![recursion_limit = "256"]
+#![deny(rustc::untranslatable_diagnostic)]
+#![deny(rustc::diagnostic_outside_of_impl)]
 
 #[macro_use]
 extern crate rustc_middle;
diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs
index 7d8f6add632..6758024419d 100644
--- a/compiler/rustc_passes/src/liveness.rs
+++ b/compiler/rustc_passes/src/liveness.rs
@@ -81,13 +81,13 @@
 //! We generate various special nodes for various, well, special purposes.
 //! These are described in the `Liveness` struct.
 
+use crate::errors;
+
 use self::LiveNodeKind::*;
 use self::VarKind::*;
 
 use rustc_ast::InlineAsmOptions;
 use rustc_data_structures::fx::FxIndexMap;
-use rustc_errors::Applicability;
-use rustc_errors::Diagnostic;
 use rustc_hir as hir;
 use rustc_hir::def::*;
 use rustc_hir::def_id::LocalDefId;
@@ -1297,13 +1297,13 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
         self.exit_ln
     }
 
-    fn warn_about_unreachable(
+    fn warn_about_unreachable<'desc>(
         &mut self,
         orig_span: Span,
         orig_ty: Ty<'tcx>,
         expr_span: Span,
         expr_id: HirId,
-        descr: &str,
+        descr: &'desc str,
     ) {
         if !orig_ty.is_never() {
             // Unreachable code warnings are already emitted during type checking.
@@ -1316,22 +1316,15 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
             // that we do not emit the same warning twice if the uninhabited type
             // is indeed `!`.
 
-            let msg = format!("unreachable {}", descr);
-            self.ir.tcx.struct_span_lint_hir(
+            self.ir.tcx.emit_spanned_lint(
                 lint::builtin::UNREACHABLE_CODE,
                 expr_id,
                 expr_span,
-                &msg,
-                |diag| {
-                    diag.span_label(expr_span, &msg)
-                        .span_label(orig_span, "any code following this expression is unreachable")
-                        .span_note(
-                            orig_span,
-                            &format!(
-                                "this expression has type `{}`, which is uninhabited",
-                                orig_ty
-                            ),
-                        )
+                errors::UnreachableDueToUninhabited {
+                    expr: expr_span,
+                    orig: orig_span,
+                    descr,
+                    ty: orig_ty,
                 },
             );
         }
@@ -1483,23 +1476,21 @@ impl<'tcx> Liveness<'_, 'tcx> {
                 if self.used_on_entry(entry_ln, var) {
                     if !self.live_on_entry(entry_ln, var) {
                         if let Some(name) = self.should_warn(var) {
-                            self.ir.tcx.struct_span_lint_hir(
+                            self.ir.tcx.emit_spanned_lint(
                                 lint::builtin::UNUSED_ASSIGNMENTS,
                                 var_hir_id,
                                 vec![span],
-                                format!("value captured by `{}` is never read", name),
-                                |lint| lint.help("did you mean to capture by reference instead?"),
+                                errors::UnusedCaptureMaybeCaptureRef { name },
                             );
                         }
                     }
                 } else {
                     if let Some(name) = self.should_warn(var) {
-                        self.ir.tcx.struct_span_lint_hir(
+                        self.ir.tcx.emit_spanned_lint(
                             lint::builtin::UNUSED_VARIABLES,
                             var_hir_id,
                             vec![span],
-                            format!("unused variable: `{}`", name),
-                            |lint| lint.help("did you mean to capture by reference instead?"),
+                            errors::UnusedVarMaybeCaptureRef { name },
                         );
                     }
                 }
@@ -1514,11 +1505,14 @@ impl<'tcx> Liveness<'_, 'tcx> {
                 Some(entry_ln),
                 Some(body),
                 |spans, hir_id, ln, var| {
-                    if !self.live_on_entry(ln, var) {
-                        self.report_unused_assign(hir_id, spans, var, |name| {
-                            format!("value passed to `{}` is never read", name)
-                        });
-                    }
+                    if !self.live_on_entry(ln, var)
+                        && let Some(name) = self.should_warn(var) {
+                            self.ir.tcx.emit_spanned_lint(
+                                lint::builtin::UNUSED_ASSIGNMENTS,
+                                hir_id,
+                                spans,
+                                errors::UnusedAssignPassed { name },
+                            );                    }
                 },
             );
         }
@@ -1587,39 +1581,35 @@ impl<'tcx> Liveness<'_, 'tcx> {
                 if ln == self.exit_ln { false } else { self.assigned_on_exit(ln, var) };
 
             if is_assigned {
-                self.ir.tcx.struct_span_lint_hir(
+                self.ir.tcx.emit_spanned_lint(
                     lint::builtin::UNUSED_VARIABLES,
                     first_hir_id,
                     hir_ids_and_spans
                         .into_iter()
                         .map(|(_, _, ident_span)| ident_span)
                         .collect::<Vec<_>>(),
-                    format!("variable `{}` is assigned to, but never used", name),
-                    |lint| lint.note(&format!("consider using `_{}` instead", name)),
+                    errors::UnusedVarAssignedOnly { name },
                 )
             } else if can_remove {
-                self.ir.tcx.struct_span_lint_hir(
+                let spans = hir_ids_and_spans
+                    .iter()
+                    .map(|(_, pat_span, _)| {
+                        let span = self
+                            .ir
+                            .tcx
+                            .sess
+                            .source_map()
+                            .span_extend_to_next_char(*pat_span, ',', true);
+                        span.with_hi(BytePos(span.hi().0 + 1))
+                    })
+                    .collect();
+                self.ir.tcx.emit_spanned_lint(
                     lint::builtin::UNUSED_VARIABLES,
                     first_hir_id,
                     hir_ids_and_spans.iter().map(|(_, pat_span, _)| *pat_span).collect::<Vec<_>>(),
-                    format!("unused variable: `{}`", name),
-                    |lint| {
-                        lint.multipart_suggestion(
-                            "try removing the field",
-                            hir_ids_and_spans
-                                .iter()
-                                .map(|(_, pat_span, _)| {
-                                    let span = self
-                                        .ir
-                                        .tcx
-                                        .sess
-                                        .source_map()
-                                        .span_extend_to_next_char(*pat_span, ',', true);
-                                    (span.with_hi(BytePos(span.hi().0 + 1)), String::new())
-                                })
-                                .collect(),
-                            Applicability::MachineApplicable,
-                        )
+                    errors::UnusedVarRemoveField {
+                        name,
+                        sugg: errors::UnusedVarRemoveFieldSugg { spans },
                     },
                 );
             } else {
@@ -1633,55 +1623,46 @@ impl<'tcx> Liveness<'_, 'tcx> {
                 // the field" message, and suggest `_` for the non-shorthands. If we only
                 // have non-shorthand, then prefix with an underscore instead.
                 if !shorthands.is_empty() {
-                    let shorthands = shorthands
-                        .into_iter()
-                        .map(|(_, pat_span, _)| (pat_span, format!("{}: _", name)))
-                        .chain(
-                            non_shorthands
-                                .into_iter()
-                                .map(|(_, pat_span, _)| (pat_span, "_".to_string())),
-                        )
-                        .collect::<Vec<_>>();
+                    let shorthands =
+                        shorthands.into_iter().map(|(_, pat_span, _)| pat_span).collect();
+                    let non_shorthands =
+                        non_shorthands.into_iter().map(|(_, pat_span, _)| pat_span).collect();
 
-                    self.ir.tcx.struct_span_lint_hir(
+                    self.ir.tcx.emit_spanned_lint(
                         lint::builtin::UNUSED_VARIABLES,
                         first_hir_id,
                         hir_ids_and_spans
                             .iter()
                             .map(|(_, pat_span, _)| *pat_span)
                             .collect::<Vec<_>>(),
-                        format!("unused variable: `{}`", name),
-                        |lint| {
-                            lint.multipart_suggestion(
-                                "try ignoring the field",
+                        errors::UnusedVarTryIgnore {
+                            sugg: errors::UnusedVarTryIgnoreSugg {
                                 shorthands,
-                                Applicability::MachineApplicable,
-                            )
+                                non_shorthands,
+                                name,
+                            },
                         },
                     );
                 } else {
                     let non_shorthands = non_shorthands
                         .into_iter()
-                        .map(|(_, _, ident_span)| (ident_span, format!("_{}", name)))
+                        .map(|(_, _, ident_span)| ident_span)
                         .collect::<Vec<_>>();
-
-                    self.ir.tcx.struct_span_lint_hir(
+                    let suggestions = self.string_interp_suggestions(&name, opt_body);
+                    self.ir.tcx.emit_spanned_lint(
                         lint::builtin::UNUSED_VARIABLES,
                         first_hir_id,
                         hir_ids_and_spans
                             .iter()
                             .map(|(_, _, ident_span)| *ident_span)
                             .collect::<Vec<_>>(),
-                        format!("unused variable: `{}`", name),
-                        |lint| {
-                            if self.has_added_lit_match_name_span(&name, opt_body, lint) {
-                                lint.span_label(pat.span, "unused variable");
-                            }
-                            lint.multipart_suggestion(
-                                "if this is intentional, prefix it with an underscore",
-                                non_shorthands,
-                                Applicability::MachineApplicable,
-                            )
+                        errors::UnusedVariableTryPrefix {
+                            label: if !suggestions.is_empty() { Some(pat.span) } else { None },
+                            sugg: errors::UnusedVariableTryPrefixSugg {
+                                spans: non_shorthands,
+                                name,
+                            },
+                            string_interp: suggestions,
                         },
                     );
                 }
@@ -1689,65 +1670,40 @@ impl<'tcx> Liveness<'_, 'tcx> {
         }
     }
 
-    fn has_added_lit_match_name_span(
+    fn string_interp_suggestions(
         &self,
         name: &str,
         opt_body: Option<&hir::Body<'_>>,
-        err: &mut Diagnostic,
-    ) -> bool {
-        let mut has_litstring = false;
-        let Some(opt_body) = opt_body else {return false;};
+    ) -> Vec<errors::UnusedVariableStringInterp> {
+        let mut suggs = Vec::new();
+        let Some(opt_body) = opt_body else { return suggs; };
         let mut visitor = CollectLitsVisitor { lit_exprs: vec![] };
         intravisit::walk_body(&mut visitor, opt_body);
         for lit_expr in visitor.lit_exprs {
             let hir::ExprKind::Lit(litx) = &lit_expr.kind else { continue };
             let rustc_ast::LitKind::Str(syb, _) = litx.node else{ continue; };
             let name_str: &str = syb.as_str();
-            let mut name_pa = String::from("{");
-            name_pa.push_str(&name);
-            name_pa.push('}');
+            let name_pa = format!("{{{name}}}");
             if name_str.contains(&name_pa) {
-                err.span_label(
-                    lit_expr.span,
-                    "you might have meant to use string interpolation in this string literal",
-                );
-                err.multipart_suggestion(
-                    "string interpolation only works in `format!` invocations",
-                    vec![
-                        (lit_expr.span.shrink_to_lo(), "format!(".to_string()),
-                        (lit_expr.span.shrink_to_hi(), ")".to_string()),
-                    ],
-                    Applicability::MachineApplicable,
-                );
-                has_litstring = true;
+                suggs.push(errors::UnusedVariableStringInterp {
+                    lit: lit_expr.span,
+                    lo: lit_expr.span.shrink_to_lo(),
+                    hi: lit_expr.span.shrink_to_hi(),
+                });
             }
         }
-        has_litstring
+        suggs
     }
 
     fn warn_about_dead_assign(&self, spans: Vec<Span>, hir_id: HirId, ln: LiveNode, var: Variable) {
-        if !self.live_on_exit(ln, var) {
-            self.report_unused_assign(hir_id, spans, var, |name| {
-                format!("value assigned to `{}` is never read", name)
-            });
-        }
-    }
-
-    fn report_unused_assign(
-        &self,
-        hir_id: HirId,
-        spans: Vec<Span>,
-        var: Variable,
-        message: impl Fn(&str) -> String,
-    ) {
-        if let Some(name) = self.should_warn(var) {
-            self.ir.tcx.struct_span_lint_hir(
-                lint::builtin::UNUSED_ASSIGNMENTS,
-                hir_id,
-                spans,
-                message(&name),
-                |lint| lint.help("maybe it is overwritten before being read?"),
-            )
-        }
+        if !self.live_on_exit(ln, var)
+            && let Some(name) = self.should_warn(var) {
+                self.ir.tcx.emit_spanned_lint(
+                    lint::builtin::UNUSED_ASSIGNMENTS,
+                    hir_id,
+                    spans,
+                    errors::UnusedAssign { name },
+                );
+            }
     }
 }
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs
index 4a35c679466..9615f283ff4 100644
--- a/compiler/rustc_passes/src/stability.rs
+++ b/compiler/rustc_passes/src/stability.rs
@@ -7,7 +7,6 @@ use rustc_attr::{
     UnstableReason, VERSION_PLACEHOLDER,
 };
 use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
-use rustc_errors::Applicability;
 use rustc_hir as hir;
 use rustc_hir::def::{DefKind, Res};
 use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID};
@@ -759,12 +758,11 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> {
                         // do not lint when the trait isn't resolved, since resolution error should
                         // be fixed first
                         if t.path.res != Res::Err && c.fully_stable {
-                            self.tcx.struct_span_lint_hir(
+                            self.tcx.emit_spanned_lint(
                                 INEFFECTIVE_UNSTABLE_TRAIT_IMPL,
                                 item.hir_id(),
                                 span,
-                                "an `#[unstable]` annotation here has no effect",
-                                |lint| lint.note("see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information")
+                                errors::IneffectiveUnstableImpl,
                             );
                         }
                     }
@@ -1095,29 +1093,16 @@ fn unnecessary_partially_stable_feature_lint(
     implies: Symbol,
     since: Symbol,
 ) {
-    tcx.struct_span_lint_hir(
+    tcx.emit_spanned_lint(
         lint::builtin::STABLE_FEATURES,
         hir::CRATE_HIR_ID,
         span,
-        format!(
-            "the feature `{feature}` has been partially stabilized since {since} and is succeeded \
-             by the feature `{implies}`"
-        ),
-        |lint| {
-            lint.span_suggestion(
-                span,
-                &format!(
-                "if you are using features which are still unstable, change to using `{implies}`"
-            ),
-                implies,
-                Applicability::MaybeIncorrect,
-            )
-            .span_suggestion(
-                tcx.sess.source_map().span_extend_to_line(span),
-                "if you are using features which are now stable, remove this line",
-                "",
-                Applicability::MaybeIncorrect,
-            )
+        errors::UnnecessaryPartialStableFeature {
+            span,
+            line: tcx.sess.source_map().span_extend_to_line(span),
+            feature,
+            since,
+            implies,
         },
     );
 }
@@ -1131,7 +1116,10 @@ fn unnecessary_stable_feature_lint(
     if since.as_str() == VERSION_PLACEHOLDER {
         since = rust_version_symbol();
     }
-    tcx.struct_span_lint_hir(lint::builtin::STABLE_FEATURES, hir::CRATE_HIR_ID, span, format!("the feature `{feature}` has been stable since {since} and no longer requires an attribute to enable"), |lint| {
-        lint
-    });
+    tcx.emit_spanned_lint(
+        lint::builtin::STABLE_FEATURES,
+        hir::CRATE_HIR_ID,
+        span,
+        errors::UnnecessaryStableFeature { feature, since },
+    );
 }
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs
index b9922b26afc..8de4d06fe78 100644
--- a/compiler/rustc_query_system/src/dep_graph/graph.rs
+++ b/compiler/rustc_query_system/src/dep_graph/graph.rs
@@ -354,24 +354,20 @@ impl<K: DepKind> DepGraphData<K> {
                  - dep-node: {key:?}"
         );
 
-        let task_deps = if cx.dep_context().is_eval_always(key.kind) {
-            None
+        let with_deps = |task_deps| K::with_deps(task_deps, || task(cx, arg));
+        let (result, edges) = if cx.dep_context().is_eval_always(key.kind) {
+            (with_deps(TaskDepsRef::EvalAlways), smallvec![])
         } else {
-            Some(Lock::new(TaskDeps {
+            let task_deps = Lock::new(TaskDeps {
                 #[cfg(debug_assertions)]
                 node: Some(key),
                 reads: SmallVec::new(),
                 read_set: Default::default(),
                 phantom_data: PhantomData,
-            }))
+            });
+            (with_deps(TaskDepsRef::Allow(&task_deps)), task_deps.into_inner().reads)
         };
 
-        let task_deps_ref =
-            task_deps.as_ref().map(TaskDepsRef::Allow).unwrap_or(TaskDepsRef::EvalAlways);
-
-        let result = K::with_deps(task_deps_ref, || task(cx, arg));
-        let edges = task_deps.map_or_else(|| smallvec![], |lock| lock.into_inner().reads);
-
         let dcx = cx.dep_context();
         let hashing_timer = dcx.profiler().incr_result_hashing();
         let current_fingerprint =
@@ -1236,76 +1232,48 @@ impl<K: DepKind> CurrentDepGraph<K> {
             self.node_intern_event_id.map(|eid| profiler.generic_activity_with_event_id(eid));
 
         if let Some(prev_index) = prev_graph.node_to_index_opt(&key) {
+            let get_dep_node_index = |color, fingerprint| {
+                if print_status {
+                    eprintln!("[task::{color:}] {key:?}");
+                }
+
+                let mut prev_index_to_index = self.prev_index_to_index.lock();
+
+                let dep_node_index = match prev_index_to_index[prev_index] {
+                    Some(dep_node_index) => dep_node_index,
+                    None => {
+                        let dep_node_index =
+                            self.encoder.borrow().send(profiler, key, fingerprint, edges);
+                        prev_index_to_index[prev_index] = Some(dep_node_index);
+                        dep_node_index
+                    }
+                };
+
+                #[cfg(debug_assertions)]
+                self.record_edge(dep_node_index, key, fingerprint);
+
+                dep_node_index
+            };
+
             // Determine the color and index of the new `DepNode`.
             if let Some(fingerprint) = fingerprint {
                 if fingerprint == prev_graph.fingerprint_by_index(prev_index) {
-                    if print_status {
-                        eprintln!("[task::green] {key:?}");
-                    }
-
                     // This is a green node: it existed in the previous compilation,
                     // its query was re-executed, and it has the same result as before.
-                    let mut prev_index_to_index = self.prev_index_to_index.lock();
-
-                    let dep_node_index = match prev_index_to_index[prev_index] {
-                        Some(dep_node_index) => dep_node_index,
-                        None => {
-                            let dep_node_index =
-                                self.encoder.borrow().send(profiler, key, fingerprint, edges);
-                            prev_index_to_index[prev_index] = Some(dep_node_index);
-                            dep_node_index
-                        }
-                    };
-
-                    #[cfg(debug_assertions)]
-                    self.record_edge(dep_node_index, key, fingerprint);
+                    let dep_node_index = get_dep_node_index("green", fingerprint);
                     (dep_node_index, Some((prev_index, DepNodeColor::Green(dep_node_index))))
                 } else {
-                    if print_status {
-                        eprintln!("[task::red] {key:?}");
-                    }
-
                     // This is a red node: it existed in the previous compilation, its query
                     // was re-executed, but it has a different result from before.
-                    let mut prev_index_to_index = self.prev_index_to_index.lock();
-
-                    let dep_node_index = match prev_index_to_index[prev_index] {
-                        Some(dep_node_index) => dep_node_index,
-                        None => {
-                            let dep_node_index =
-                                self.encoder.borrow().send(profiler, key, fingerprint, edges);
-                            prev_index_to_index[prev_index] = Some(dep_node_index);
-                            dep_node_index
-                        }
-                    };
-
-                    #[cfg(debug_assertions)]
-                    self.record_edge(dep_node_index, key, fingerprint);
+                    let dep_node_index = get_dep_node_index("red", fingerprint);
                     (dep_node_index, Some((prev_index, DepNodeColor::Red)))
                 }
             } else {
-                if print_status {
-                    eprintln!("[task::unknown] {key:?}");
-                }
-
                 // This is a red node, effectively: it existed in the previous compilation
                 // session, its query was re-executed, but it doesn't compute a result hash
                 // (i.e. it represents a `no_hash` query), so we have no way of determining
                 // whether or not the result was the same as before.
-                let mut prev_index_to_index = self.prev_index_to_index.lock();
-
-                let dep_node_index = match prev_index_to_index[prev_index] {
-                    Some(dep_node_index) => dep_node_index,
-                    None => {
-                        let dep_node_index =
-                            self.encoder.borrow().send(profiler, key, Fingerprint::ZERO, edges);
-                        prev_index_to_index[prev_index] = Some(dep_node_index);
-                        dep_node_index
-                    }
-                };
-
-                #[cfg(debug_assertions)]
-                self.record_edge(dep_node_index, key, Fingerprint::ZERO);
+                let dep_node_index = get_dep_node_index("unknown", Fingerprint::ZERO);
                 (dep_node_index, Some((prev_index, DepNodeColor::Red)))
             }
         } else {
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index 5da67dbc2aa..511ae8516a8 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -859,13 +859,9 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
                             sig.decl.inputs.iter().map(|Param { ty, .. }| (None, &**ty)),
                             &sig.decl.output,
                         );
-
-                        this.record_lifetime_params_for_async(
-                            fn_id,
-                            sig.header.asyncness.opt_return_id(),
-                        );
                     },
                 );
+                self.record_lifetime_params_for_async(fn_id, sig.header.asyncness.opt_return_id());
                 return;
             }
             FnKind::Fn(..) => {
diff --git a/compiler/rustc_serialize/src/opaque.rs b/compiler/rustc_serialize/src/opaque.rs
index b7976ea3b1c..0f6e4b329b8 100644
--- a/compiler/rustc_serialize/src/opaque.rs
+++ b/compiler/rustc_serialize/src/opaque.rs
@@ -51,13 +51,6 @@ macro_rules! write_leb128 {
     }};
 }
 
-/// A byte that [cannot occur in UTF8 sequences][utf8]. Used to mark the end of a string.
-/// This way we can skip validation and still be relatively sure that deserialization
-/// did not desynchronize.
-///
-/// [utf8]: https://en.wikipedia.org/w/index.php?title=UTF-8&oldid=1058865525#Codepage_layout
-const STR_SENTINEL: u8 = 0xC1;
-
 impl Encoder for MemEncoder {
     #[inline]
     fn emit_usize(&mut self, v: usize) {
@@ -115,28 +108,6 @@ impl Encoder for MemEncoder {
     }
 
     #[inline]
-    fn emit_i8(&mut self, v: i8) {
-        self.emit_u8(v as u8);
-    }
-
-    #[inline]
-    fn emit_bool(&mut self, v: bool) {
-        self.emit_u8(if v { 1 } else { 0 });
-    }
-
-    #[inline]
-    fn emit_char(&mut self, v: char) {
-        self.emit_u32(v as u32);
-    }
-
-    #[inline]
-    fn emit_str(&mut self, v: &str) {
-        self.emit_usize(v.len());
-        self.emit_raw_bytes(v.as_bytes());
-        self.emit_u8(STR_SENTINEL);
-    }
-
-    #[inline]
     fn emit_raw_bytes(&mut self, s: &[u8]) {
         self.data.extend_from_slice(s);
     }
@@ -481,28 +452,6 @@ impl Encoder for FileEncoder {
     }
 
     #[inline]
-    fn emit_i8(&mut self, v: i8) {
-        self.emit_u8(v as u8);
-    }
-
-    #[inline]
-    fn emit_bool(&mut self, v: bool) {
-        self.emit_u8(if v { 1 } else { 0 });
-    }
-
-    #[inline]
-    fn emit_char(&mut self, v: char) {
-        self.emit_u32(v as u32);
-    }
-
-    #[inline]
-    fn emit_str(&mut self, v: &str) {
-        self.emit_usize(v.len());
-        self.emit_raw_bytes(v.as_bytes());
-        self.emit_u8(STR_SENTINEL);
-    }
-
-    #[inline]
     fn emit_raw_bytes(&mut self, s: &[u8]) {
         self.write_all(s);
     }
@@ -556,39 +505,10 @@ impl<'a> MemDecoder<'a> {
     }
 
     #[inline]
-    fn read_byte(&mut self) -> u8 {
-        if self.current == self.end {
-            Self::decoder_exhausted();
-        }
-        // SAFETY: This type guarantees current <= end, and we just checked current == end.
-        unsafe {
-            let byte = *self.current;
-            self.current = self.current.add(1);
-            byte
-        }
-    }
-
-    #[inline]
     fn read_array<const N: usize>(&mut self) -> [u8; N] {
         self.read_raw_bytes(N).try_into().unwrap()
     }
 
-    // The trait method doesn't have a lifetime parameter, and we need a version of this
-    // that definitely returns a slice based on the underlying storage as opposed to
-    // the Decoder itself in order to implement read_str efficiently.
-    #[inline]
-    fn read_raw_bytes_inherent(&mut self, bytes: usize) -> &'a [u8] {
-        if bytes > self.remaining() {
-            Self::decoder_exhausted();
-        }
-        // SAFETY: We just checked if this range is in-bounds above.
-        unsafe {
-            let slice = std::slice::from_raw_parts(self.current, bytes);
-            self.current = self.current.add(bytes);
-            slice
-        }
-    }
-
     /// While we could manually expose manipulation of the decoder position,
     /// all current users of that method would need to reset the position later,
     /// incurring the bounds check of set_position twice.
@@ -653,7 +573,15 @@ impl<'a> Decoder for MemDecoder<'a> {
 
     #[inline]
     fn read_u8(&mut self) -> u8 {
-        self.read_byte()
+        if self.current == self.end {
+            Self::decoder_exhausted();
+        }
+        // SAFETY: This type guarantees current <= end, and we just checked current == end.
+        unsafe {
+            let byte = *self.current;
+            self.current = self.current.add(1);
+            byte
+        }
     }
 
     #[inline]
@@ -682,38 +610,21 @@ impl<'a> Decoder for MemDecoder<'a> {
     }
 
     #[inline]
-    fn read_i8(&mut self) -> i8 {
-        self.read_byte() as i8
-    }
-
-    #[inline]
     fn read_isize(&mut self) -> isize {
         read_leb128!(self, read_isize_leb128)
     }
 
     #[inline]
-    fn read_bool(&mut self) -> bool {
-        let value = self.read_u8();
-        value != 0
-    }
-
-    #[inline]
-    fn read_char(&mut self) -> char {
-        let bits = self.read_u32();
-        std::char::from_u32(bits).unwrap()
-    }
-
-    #[inline]
-    fn read_str(&mut self) -> &str {
-        let len = self.read_usize();
-        let bytes = self.read_raw_bytes_inherent(len + 1);
-        assert!(bytes[len] == STR_SENTINEL);
-        unsafe { std::str::from_utf8_unchecked(&bytes[..len]) }
-    }
-
-    #[inline]
-    fn read_raw_bytes(&mut self, bytes: usize) -> &[u8] {
-        self.read_raw_bytes_inherent(bytes)
+    fn read_raw_bytes(&mut self, bytes: usize) -> &'a [u8] {
+        if bytes > self.remaining() {
+            Self::decoder_exhausted();
+        }
+        // SAFETY: We just checked if this range is in-bounds above.
+        unsafe {
+            let slice = std::slice::from_raw_parts(self.current, bytes);
+            self.current = self.current.add(bytes);
+            slice
+        }
     }
 
     #[inline]
@@ -787,12 +698,7 @@ impl Encodable<FileEncoder> for IntEncodedWithFixedSize {
 impl<'a> Decodable<MemDecoder<'a>> for IntEncodedWithFixedSize {
     #[inline]
     fn decode(decoder: &mut MemDecoder<'a>) -> IntEncodedWithFixedSize {
-        let _start_pos = decoder.position();
-        let bytes = decoder.read_raw_bytes(IntEncodedWithFixedSize::ENCODED_SIZE);
-        let value = u64::from_le_bytes(bytes.try_into().unwrap());
-        let _end_pos = decoder.position();
-        debug_assert_eq!((_end_pos - _start_pos), IntEncodedWithFixedSize::ENCODED_SIZE);
-
-        IntEncodedWithFixedSize(value)
+        let bytes = decoder.read_array::<{ IntEncodedWithFixedSize::ENCODED_SIZE }>();
+        IntEncodedWithFixedSize(u64::from_le_bytes(bytes))
     }
 }
diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs
index a6d9c7b7d42..e1bc598736f 100644
--- a/compiler/rustc_serialize/src/serialize.rs
+++ b/compiler/rustc_serialize/src/serialize.rs
@@ -12,6 +12,13 @@ use std::path;
 use std::rc::Rc;
 use std::sync::Arc;
 
+/// A byte that [cannot occur in UTF8 sequences][utf8]. Used to mark the end of a string.
+/// This way we can skip validation and still be relatively sure that deserialization
+/// did not desynchronize.
+///
+/// [utf8]: https://en.wikipedia.org/w/index.php?title=UTF-8&oldid=1058865525#Codepage_layout
+const STR_SENTINEL: u8 = 0xC1;
+
 /// A note about error handling.
 ///
 /// Encoders may be fallible, but in practice failure is rare and there are so
@@ -40,10 +47,29 @@ pub trait Encoder {
     fn emit_i64(&mut self, v: i64);
     fn emit_i32(&mut self, v: i32);
     fn emit_i16(&mut self, v: i16);
-    fn emit_i8(&mut self, v: i8);
-    fn emit_bool(&mut self, v: bool);
-    fn emit_char(&mut self, v: char);
-    fn emit_str(&mut self, v: &str);
+
+    #[inline]
+    fn emit_i8(&mut self, v: i8) {
+        self.emit_u8(v as u8);
+    }
+
+    #[inline]
+    fn emit_bool(&mut self, v: bool) {
+        self.emit_u8(if v { 1 } else { 0 });
+    }
+
+    #[inline]
+    fn emit_char(&mut self, v: char) {
+        self.emit_u32(v as u32);
+    }
+
+    #[inline]
+    fn emit_str(&mut self, v: &str) {
+        self.emit_usize(v.len());
+        self.emit_raw_bytes(v.as_bytes());
+        self.emit_u8(STR_SENTINEL);
+    }
+
     fn emit_raw_bytes(&mut self, s: &[u8]);
 
     fn emit_enum_variant<F>(&mut self, v_id: usize, f: F)
@@ -79,11 +105,38 @@ pub trait Decoder {
     fn read_i64(&mut self) -> i64;
     fn read_i32(&mut self) -> i32;
     fn read_i16(&mut self) -> i16;
-    fn read_i8(&mut self) -> i8;
-    fn read_bool(&mut self) -> bool;
-    fn read_char(&mut self) -> char;
-    fn read_str(&mut self) -> &str;
+
+    #[inline]
+    fn read_i8(&mut self) -> i8 {
+        self.read_u8() as i8
+    }
+
+    #[inline]
+    fn read_bool(&mut self) -> bool {
+        let value = self.read_u8();
+        value != 0
+    }
+
+    #[inline]
+    fn read_char(&mut self) -> char {
+        let bits = self.read_u32();
+        std::char::from_u32(bits).unwrap()
+    }
+
+    #[inline]
+    fn read_str(&mut self) -> &str {
+        let len = self.read_usize();
+        let bytes = self.read_raw_bytes(len + 1);
+        assert!(bytes[len] == STR_SENTINEL);
+        unsafe { std::str::from_utf8_unchecked(&bytes[..len]) }
+    }
+
     fn read_raw_bytes(&mut self, len: usize) -> &[u8];
+
+    // Although there is an `emit_enum_variant` method in `Encoder`, the code
+    // patterns in decoding are different enough to encoding that there is no
+    // need for a corresponding `read_enum_variant` method here.
+
     fn peek_byte(&self) -> u8;
     fn position(&self) -> usize;
 }
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index d9f03fe1407..775fad1a365 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -917,7 +917,7 @@ mod parse {
             }
         }
 
-        let mut options = slot.get_or_insert_default();
+        let options = slot.get_or_insert_default();
         let mut seen_always = false;
         let mut seen_never = false;
         let mut seen_ignore_loops = false;
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index abf19c30e3d..c2619956219 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -129,8 +129,7 @@ symbols! {
         Any,
         Arc,
         Argument,
-        ArgumentV1,
-        ArgumentV1Methods,
+        ArgumentMethods,
         Arguments,
         AsMut,
         AsRef,
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
index bd52957d162..63a73f8d50d 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs
@@ -3,7 +3,8 @@ use rustc_infer::infer::at::ToTrace;
 use rustc_infer::infer::canonical::CanonicalVarValues;
 use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
 use rustc_infer::infer::{
-    DefineOpaqueTypes, InferCtxt, InferOk, LateBoundRegionConversionTime, TyCtxtInferExt,
+    DefineOpaqueTypes, InferCtxt, InferOk, LateBoundRegionConversionTime, RegionVariableOrigin,
+    TyCtxtInferExt,
 };
 use rustc_infer::traits::query::NoSolution;
 use rustc_infer::traits::ObligationCause;
@@ -223,18 +224,20 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
         {
             debug!("rerunning goal to check result is stable");
             let (_orig_values, canonical_goal) = self.canonicalize_goal(goal);
-            let canonical_response =
+            let new_canonical_response =
                 EvalCtxt::evaluate_canonical_goal(self.tcx(), self.search_graph, canonical_goal)?;
-            if !canonical_response.value.var_values.is_identity() {
+            if !new_canonical_response.value.var_values.is_identity() {
                 bug!(
                     "unstable result: re-canonicalized goal={canonical_goal:#?} \
-                     response={canonical_response:#?}"
+                    first_response={canonical_response:#?} \
+                    second_response={new_canonical_response:#?}"
                 );
             }
-            if certainty != canonical_response.value.certainty {
+            if certainty != new_canonical_response.value.certainty {
                 bug!(
                     "unstable certainty: {certainty:#?} re-canonicalized goal={canonical_goal:#?} \
-                     response={canonical_response:#?}"
+                     first_response={canonical_response:#?} \
+                     second_response={new_canonical_response:#?}"
                 );
             }
         }
@@ -434,6 +437,10 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
         })
     }
 
+    pub(super) fn next_region_infer(&self) -> ty::Region<'tcx> {
+        self.infcx.next_region_var(RegionVariableOrigin::MiscVariable(DUMMY_SP))
+    }
+
     pub(super) fn next_const_infer(&self, ty: Ty<'tcx>) -> ty::Const<'tcx> {
         self.infcx.next_const_var(
             ty,
diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs
index 226d29687e3..67ad7fb4bd2 100644
--- a/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs
+++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs
@@ -16,7 +16,7 @@ use rustc_infer::infer::canonical::query_response::make_query_region_constraints
 use rustc_infer::infer::canonical::CanonicalVarValues;
 use rustc_infer::infer::canonical::{CanonicalExt, QueryRegionConstraints};
 use rustc_middle::traits::query::NoSolution;
-use rustc_middle::traits::solve::{ExternalConstraints, ExternalConstraintsData};
+use rustc_middle::traits::solve::{ExternalConstraints, ExternalConstraintsData, MaybeCause};
 use rustc_middle::ty::{self, BoundVar, GenericArgKind};
 use rustc_span::DUMMY_SP;
 use std::iter;
@@ -60,9 +60,27 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
 
         let certainty = certainty.unify_with(goals_certainty);
 
-        let external_constraints = self.compute_external_query_constraints()?;
+        let response = match certainty {
+            Certainty::Yes | Certainty::Maybe(MaybeCause::Ambiguity) => {
+                let external_constraints = self.compute_external_query_constraints()?;
+                Response { var_values: self.var_values, external_constraints, certainty }
+            }
+            Certainty::Maybe(MaybeCause::Overflow) => {
+                // If we have overflow, it's probable that we're substituting a type
+                // into itself infinitely and any partial substitutions in the query
+                // response are probably not useful anyways, so just return an empty
+                // query response.
+                //
+                // This may prevent us from potentially useful inference, e.g.
+                // 2 candidates, one ambiguous and one overflow, which both
+                // have the same inference constraints.
+                //
+                // Changing this to retain some constraints in the future
+                // won't be a breaking change, so this is good enough for now.
+                return Ok(self.make_ambiguous_response_no_constraints(MaybeCause::Overflow));
+            }
+        };
 
-        let response = Response { var_values: self.var_values, external_constraints, certainty };
         let canonical = Canonicalizer::canonicalize(
             self.infcx,
             CanonicalizeMode::Response { max_input_universe: self.max_input_universe },
@@ -72,6 +90,40 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
         Ok(canonical)
     }
 
+    /// Constructs a totally unconstrained, ambiguous response to a goal.
+    ///
+    /// Take care when using this, since often it's useful to respond with
+    /// ambiguity but return constrained variables to guide inference.
+    pub(in crate::solve) fn make_ambiguous_response_no_constraints(
+        &self,
+        maybe_cause: MaybeCause,
+    ) -> CanonicalResponse<'tcx> {
+        let unconstrained_response = Response {
+            var_values: CanonicalVarValues {
+                var_values: self.tcx().mk_substs_from_iter(self.var_values.var_values.iter().map(
+                    |arg| -> ty::GenericArg<'tcx> {
+                        match arg.unpack() {
+                            GenericArgKind::Lifetime(_) => self.next_region_infer().into(),
+                            GenericArgKind::Type(_) => self.next_ty_infer().into(),
+                            GenericArgKind::Const(ct) => self.next_const_infer(ct.ty()).into(),
+                        }
+                    },
+                )),
+            },
+            external_constraints: self
+                .tcx()
+                .mk_external_constraints(ExternalConstraintsData::default()),
+            certainty: Certainty::Maybe(maybe_cause),
+        };
+
+        Canonicalizer::canonicalize(
+            self.infcx,
+            CanonicalizeMode::Response { max_input_universe: self.max_input_universe },
+            &mut Default::default(),
+            unconstrained_response,
+        )
+    }
+
     #[instrument(level = "debug", skip(self), ret)]
     fn compute_external_query_constraints(&self) -> Result<ExternalConstraints<'tcx>, NoSolution> {
         // Cannot use `take_registered_region_obligations` as we may compute the response
diff --git a/compiler/rustc_trait_selection/src/solve/mod.rs b/compiler/rustc_trait_selection/src/solve/mod.rs
index 19bcbd46144..d94679fef28 100644
--- a/compiler/rustc_trait_selection/src/solve/mod.rs
+++ b/compiler/rustc_trait_selection/src/solve/mod.rs
@@ -340,17 +340,17 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
         if responses.is_empty() {
             return Err(NoSolution);
         }
-        let certainty = responses.iter().fold(Certainty::AMBIGUOUS, |certainty, response| {
-            certainty.unify_with(response.value.certainty)
-        });
-
-        let response = self.evaluate_added_goals_and_make_canonical_response(certainty);
-        if let Ok(response) = response {
-            assert!(response.has_no_inference_or_external_constraints());
-            Ok(response)
-        } else {
-            bug!("failed to make floundered response: {responses:?}");
-        }
+
+        let Certainty::Maybe(maybe_cause) = responses.iter().fold(
+            Certainty::AMBIGUOUS,
+            |certainty, response| {
+                certainty.unify_with(response.value.certainty)
+            },
+        ) else {
+            bug!("expected flounder response to be ambiguous")
+        };
+
+        Ok(self.make_ambiguous_response_no_constraints(maybe_cause))
     }
 }
 
diff --git a/compiler/rustc_transmute/src/lib.rs b/compiler/rustc_transmute/src/lib.rs
index 8be02c1d988..77c0526e3aa 100644
--- a/compiler/rustc_transmute/src/lib.rs
+++ b/compiler/rustc_transmute/src/lib.rs
@@ -62,7 +62,7 @@ mod rustc {
 
     use rustc_hir::lang_items::LangItem;
     use rustc_infer::infer::InferCtxt;
-    use rustc_macros::{TypeFoldable, TypeVisitable};
+    use rustc_macros::TypeVisitable;
     use rustc_middle::traits::ObligationCause;
     use rustc_middle::ty::Const;
     use rustc_middle::ty::ParamEnv;
@@ -70,7 +70,7 @@ mod rustc {
     use rustc_middle::ty::TyCtxt;
 
     /// The source and destination types of a transmutation.
-    #[derive(TypeFoldable, TypeVisitable, Debug, Clone, Copy)]
+    #[derive(TypeVisitable, Debug, Clone, Copy)]
     pub struct Types<'tcx> {
         /// The source type.
         pub src: Ty<'tcx>,
diff --git a/compiler/rustc_type_ir/src/structural_impls.rs b/compiler/rustc_type_ir/src/structural_impls.rs
index 54c1ab5a275..c9675f93f95 100644
--- a/compiler/rustc_type_ir/src/structural_impls.rs
+++ b/compiler/rustc_type_ir/src/structural_impls.rs
@@ -6,11 +6,10 @@ use crate::fold::{FallibleTypeFolder, TypeFoldable};
 use crate::visit::{TypeVisitable, TypeVisitor};
 use crate::Interner;
 use rustc_data_structures::functor::IdFunctor;
+use rustc_data_structures::sync::Lrc;
 use rustc_index::{Idx, IndexVec};
 
 use std::ops::ControlFlow;
-use std::rc::Rc;
-use std::sync::Arc;
 
 ///////////////////////////////////////////////////////////////////////////
 // Atomic structs
@@ -106,25 +105,13 @@ impl<I: Interner, T: TypeVisitable<I>, E: TypeVisitable<I>> TypeVisitable<I> for
     }
 }
 
-impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Rc<T> {
+impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Lrc<T> {
     fn try_fold_with<F: FallibleTypeFolder<I>>(self, folder: &mut F) -> Result<Self, F::Error> {
         self.try_map_id(|value| value.try_fold_with(folder))
     }
 }
 
-impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for Rc<T> {
-    fn visit_with<V: TypeVisitor<I>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        (**self).visit_with(visitor)
-    }
-}
-
-impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Arc<T> {
-    fn try_fold_with<F: FallibleTypeFolder<I>>(self, folder: &mut F) -> Result<Self, F::Error> {
-        self.try_map_id(|value| value.try_fold_with(folder))
-    }
-}
-
-impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for Arc<T> {
+impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for Lrc<T> {
     fn visit_with<V: TypeVisitor<I>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
         (**self).visit_with(visitor)
     }
@@ -154,19 +141,11 @@ impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for Vec<T> {
     }
 }
 
-impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for &[T] {
-    fn visit_with<V: TypeVisitor<I>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        self.iter().try_for_each(|t| t.visit_with(visitor))
-    }
-}
-
-impl<I: Interner, T: TypeFoldable<I>> TypeFoldable<I> for Box<[T]> {
-    fn try_fold_with<F: FallibleTypeFolder<I>>(self, folder: &mut F) -> Result<Self, F::Error> {
-        self.try_map_id(|t| t.try_fold_with(folder))
-    }
-}
+// `TypeFoldable` isn't impl'd for `&[T]`. It doesn't make sense in the general
+// case, because we can't return a new slice. But note that there are a couple
+// of trivial impls of `TypeFoldable` for specific slice types elsewhere.
 
-impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for Box<[T]> {
+impl<I: Interner, T: TypeVisitable<I>> TypeVisitable<I> for &[T] {
     fn visit_with<V: TypeVisitor<I>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
         self.iter().try_for_each(|t| t.visit_with(visitor))
     }
diff --git a/library/alloc/src/collections/binary_heap/mod.rs b/library/alloc/src/collections/binary_heap/mod.rs
index 8aa4d342e6e..2c089bb3149 100644
--- a/library/alloc/src/collections/binary_heap/mod.rs
+++ b/library/alloc/src/collections/binary_heap/mod.rs
@@ -853,7 +853,7 @@ impl<T: Ord> BinaryHeap<T> {
     ///
     /// assert_eq!(heap.into_sorted_vec(), [-10, 2, 4])
     /// ```
-    #[stable(feature = "binary_heap_retain", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "binary_heap_retain", since = "1.70.0")]
     pub fn retain<F>(&mut self, mut f: F)
     where
         F: FnMut(&T) -> bool,
@@ -1463,7 +1463,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T> FusedIterator for IntoIter<T> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T> Default for IntoIter<T> {
     /// Creates an empty `binary_heap::IntoIter`.
     ///
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs
index abd5f17137e..efbbc1c2331 100644
--- a/library/alloc/src/collections/btree/map.rs
+++ b/library/alloc/src/collections/btree/map.rs
@@ -362,7 +362,7 @@ impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for Iter<'_, K, V> {
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<'a, K: 'a, V: 'a> Default for Iter<'a, K, V> {
     /// Creates an empty `btree_map::Iter`.
     ///
@@ -400,7 +400,7 @@ impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IterMut<'_, K, V> {
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<'a, K: 'a, V: 'a> Default for IterMut<'a, K, V> {
     /// Creates an empty `btree_map::IterMut`.
     ///
@@ -448,7 +448,7 @@ impl<K: Debug, V: Debug, A: Allocator + Clone> Debug for IntoIter<K, V, A> {
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<K, V, A> Default for IntoIter<K, V, A>
 where
     A: Allocator + Default + Clone,
@@ -1543,11 +1543,17 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<(&'a K, &'a V)> {
+    fn min(mut self) -> Option<(&'a K, &'a V)>
+    where
+        (&'a K, &'a V): Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<(&'a K, &'a V)> {
+    fn max(mut self) -> Option<(&'a K, &'a V)>
+    where
+        (&'a K, &'a V): Ord,
+    {
         self.next_back()
     }
 }
@@ -1612,11 +1618,17 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<(&'a K, &'a mut V)> {
+    fn min(mut self) -> Option<(&'a K, &'a mut V)>
+    where
+        (&'a K, &'a mut V): Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<(&'a K, &'a mut V)> {
+    fn max(mut self) -> Option<(&'a K, &'a mut V)>
+    where
+        (&'a K, &'a mut V): Ord,
+    {
         self.next_back()
     }
 }
@@ -1779,11 +1791,17 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<&'a K> {
+    fn min(mut self) -> Option<&'a K>
+    where
+        &'a K: Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<&'a K> {
+    fn max(mut self) -> Option<&'a K>
+    where
+        &'a K: Ord,
+    {
         self.next_back()
     }
 }
@@ -1812,7 +1830,7 @@ impl<K, V> Clone for Keys<'_, K, V> {
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<K, V> Default for Keys<'_, K, V> {
     /// Creates an empty `btree_map::Keys`.
     ///
@@ -1867,7 +1885,7 @@ impl<K, V> Clone for Values<'_, K, V> {
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<K, V> Default for Values<'_, K, V> {
     /// Creates an empty `btree_map::Values`.
     ///
@@ -2008,16 +2026,22 @@ impl<'a, K, V> Iterator for Range<'a, K, V> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<(&'a K, &'a V)> {
+    fn min(mut self) -> Option<(&'a K, &'a V)>
+    where
+        (&'a K, &'a V): Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<(&'a K, &'a V)> {
+    fn max(mut self) -> Option<(&'a K, &'a V)>
+    where
+        (&'a K, &'a V): Ord,
+    {
         self.next_back()
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<K, V> Default for Range<'_, K, V> {
     /// Creates an empty `btree_map::Range`.
     ///
@@ -2081,11 +2105,17 @@ impl<K, V, A: Allocator + Clone> Iterator for IntoKeys<K, V, A> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<K> {
+    fn min(mut self) -> Option<K>
+    where
+        K: Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<K> {
+    fn max(mut self) -> Option<K>
+    where
+        K: Ord,
+    {
         self.next_back()
     }
 }
@@ -2107,7 +2137,7 @@ impl<K, V, A: Allocator + Clone> ExactSizeIterator for IntoKeys<K, V, A> {
 #[stable(feature = "map_into_keys_values", since = "1.54.0")]
 impl<K, V, A: Allocator + Clone> FusedIterator for IntoKeys<K, V, A> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<K, V, A> Default for IntoKeys<K, V, A>
 where
     A: Allocator + Default + Clone,
@@ -2158,7 +2188,7 @@ impl<K, V, A: Allocator + Clone> ExactSizeIterator for IntoValues<K, V, A> {
 #[stable(feature = "map_into_keys_values", since = "1.54.0")]
 impl<K, V, A: Allocator + Clone> FusedIterator for IntoValues<K, V, A> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<K, V, A> Default for IntoValues<K, V, A>
 where
     A: Allocator + Default + Clone,
@@ -2204,11 +2234,17 @@ impl<'a, K, V> Iterator for RangeMut<'a, K, V> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<(&'a K, &'a mut V)> {
+    fn min(mut self) -> Option<(&'a K, &'a mut V)>
+    where
+        (&'a K, &'a mut V): Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<(&'a K, &'a mut V)> {
+    fn max(mut self) -> Option<(&'a K, &'a mut V)>
+    where
+        (&'a K, &'a mut V): Ord,
+    {
         self.next_back()
     }
 }
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs
index 232a017314e..940fa30afb8 100644
--- a/library/alloc/src/collections/btree/set.rs
+++ b/library/alloc/src/collections/btree/set.rs
@@ -1501,11 +1501,17 @@ impl<'a, T> Iterator for Iter<'a, T> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<&'a T> {
+    fn min(mut self) -> Option<&'a T>
+    where
+        &'a T: Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<&'a T> {
+    fn max(mut self) -> Option<&'a T>
+    where
+        &'a T: Ord,
+    {
         self.next_back()
     }
 }
@@ -1538,7 +1544,7 @@ impl<T, A: Allocator + Clone> Iterator for IntoIter<T, A> {
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T> Default for Iter<'_, T> {
     /// Creates an empty `btree_set::Iter`.
     ///
@@ -1568,7 +1574,7 @@ impl<T, A: Allocator + Clone> ExactSizeIterator for IntoIter<T, A> {
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T, A: Allocator + Clone> FusedIterator for IntoIter<T, A> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T, A> Default for IntoIter<T, A>
 where
     A: Allocator + Default + Clone,
@@ -1604,11 +1610,17 @@ impl<'a, T> Iterator for Range<'a, T> {
         self.next_back()
     }
 
-    fn min(mut self) -> Option<&'a T> {
+    fn min(mut self) -> Option<&'a T>
+    where
+        &'a T: Ord,
+    {
         self.next()
     }
 
-    fn max(mut self) -> Option<&'a T> {
+    fn max(mut self) -> Option<&'a T>
+    where
+        &'a T: Ord,
+    {
         self.next_back()
     }
 }
@@ -1623,7 +1635,7 @@ impl<'a, T> DoubleEndedIterator for Range<'a, T> {
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T> FusedIterator for Range<'_, T> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T> Default for Range<'_, T> {
     /// Creates an empty `btree_set::Range`.
     ///
diff --git a/library/alloc/src/collections/linked_list.rs b/library/alloc/src/collections/linked_list.rs
index 0cb7e82beb0..4cd34ac2fa7 100644
--- a/library/alloc/src/collections/linked_list.rs
+++ b/library/alloc/src/collections/linked_list.rs
@@ -1137,7 +1137,7 @@ impl<T> ExactSizeIterator for Iter<'_, T> {}
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T> FusedIterator for Iter<'_, T> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T> Default for Iter<'_, T> {
     /// Creates an empty `linked_list::Iter`.
     ///
@@ -1205,7 +1205,7 @@ impl<T> ExactSizeIterator for IterMut<'_, T> {}
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T> FusedIterator for IterMut<'_, T> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T> Default for IterMut<'_, T> {
     fn default() -> Self {
         IterMut { head: None, tail: None, len: 0, marker: Default::default() }
@@ -1915,7 +1915,7 @@ impl<T, A: Allocator> ExactSizeIterator for IntoIter<T, A> {}
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T, A: Allocator> FusedIterator for IntoIter<T, A> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T> Default for IntoIter<T> {
     /// Creates an empty `linked_list::IntoIter`.
     ///
diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs
index 8916b42eda0..896da37f94c 100644
--- a/library/alloc/src/collections/vec_deque/mod.rs
+++ b/library/alloc/src/collections/vec_deque/mod.rs
@@ -2815,7 +2815,7 @@ impl<'a, T: 'a + Copy, A: Allocator> Extend<&'a T> for VecDeque<T, A> {
     }
 
     #[inline]
-    fn extend_one(&mut self, &elem: &T) {
+    fn extend_one(&mut self, &elem: &'a T) {
         self.push_back(elem);
     }
 
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs
index cf93a40496f..ba035fb062a 100644
--- a/library/alloc/src/rc.rs
+++ b/library/alloc/src/rc.rs
@@ -693,7 +693,7 @@ impl<T> Rc<T> {
     /// This is equivalent to `Rc::try_unwrap(this).ok()`. (Note that these are not equivalent for
     /// [`Arc`](crate::sync::Arc), due to race conditions that do not apply to `Rc`.)
     #[inline]
-    #[stable(feature = "rc_into_inner", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "rc_into_inner", since = "1.70.0")]
     pub fn into_inner(this: Self) -> Option<T> {
         Rc::try_unwrap(this).ok()
     }
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs
index 5bfe537bc83..24849d52dbb 100644
--- a/library/alloc/src/sync.rs
+++ b/library/alloc/src/sync.rs
@@ -793,7 +793,7 @@ impl<T> Arc<T> {
     /// y_thread.join().unwrap();
     /// ```
     #[inline]
-    #[stable(feature = "arc_into_inner", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "arc_into_inner", since = "1.70.0")]
     pub fn into_inner(this: Self) -> Option<T> {
         // Make sure that the ordinary `Drop` implementation isn’t called as well
         let mut this = mem::ManuallyDrop::new(this);
diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs
index 02faf8e6389..b2db2fdfd18 100644
--- a/library/alloc/src/vec/into_iter.rs
+++ b/library/alloc/src/vec/into_iter.rs
@@ -342,7 +342,7 @@ impl<T, A: Allocator> FusedIterator for IntoIter<T, A> {}
 #[unstable(feature = "trusted_len", issue = "37572")]
 unsafe impl<T, A: Allocator> TrustedLen for IntoIter<T, A> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<T, A> Default for IntoIter<T, A>
 where
     A: Allocator + Default,
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 98c87b2c393..940558974e6 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -248,7 +248,7 @@ where
 impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N] {
     type Error = TryFromSliceError;
 
-    fn try_from(slice: &[T]) -> Result<&[T; N], TryFromSliceError> {
+    fn try_from(slice: &'a [T]) -> Result<&'a [T; N], TryFromSliceError> {
         if slice.len() == N {
             let ptr = slice.as_ptr() as *const [T; N];
             // SAFETY: ok because we just checked that the length fits
@@ -275,7 +275,7 @@ impl<'a, T, const N: usize> TryFrom<&'a [T]> for &'a [T; N] {
 impl<'a, T, const N: usize> TryFrom<&'a mut [T]> for &'a mut [T; N] {
     type Error = TryFromSliceError;
 
-    fn try_from(slice: &mut [T]) -> Result<&mut [T; N], TryFromSliceError> {
+    fn try_from(slice: &'a mut [T]) -> Result<&'a mut [T; N], TryFromSliceError> {
         if slice.len() == N {
             let ptr = slice.as_mut_ptr() as *mut [T; N];
             // SAFETY: ok because we just checked that the length fits
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index bcca8d924cd..f69a1f94e8f 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -247,7 +247,7 @@ mod once;
 
 #[unstable(feature = "lazy_cell", issue = "109736")]
 pub use lazy::LazyCell;
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 pub use once::OnceCell;
 
 /// A mutable memory location.
diff --git a/library/core/src/cell/once.rs b/library/core/src/cell/once.rs
index a7cd59e50fc..5f06a7b0795 100644
--- a/library/core/src/cell/once.rs
+++ b/library/core/src/cell/once.rs
@@ -29,7 +29,7 @@ use crate::mem;
 /// assert_eq!(value, "Hello, World!");
 /// assert!(cell.get().is_some());
 /// ```
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 pub struct OnceCell<T> {
     // Invariant: written to at most once.
     inner: UnsafeCell<Option<T>>,
@@ -39,8 +39,8 @@ impl<T> OnceCell<T> {
     /// Creates a new empty cell.
     #[inline]
     #[must_use]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
-    #[rustc_const_stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
+    #[rustc_const_stable(feature = "once_cell", since = "1.70.0")]
     pub const fn new() -> OnceCell<T> {
         OnceCell { inner: UnsafeCell::new(None) }
     }
@@ -49,7 +49,7 @@ impl<T> OnceCell<T> {
     ///
     /// Returns `None` if the cell is empty.
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn get(&self) -> Option<&T> {
         // SAFETY: Safe due to `inner`'s invariant
         unsafe { &*self.inner.get() }.as_ref()
@@ -59,7 +59,7 @@ impl<T> OnceCell<T> {
     ///
     /// Returns `None` if the cell is empty.
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn get_mut(&mut self) -> Option<&mut T> {
         self.inner.get_mut().as_mut()
     }
@@ -85,7 +85,7 @@ impl<T> OnceCell<T> {
     /// assert!(cell.get().is_some());
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn set(&self, value: T) -> Result<(), T> {
         // SAFETY: Safe because we cannot have overlapping mutable borrows
         let slot = unsafe { &*self.inner.get() };
@@ -125,7 +125,7 @@ impl<T> OnceCell<T> {
     /// assert_eq!(value, &92);
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn get_or_init<F>(&self, f: F) -> &T
     where
         F: FnOnce() -> T,
@@ -206,7 +206,7 @@ impl<T> OnceCell<T> {
     /// assert_eq!(cell.into_inner(), Some("hello".to_string()));
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn into_inner(self) -> Option<T> {
         // Because `into_inner` takes `self` by value, the compiler statically verifies
         // that it is not currently borrowed. So it is safe to move out `Option<T>`.
@@ -233,13 +233,13 @@ impl<T> OnceCell<T> {
     /// assert_eq!(cell.get(), None);
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn take(&mut self) -> Option<T> {
         mem::take(self).into_inner()
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T> Default for OnceCell<T> {
     #[inline]
     fn default() -> Self {
@@ -247,7 +247,7 @@ impl<T> Default for OnceCell<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: fmt::Debug> fmt::Debug for OnceCell<T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self.get() {
@@ -257,7 +257,7 @@ impl<T: fmt::Debug> fmt::Debug for OnceCell<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: Clone> Clone for OnceCell<T> {
     #[inline]
     fn clone(&self) -> OnceCell<T> {
@@ -272,7 +272,7 @@ impl<T: Clone> Clone for OnceCell<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: PartialEq> PartialEq for OnceCell<T> {
     #[inline]
     fn eq(&self, other: &Self) -> bool {
@@ -280,10 +280,10 @@ impl<T: PartialEq> PartialEq for OnceCell<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: Eq> Eq for OnceCell<T> {}
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T> From<T> for OnceCell<T> {
     /// Creates a new `OnceCell<T>` which already contains the given `value`.
     #[inline]
@@ -293,5 +293,5 @@ impl<T> From<T> for OnceCell<T> {
 }
 
 // Just like for `Cell<T>` this isn't needed, but results in nicer error messages.
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T> !Sync for OnceCell<T> {}
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs
index a901ae72669..e193332f155 100644
--- a/library/core/src/fmt/mod.rs
+++ b/library/core/src/fmt/mod.rs
@@ -251,145 +251,48 @@ impl<'a> Formatter<'a> {
     }
 }
 
-// NB. Argument is essentially an optimized partially applied formatting function,
-// equivalent to `exists T.(&T, fn(&T, &mut Formatter<'_>) -> Result`.
-
-extern "C" {
-    type Opaque;
-}
-
-/// This struct represents the generic "argument" which is taken by the Xprintf
-/// family of functions. It contains a function to format the given value. At
-/// compile time it is ensured that the function and the value have the correct
-/// types, and then this struct is used to canonicalize arguments to one type.
-#[lang = "format_argument"]
+/// This structure represents a safely precompiled version of a format string
+/// and its arguments. This cannot be generated at runtime because it cannot
+/// safely be done, so no constructors are given and the fields are private
+/// to prevent modification.
+///
+/// The [`format_args!`] macro will safely create an instance of this structure.
+/// The macro validates the format string at compile-time so usage of the
+/// [`write()`] and [`format()`] functions can be safely performed.
+///
+/// You can use the `Arguments<'a>` that [`format_args!`] returns in `Debug`
+/// and `Display` contexts as seen below. The example also shows that `Debug`
+/// and `Display` format to the same thing: the interpolated format string
+/// in `format_args!`.
+///
+/// ```rust
+/// let debug = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
+/// let display = format!("{}", format_args!("{} foo {:?}", 1, 2));
+/// assert_eq!("1 foo 2", display);
+/// assert_eq!(display, debug);
+/// ```
+///
+/// [`format()`]: ../../std/fmt/fn.format.html
+#[lang = "format_arguments"]
+#[stable(feature = "rust1", since = "1.0.0")]
 #[derive(Copy, Clone)]
-#[allow(missing_debug_implementations)]
-#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-#[doc(hidden)]
-pub struct ArgumentV1<'a> {
-    value: &'a Opaque,
-    formatter: fn(&Opaque, &mut Formatter<'_>) -> Result,
-}
-
-/// This struct represents the unsafety of constructing an `Arguments`.
-/// It exists, rather than an unsafe function, in order to simplify the expansion
-/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
-#[lang = "format_unsafe_arg"]
-#[allow(missing_debug_implementations)]
-#[doc(hidden)]
-#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-pub struct UnsafeArg {
-    _private: (),
-}
-
-impl UnsafeArg {
-    /// See documentation where `UnsafeArg` is required to know when it is safe to
-    /// create and use `UnsafeArg`.
-    #[doc(hidden)]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-    #[inline(always)]
-    pub unsafe fn new() -> Self {
-        Self { _private: () }
-    }
-}
-
-// This guarantees a single stable value for the function pointer associated with
-// indices/counts in the formatting infrastructure.
-//
-// Note that a function defined as such would not be correct as functions are
-// always tagged unnamed_addr with the current lowering to LLVM IR, so their
-// address is not considered important to LLVM and as such the as_usize cast
-// could have been miscompiled. In practice, we never call as_usize on non-usize
-// containing data (as a matter of static generation of the formatting
-// arguments), so this is merely an additional check.
-//
-// We primarily want to ensure that the function pointer at `USIZE_MARKER` has
-// an address corresponding *only* to functions that also take `&usize` as their
-// first argument. The read_volatile here ensures that we can safely ready out a
-// usize from the passed reference and that this address does not point at a
-// non-usize taking function.
-#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-static USIZE_MARKER: fn(&usize, &mut Formatter<'_>) -> Result = |ptr, _| {
-    // SAFETY: ptr is a reference
-    let _v: usize = unsafe { crate::ptr::read_volatile(ptr) };
-    loop {}
-};
-
-macro_rules! arg_new {
-    ($f: ident, $t: ident) => {
-        #[doc(hidden)]
-        #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-        #[inline]
-        pub fn $f<'b, T: $t>(x: &'b T) -> ArgumentV1<'_> {
-            Self::new(x, $t::fmt)
-        }
-    };
-}
-
-#[rustc_diagnostic_item = "ArgumentV1Methods"]
-impl<'a> ArgumentV1<'a> {
-    #[doc(hidden)]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-    #[inline]
-    pub fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> ArgumentV1<'b> {
-        // SAFETY: `mem::transmute(x)` is safe because
-        //     1. `&'b T` keeps the lifetime it originated with `'b`
-        //              (so as to not have an unbounded lifetime)
-        //     2. `&'b T` and `&'b Opaque` have the same memory layout
-        //              (when `T` is `Sized`, as it is here)
-        // `mem::transmute(f)` is safe since `fn(&T, &mut Formatter<'_>) -> Result`
-        // and `fn(&Opaque, &mut Formatter<'_>) -> Result` have the same ABI
-        // (as long as `T` is `Sized`)
-        unsafe { ArgumentV1 { formatter: mem::transmute(f), value: mem::transmute(x) } }
-    }
-
-    arg_new!(new_display, Display);
-    arg_new!(new_debug, Debug);
-    arg_new!(new_octal, Octal);
-    arg_new!(new_lower_hex, LowerHex);
-    arg_new!(new_upper_hex, UpperHex);
-    arg_new!(new_pointer, Pointer);
-    arg_new!(new_binary, Binary);
-    arg_new!(new_lower_exp, LowerExp);
-    arg_new!(new_upper_exp, UpperExp);
+pub struct Arguments<'a> {
+    // Format string pieces to print.
+    pieces: &'a [&'static str],
 
-    #[doc(hidden)]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-    pub fn from_usize(x: &usize) -> ArgumentV1<'_> {
-        ArgumentV1::new(x, USIZE_MARKER)
-    }
-
-    fn as_usize(&self) -> Option<usize> {
-        // We are type punning a bit here: USIZE_MARKER only takes an &usize but
-        // formatter takes an &Opaque. Rust understandably doesn't think we should compare
-        // the function pointers if they don't have the same signature, so we cast to
-        // usizes to tell it that we just want to compare addresses.
-        if self.formatter as usize == USIZE_MARKER as usize {
-            // SAFETY: The `formatter` field is only set to USIZE_MARKER if
-            // the value is a usize, so this is safe
-            Some(unsafe { *(self.value as *const _ as *const usize) })
-        } else {
-            None
-        }
-    }
-}
+    // Placeholder specs, or `None` if all specs are default (as in "{}{}").
+    fmt: Option<&'a [rt::Placeholder]>,
 
-// flags available in the v1 format of format_args
-#[derive(Copy, Clone)]
-enum FlagV1 {
-    SignPlus,
-    SignMinus,
-    Alternate,
-    SignAwareZeroPad,
-    DebugLowerHex,
-    DebugUpperHex,
+    // Dynamic arguments for interpolation, to be interleaved with string
+    // pieces. (Every argument is preceded by a string piece.)
+    args: &'a [rt::Argument<'a>],
 }
 
+/// Used by the format_args!() macro to create a fmt::Arguments object.
+#[doc(hidden)]
+#[unstable(feature = "fmt_internals", issue = "none")]
 impl<'a> Arguments<'a> {
-    #[doc(hidden)]
     #[inline]
-    #[unstable(feature = "fmt_internals", issue = "none")]
     #[rustc_const_unstable(feature = "const_fmt_arguments_new", issue = "none")]
     pub const fn new_const(pieces: &'a [&'static str]) -> Self {
         if pieces.len() > 1 {
@@ -400,23 +303,8 @@ impl<'a> Arguments<'a> {
 
     /// When using the format_args!() macro, this function is used to generate the
     /// Arguments structure.
-    #[cfg(not(bootstrap))]
-    #[doc(hidden)]
-    #[inline]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-    pub fn new_v1(pieces: &'a [&'static str], args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
-        if pieces.len() < args.len() || pieces.len() > args.len() + 1 {
-            panic!("invalid args");
-        }
-        Arguments { pieces, fmt: None, args }
-    }
-
-    #[cfg(bootstrap)]
-    #[doc(hidden)]
     #[inline]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
-    #[rustc_const_unstable(feature = "const_fmt_arguments_new", issue = "none")]
-    pub const fn new_v1(pieces: &'a [&'static str], args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
+    pub fn new_v1(pieces: &'a [&'static str], args: &'a [rt::Argument<'a>]) -> Arguments<'a> {
         if pieces.len() < args.len() || pieces.len() > args.len() + 1 {
             panic!("invalid args");
         }
@@ -425,19 +313,17 @@ impl<'a> Arguments<'a> {
 
     /// This function is used to specify nonstandard formatting parameters.
     ///
-    /// An `UnsafeArg` is required because the following invariants must be held
+    /// An `rt::UnsafeArg` is required because the following invariants must be held
     /// in order for this function to be safe:
     /// 1. The `pieces` slice must be at least as long as `fmt`.
     /// 2. Every `rt::Placeholder::position` value within `fmt` must be a valid index of `args`.
     /// 3. Every `rt::Count::Param` within `fmt` must contain a valid index of `args`.
-    #[doc(hidden)]
     #[inline]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
     pub fn new_v1_formatted(
         pieces: &'a [&'static str],
-        args: &'a [ArgumentV1<'a>],
+        args: &'a [rt::Argument<'a>],
         fmt: &'a [rt::Placeholder],
-        _unsafe_arg: UnsafeArg,
+        _unsafe_arg: rt::UnsafeArg,
     ) -> Arguments<'a> {
         Arguments { pieces, fmt: Some(fmt), args }
     }
@@ -446,9 +332,7 @@ impl<'a> Arguments<'a> {
     ///
     /// This is intended to be used for setting initial `String` capacity
     /// when using `format!`. Note: this is neither the lower nor upper bound.
-    #[doc(hidden)]
     #[inline]
-    #[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
     pub fn estimated_capacity(&self) -> usize {
         let pieces_length: usize = self.pieces.iter().map(|x| x.len()).sum();
 
@@ -468,43 +352,6 @@ impl<'a> Arguments<'a> {
     }
 }
 
-/// This structure represents a safely precompiled version of a format string
-/// and its arguments. This cannot be generated at runtime because it cannot
-/// safely be done, so no constructors are given and the fields are private
-/// to prevent modification.
-///
-/// The [`format_args!`] macro will safely create an instance of this structure.
-/// The macro validates the format string at compile-time so usage of the
-/// [`write()`] and [`format()`] functions can be safely performed.
-///
-/// You can use the `Arguments<'a>` that [`format_args!`] returns in `Debug`
-/// and `Display` contexts as seen below. The example also shows that `Debug`
-/// and `Display` format to the same thing: the interpolated format string
-/// in `format_args!`.
-///
-/// ```rust
-/// let debug = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
-/// let display = format!("{}", format_args!("{} foo {:?}", 1, 2));
-/// assert_eq!("1 foo 2", display);
-/// assert_eq!(display, debug);
-/// ```
-///
-/// [`format()`]: ../../std/fmt/fn.format.html
-#[lang = "format_arguments"]
-#[stable(feature = "rust1", since = "1.0.0")]
-#[derive(Copy, Clone)]
-pub struct Arguments<'a> {
-    // Format string pieces to print.
-    pieces: &'a [&'static str],
-
-    // Placeholder specs, or `None` if all specs are default (as in "{}{}").
-    fmt: Option<&'a [rt::Placeholder]>,
-
-    // Dynamic arguments for interpolation, to be interleaved with string
-    // pieces. (Every argument is preceded by a string piece.)
-    args: &'a [ArgumentV1<'a>],
-}
-
 impl<'a> Arguments<'a> {
     /// Get the formatted string, if it has no arguments to be formatted at runtime.
     ///
@@ -1244,7 +1091,7 @@ pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result {
                 if !piece.is_empty() {
                     formatter.buf.write_str(*piece)?;
                 }
-                (arg.formatter)(arg.value, &mut formatter)?;
+                arg.fmt(&mut formatter)?;
                 idx += 1;
             }
         }
@@ -1274,7 +1121,7 @@ pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result {
     Ok(())
 }
 
-unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Placeholder, args: &[ArgumentV1<'_>]) -> Result {
+unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Placeholder, args: &[rt::Argument<'_>]) -> Result {
     fmt.fill = arg.fill;
     fmt.align = arg.align;
     fmt.flags = arg.flags;
@@ -1292,10 +1139,10 @@ unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Placeholder, args: &[ArgumentV1
     let value = unsafe { args.get_unchecked(arg.position) };
 
     // Then actually do some printing
-    (value.formatter)(value.value, fmt)
+    value.fmt(fmt)
 }
 
-unsafe fn getcount(args: &[ArgumentV1<'_>], cnt: &rt::Count) -> Option<usize> {
+unsafe fn getcount(args: &[rt::Argument<'_>], cnt: &rt::Count) -> Option<usize> {
     match *cnt {
         rt::Count::Is(n) => Some(n),
         rt::Count::Implied => None,
@@ -1878,7 +1725,7 @@ impl<'a> Formatter<'a> {
     #[must_use]
     #[stable(feature = "fmt_flags", since = "1.5.0")]
     pub fn sign_plus(&self) -> bool {
-        self.flags & (1 << FlagV1::SignPlus as u32) != 0
+        self.flags & (1 << rt::Flag::SignPlus as u32) != 0
     }
 
     /// Determines if the `-` flag was specified.
@@ -1907,7 +1754,7 @@ impl<'a> Formatter<'a> {
     #[must_use]
     #[stable(feature = "fmt_flags", since = "1.5.0")]
     pub fn sign_minus(&self) -> bool {
-        self.flags & (1 << FlagV1::SignMinus as u32) != 0
+        self.flags & (1 << rt::Flag::SignMinus as u32) != 0
     }
 
     /// Determines if the `#` flag was specified.
@@ -1935,7 +1782,7 @@ impl<'a> Formatter<'a> {
     #[must_use]
     #[stable(feature = "fmt_flags", since = "1.5.0")]
     pub fn alternate(&self) -> bool {
-        self.flags & (1 << FlagV1::Alternate as u32) != 0
+        self.flags & (1 << rt::Flag::Alternate as u32) != 0
     }
 
     /// Determines if the `0` flag was specified.
@@ -1961,17 +1808,17 @@ impl<'a> Formatter<'a> {
     #[must_use]
     #[stable(feature = "fmt_flags", since = "1.5.0")]
     pub fn sign_aware_zero_pad(&self) -> bool {
-        self.flags & (1 << FlagV1::SignAwareZeroPad as u32) != 0
+        self.flags & (1 << rt::Flag::SignAwareZeroPad as u32) != 0
     }
 
     // FIXME: Decide what public API we want for these two flags.
     // https://github.com/rust-lang/rust/issues/48584
     fn debug_lower_hex(&self) -> bool {
-        self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0
+        self.flags & (1 << rt::Flag::DebugLowerHex as u32) != 0
     }
 
     fn debug_upper_hex(&self) -> bool {
-        self.flags & (1 << FlagV1::DebugUpperHex as u32) != 0
+        self.flags & (1 << rt::Flag::DebugUpperHex as u32) != 0
     }
 
     /// Creates a [`DebugStruct`] builder designed to assist with creation of
@@ -2531,13 +2378,13 @@ pub(crate) fn pointer_fmt_inner(ptr_addr: usize, f: &mut Formatter<'_>) -> Resul
     // or not to zero extend, and then unconditionally set it to get the
     // prefix.
     if f.alternate() {
-        f.flags |= 1 << (FlagV1::SignAwareZeroPad as u32);
+        f.flags |= 1 << (rt::Flag::SignAwareZeroPad as u32);
 
         if f.width.is_none() {
             f.width = Some((usize::BITS / 4) as usize + 2);
         }
     }
-    f.flags |= 1 << (FlagV1::Alternate as u32);
+    f.flags |= 1 << (rt::Flag::Alternate as u32);
 
     let ret = LowerHex::fmt(&ptr_addr, f);
 
diff --git a/library/core/src/fmt/rt.rs b/library/core/src/fmt/rt.rs
index 2c1a767691b..0596f6c30ce 100644
--- a/library/core/src/fmt/rt.rs
+++ b/library/core/src/fmt/rt.rs
@@ -3,6 +3,8 @@
 
 //! These are the lang items used by format_args!().
 
+use super::*;
+
 #[lang = "format_placeholder"]
 #[derive(Copy, Clone)]
 pub struct Placeholder {
@@ -28,21 +30,17 @@ impl Placeholder {
     }
 }
 
-/// Possible alignments that can be requested as part of a formatting directive.
 #[lang = "format_alignment"]
 #[derive(Copy, Clone, PartialEq, Eq)]
 pub enum Alignment {
-    /// Indication that contents should be left-aligned.
     Left,
-    /// Indication that contents should be right-aligned.
     Right,
-    /// Indication that contents should be center-aligned.
     Center,
-    /// No alignment was requested.
     Unknown,
 }
 
-/// Used by [width](https://doc.rust-lang.org/std/fmt/#width) and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
+/// Used by [width](https://doc.rust-lang.org/std/fmt/#width)
+/// and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
 #[lang = "format_count"]
 #[derive(Copy, Clone)]
 pub enum Count {
@@ -53,3 +51,147 @@ pub enum Count {
     /// Not specified
     Implied,
 }
+
+// This needs to match the order of flags in compiler/rustc_ast_lowering/src/format.rs.
+#[derive(Copy, Clone)]
+pub(super) enum Flag {
+    SignPlus,
+    SignMinus,
+    Alternate,
+    SignAwareZeroPad,
+    DebugLowerHex,
+    DebugUpperHex,
+}
+
+/// This struct represents the generic "argument" which is taken by format_args!().
+/// It contains a function to format the given value. At compile time it is ensured that the
+/// function and the value have the correct types, and then this struct is used to canonicalize
+/// arguments to one type.
+///
+/// Argument is essentially an optimized partially applied formatting function,
+/// equivalent to `exists T.(&T, fn(&T, &mut Formatter<'_>) -> Result`.
+#[lang = "format_argument"]
+#[derive(Copy, Clone)]
+pub struct Argument<'a> {
+    value: &'a Opaque,
+    formatter: fn(&Opaque, &mut Formatter<'_>) -> Result,
+}
+
+#[rustc_diagnostic_item = "ArgumentMethods"]
+impl<'a> Argument<'a> {
+    #[inline(always)]
+    fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> Argument<'b> {
+        // SAFETY: `mem::transmute(x)` is safe because
+        //     1. `&'b T` keeps the lifetime it originated with `'b`
+        //              (so as to not have an unbounded lifetime)
+        //     2. `&'b T` and `&'b Opaque` have the same memory layout
+        //              (when `T` is `Sized`, as it is here)
+        // `mem::transmute(f)` is safe since `fn(&T, &mut Formatter<'_>) -> Result`
+        // and `fn(&Opaque, &mut Formatter<'_>) -> Result` have the same ABI
+        // (as long as `T` is `Sized`)
+        unsafe { Argument { formatter: mem::transmute(f), value: mem::transmute(x) } }
+    }
+
+    #[inline(always)]
+    pub fn new_display<'b, T: Display>(x: &'b T) -> Argument<'_> {
+        Self::new(x, Display::fmt)
+    }
+    #[inline(always)]
+    pub fn new_debug<'b, T: Debug>(x: &'b T) -> Argument<'_> {
+        Self::new(x, Debug::fmt)
+    }
+    #[inline(always)]
+    pub fn new_octal<'b, T: Octal>(x: &'b T) -> Argument<'_> {
+        Self::new(x, Octal::fmt)
+    }
+    #[inline(always)]
+    pub fn new_lower_hex<'b, T: LowerHex>(x: &'b T) -> Argument<'_> {
+        Self::new(x, LowerHex::fmt)
+    }
+    #[inline(always)]
+    pub fn new_upper_hex<'b, T: UpperHex>(x: &'b T) -> Argument<'_> {
+        Self::new(x, UpperHex::fmt)
+    }
+    #[inline(always)]
+    pub fn new_pointer<'b, T: Pointer>(x: &'b T) -> Argument<'_> {
+        Self::new(x, Pointer::fmt)
+    }
+    #[inline(always)]
+    pub fn new_binary<'b, T: Binary>(x: &'b T) -> Argument<'_> {
+        Self::new(x, Binary::fmt)
+    }
+    #[inline(always)]
+    pub fn new_lower_exp<'b, T: LowerExp>(x: &'b T) -> Argument<'_> {
+        Self::new(x, LowerExp::fmt)
+    }
+    #[inline(always)]
+    pub fn new_upper_exp<'b, T: UpperExp>(x: &'b T) -> Argument<'_> {
+        Self::new(x, UpperExp::fmt)
+    }
+    #[inline(always)]
+    pub fn from_usize(x: &usize) -> Argument<'_> {
+        Self::new(x, USIZE_MARKER)
+    }
+
+    #[inline(always)]
+    pub(super) fn fmt(&self, f: &mut Formatter<'_>) -> Result {
+        (self.formatter)(self.value, f)
+    }
+
+    #[inline(always)]
+    pub(super) fn as_usize(&self) -> Option<usize> {
+        // We are type punning a bit here: USIZE_MARKER only takes an &usize but
+        // formatter takes an &Opaque. Rust understandably doesn't think we should compare
+        // the function pointers if they don't have the same signature, so we cast to
+        // usizes to tell it that we just want to compare addresses.
+        if self.formatter as usize == USIZE_MARKER as usize {
+            // SAFETY: The `formatter` field is only set to USIZE_MARKER if
+            // the value is a usize, so this is safe
+            Some(unsafe { *(self.value as *const _ as *const usize) })
+        } else {
+            None
+        }
+    }
+}
+
+/// This struct represents the unsafety of constructing an `Arguments`.
+/// It exists, rather than an unsafe function, in order to simplify the expansion
+/// of `format_args!(..)` and reduce the scope of the `unsafe` block.
+#[lang = "format_unsafe_arg"]
+pub struct UnsafeArg {
+    _private: (),
+}
+
+impl UnsafeArg {
+    /// See documentation where `UnsafeArg` is required to know when it is safe to
+    /// create and use `UnsafeArg`.
+    #[inline(always)]
+    pub unsafe fn new() -> Self {
+        Self { _private: () }
+    }
+}
+
+extern "C" {
+    type Opaque;
+}
+
+// This guarantees a single stable value for the function pointer associated with
+// indices/counts in the formatting infrastructure.
+//
+// Note that a function defined as such would not be correct as functions are
+// always tagged unnamed_addr with the current lowering to LLVM IR, so their
+// address is not considered important to LLVM and as such the as_usize cast
+// could have been miscompiled. In practice, we never call as_usize on non-usize
+// containing data (as a matter of static generation of the formatting
+// arguments), so this is merely an additional check.
+//
+// We primarily want to ensure that the function pointer at `USIZE_MARKER` has
+// an address corresponding *only* to functions that also take `&usize` as their
+// first argument. The read_volatile here ensures that we can safely ready out a
+// usize from the passed reference and that this address does not point at a
+// non-usize taking function.
+static USIZE_MARKER: fn(&usize, &mut Formatter<'_>) -> Result = |ptr, _| {
+    // SAFETY: ptr is a reference
+    let _v: usize = unsafe { crate::ptr::read_volatile(ptr) };
+    loop {}
+};
diff --git a/library/core/src/future/mod.rs b/library/core/src/future/mod.rs
index 04f02d47f92..7a8d0cacdec 100644
--- a/library/core/src/future/mod.rs
+++ b/library/core/src/future/mod.rs
@@ -70,7 +70,6 @@ pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
 #[doc(hidden)]
 #[unstable(feature = "gen_future", issue = "50547")]
 #[inline]
-#[cfg_attr(bootstrap, lang = "identity_future")]
 pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
     f
 }
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs
index 741f20cf4c7..79bd0bbb0c1 100644
--- a/library/core/src/intrinsics.rs
+++ b/library/core/src/intrinsics.rs
@@ -1413,6 +1413,10 @@ extern "rust-intrinsic" {
     /// This is implemented as an intrinsic to avoid converting to and from an
     /// integer, since the conversion would throw away aliasing information.
     ///
+    /// This can only be used with `Ptr` as a raw pointer type (`*mut` or `*const`)
+    /// to a `Sized` pointee and with `Delta` as `usize` or `isize`.  Any other
+    /// instantiations may arbitrarily misbehave, and that's *not* a compiler bug.
+    ///
     /// # Safety
     ///
     /// Both the starting and resulting pointer must be either in bounds or one
@@ -1421,6 +1425,14 @@ extern "rust-intrinsic" {
     /// returned value will result in undefined behavior.
     ///
     /// The stabilized version of this intrinsic is [`pointer::offset`].
+    #[cfg(not(bootstrap))]
+    #[must_use = "returns a new pointer rather than modifying its argument"]
+    #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
+    #[rustc_nounwind]
+    pub fn offset<Ptr, Delta>(dst: Ptr, offset: Delta) -> Ptr;
+
+    /// The bootstrap version of this is more restricted.
+    #[cfg(bootstrap)]
     #[must_use = "returns a new pointer rather than modifying its argument"]
     #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
     #[rustc_nounwind]
@@ -1811,14 +1823,12 @@ extern "rust-intrinsic" {
     /// with an even least significant digit.
     ///
     /// This intrinsic does not have a stable counterpart.
-    #[cfg(not(bootstrap))]
     #[rustc_nounwind]
     pub fn roundevenf32(x: f32) -> f32;
     /// Returns the nearest integer to an `f64`. Rounds half-way cases to the number
     /// with an even least significant digit.
     ///
     /// This intrinsic does not have a stable counterpart.
-    #[cfg(not(bootstrap))]
     #[rustc_nounwind]
     pub fn roundevenf64(x: f64) -> f64;
 
@@ -2250,7 +2260,6 @@ extern "rust-intrinsic" {
     /// This intrinsic can *only* be called where the argument is a local without
     /// projections (`read_via_copy(p)`, not `read_via_copy(*p)`) so that it
     /// trivially obeys runtime-MIR rules about derefs in operands.
-    #[cfg(not(bootstrap))]
     #[rustc_const_unstable(feature = "const_ptr_read", issue = "80377")]
     #[rustc_nounwind]
     pub fn read_via_copy<T>(p: *const T) -> T;
@@ -2458,7 +2467,6 @@ extern "rust-intrinsic" {
     /// This method creates a pointer to any `Some` value. If the argument is
     /// `None`, an invalid within-bounds pointer (that is still acceptable for
     /// constructing an empty slice) is returned.
-    #[cfg(not(bootstrap))]
     #[rustc_nounwind]
     pub fn option_payload_ptr<T>(arg: *const Option<T>) -> *const T;
 }
diff --git a/library/core/src/iter/adapters/chain.rs b/library/core/src/iter/adapters/chain.rs
index 2046b70c9c6..75727c3a240 100644
--- a/library/core/src/iter/adapters/chain.rs
+++ b/library/core/src/iter/adapters/chain.rs
@@ -273,7 +273,7 @@ where
 {
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<A: Default, B: Default> Default for Chain<A, B> {
     /// Creates a `Chain` from the default values for `A` and `B`.
     ///
diff --git a/library/core/src/iter/adapters/cloned.rs b/library/core/src/iter/adapters/cloned.rs
index bb7e1660c6e..d3cceb8d4ad 100644
--- a/library/core/src/iter/adapters/cloned.rs
+++ b/library/core/src/iter/adapters/cloned.rs
@@ -154,7 +154,7 @@ where
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<I: Default> Default for Cloned<I> {
     /// Creates a `Cloned` iterator from the default value of `I`
     /// ```
diff --git a/library/core/src/iter/adapters/copied.rs b/library/core/src/iter/adapters/copied.rs
index 2289025d0a7..8f6b2904eae 100644
--- a/library/core/src/iter/adapters/copied.rs
+++ b/library/core/src/iter/adapters/copied.rs
@@ -242,7 +242,7 @@ where
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<I: Default> Default for Copied<I> {
     /// Creates a `Copied` iterator from the default value of `I`
     /// ```
diff --git a/library/core/src/iter/adapters/enumerate.rs b/library/core/src/iter/adapters/enumerate.rs
index 479ea6d83c7..00c1c377bf9 100644
--- a/library/core/src/iter/adapters/enumerate.rs
+++ b/library/core/src/iter/adapters/enumerate.rs
@@ -263,7 +263,7 @@ where
 #[unstable(issue = "none", feature = "inplace_iteration")]
 unsafe impl<I: InPlaceIterable> InPlaceIterable for Enumerate<I> {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<I: Default> Default for Enumerate<I> {
     /// Creates an `Enumerate` iterator from the default value of `I`
     /// ```
diff --git a/library/core/src/iter/adapters/flatten.rs b/library/core/src/iter/adapters/flatten.rs
index 7217e8f2a8e..520ec9abcf0 100644
--- a/library/core/src/iter/adapters/flatten.rs
+++ b/library/core/src/iter/adapters/flatten.rs
@@ -289,7 +289,7 @@ where
 {
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<I> Default for Flatten<I>
 where
     I: Default + Iterator<Item: IntoIterator>,
diff --git a/library/core/src/iter/adapters/fuse.rs b/library/core/src/iter/adapters/fuse.rs
index de91c188eeb..b1fa4f92117 100644
--- a/library/core/src/iter/adapters/fuse.rs
+++ b/library/core/src/iter/adapters/fuse.rs
@@ -181,7 +181,7 @@ where
     }
 }
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<I: Default> Default for Fuse<I> {
     /// Creates a `Fuse` iterator from the default value of `I`.
     ///
diff --git a/library/core/src/iter/adapters/rev.rs b/library/core/src/iter/adapters/rev.rs
index 1d882087f69..4aaf7c61f50 100644
--- a/library/core/src/iter/adapters/rev.rs
+++ b/library/core/src/iter/adapters/rev.rs
@@ -137,7 +137,7 @@ impl<I> FusedIterator for Rev<I> where I: FusedIterator + DoubleEndedIterator {}
 #[unstable(feature = "trusted_len", issue = "37572")]
 unsafe impl<I> TrustedLen for Rev<I> where I: TrustedLen + DoubleEndedIterator {}
 
-#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "default_iters", since = "1.70.0")]
 impl<I: Default> Default for Rev<I> {
     /// Creates a `Rev` iterator from the default value of `I`
     /// ```
diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs
index 37db074293d..0171d89812f 100644
--- a/library/core/src/iter/range.rs
+++ b/library/core/src/iter/range.rs
@@ -732,12 +732,18 @@ impl<A: Step> Iterator for ops::Range<A> {
     }
 
     #[inline]
-    fn min(mut self) -> Option<A> {
+    fn min(mut self) -> Option<A>
+    where
+        A: Ord,
+    {
         self.next()
     }
 
     #[inline]
-    fn max(mut self) -> Option<A> {
+    fn max(mut self) -> Option<A>
+    where
+        A: Ord,
+    {
         self.next_back()
     }
 
@@ -1158,12 +1164,18 @@ impl<A: Step> Iterator for ops::RangeInclusive<A> {
     }
 
     #[inline]
-    fn min(mut self) -> Option<A> {
+    fn min(mut self) -> Option<A>
+    where
+        A: Ord,
+    {
         self.next()
     }
 
     #[inline]
-    fn max(mut self) -> Option<A> {
+    fn max(mut self) -> Option<A>
+    where
+        A: Ord,
+    {
         self.next_back()
     }
 
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs
index e85c0c0a688..40789cb3049 100644
--- a/library/core/src/marker.rs
+++ b/library/core/src/marker.rs
@@ -929,7 +929,6 @@ mod copy_impls {
     reason = "internal trait for implementing various traits for all function pointers"
 )]
 #[lang = "fn_ptr_trait"]
-#[cfg(not(bootstrap))]
 #[rustc_deny_explicit_impl]
 pub trait FnPtr: Copy + Clone {
     /// Returns the address of the function pointer.
diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs
index fc9b07d29e2..b80bfe1c92d 100644
--- a/library/core/src/num/nonzero.rs
+++ b/library/core/src/num/nonzero.rs
@@ -1162,7 +1162,7 @@ macro_rules! nonzero_min_max_unsigned {
                 #[doc = concat!("# use std::num::", stringify!($Ty), ";")]
                 #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), 1", stringify!($Int), ");")]
                 /// ```
-                #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
+                #[stable(feature = "nonzero_min_max", since = "1.70.0")]
                 pub const MIN: Self = Self::new(1).unwrap();
 
                 /// The largest value that can be represented by this non-zero
@@ -1175,7 +1175,7 @@ macro_rules! nonzero_min_max_unsigned {
                 #[doc = concat!("# use std::num::", stringify!($Ty), ";")]
                 #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")]
                 /// ```
-                #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
+                #[stable(feature = "nonzero_min_max", since = "1.70.0")]
                 pub const MAX: Self = Self::new(<$Int>::MAX).unwrap();
             }
         )+
@@ -1200,7 +1200,7 @@ macro_rules! nonzero_min_max_signed {
                 #[doc = concat!("# use std::num::", stringify!($Ty), ";")]
                 #[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), ", stringify!($Int), "::MIN);")]
                 /// ```
-                #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
+                #[stable(feature = "nonzero_min_max", since = "1.70.0")]
                 pub const MIN: Self = Self::new(<$Int>::MIN).unwrap();
 
                 /// The largest value that can be represented by this non-zero
@@ -1217,7 +1217,7 @@ macro_rules! nonzero_min_max_signed {
                 #[doc = concat!("# use std::num::", stringify!($Ty), ";")]
                 #[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")]
                 /// ```
-                #[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
+                #[stable(feature = "nonzero_min_max", since = "1.70.0")]
                 pub const MAX: Self = Self::new(<$Int>::MAX).unwrap();
             }
         )+
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index 82e7e69215e..73ffc3f36ca 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -558,7 +558,7 @@ use crate::{
 /// The `Option` type. See [the module level documentation](self) for more.
 #[derive(Copy, PartialOrd, Eq, Ord, Debug, Hash)]
 #[rustc_diagnostic_item = "Option"]
-#[cfg_attr(not(bootstrap), lang = "Option")]
+#[lang = "Option"]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub enum Option<T> {
     /// No value.
@@ -615,7 +615,7 @@ impl<T> Option<T> {
     /// ```
     #[must_use]
     #[inline]
-    #[stable(feature = "is_some_and", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "is_some_and", since = "1.70.0")]
     pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool {
         match self {
             None => false,
@@ -765,13 +765,6 @@ impl<T> Option<T> {
     #[must_use]
     #[unstable(feature = "option_as_slice", issue = "108545")]
     pub fn as_slice(&self) -> &[T] {
-        #[cfg(bootstrap)]
-        match self {
-            Some(value) => slice::from_ref(value),
-            None => &[],
-        }
-
-        #[cfg(not(bootstrap))]
         // SAFETY: When the `Option` is `Some`, we're using the actual pointer
         // to the payload, with a length of 1, so this is equivalent to
         // `slice::from_ref`, and thus is safe.
@@ -832,13 +825,6 @@ impl<T> Option<T> {
     #[must_use]
     #[unstable(feature = "option_as_slice", issue = "108545")]
     pub fn as_mut_slice(&mut self) -> &mut [T] {
-        #[cfg(bootstrap)]
-        match self {
-            Some(value) => slice::from_mut(value),
-            None => &mut [],
-        }
-
-        #[cfg(not(bootstrap))]
         // SAFETY: When the `Option` is `Some`, we're using the actual pointer
         // to the payload, with a length of 1, so this is equivalent to
         // `slice::from_mut`, and thus is safe.
diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs
index efeb726ab8e..81be3fb22ee 100644
--- a/library/core/src/panicking.rs
+++ b/library/core/src/panicking.rs
@@ -165,7 +165,7 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
 #[cold]
 #[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))]
 #[track_caller]
-#[cfg_attr(not(bootstrap), lang = "panic_misaligned_pointer_dereference")] // needed by codegen for panic on misaligned pointer deref
+#[lang = "panic_misaligned_pointer_dereference"] // needed by codegen for panic on misaligned pointer deref
 fn panic_misaligned_pointer_dereference(required: usize, found: usize) -> ! {
     if cfg!(feature = "panic_immediate_abort") {
         super::intrinsics::abort()
diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs
index 3df990e5dd9..08ffc407ead 100644
--- a/library/core/src/primitive_docs.rs
+++ b/library/core/src/primitive_docs.rs
@@ -1,8 +1,7 @@
 // `library/{std,core}/src/primitive_docs.rs` should have the same contents.
 // These are different files so that relative links work properly without
 // having to have `CARGO_PKG_NAME` set, but conceptually they should always be the same.
-#[cfg_attr(bootstrap, doc(primitive = "bool"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "bool")]
+#[rustc_doc_primitive = "bool"]
 #[doc(alias = "true")]
 #[doc(alias = "false")]
 /// The boolean type.
@@ -64,8 +63,7 @@
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_bool {}
 
-#[cfg_attr(bootstrap, doc(primitive = "never"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "never")]
+#[rustc_doc_primitive = "never"]
 #[doc(alias = "!")]
 //
 /// The `!` type, also called "never".
@@ -276,8 +274,7 @@ mod prim_bool {}
 #[unstable(feature = "never_type", issue = "35121")]
 mod prim_never {}
 
-#[cfg_attr(bootstrap, doc(primitive = "char"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "char")]
+#[rustc_doc_primitive = "char"]
 #[allow(rustdoc::invalid_rust_codeblocks)]
 /// A character type.
 ///
@@ -401,8 +398,7 @@ mod prim_never {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_char {}
 
-#[cfg_attr(bootstrap, doc(primitive = "unit"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "unit")]
+#[rustc_doc_primitive = "unit"]
 #[doc(alias = "(")]
 #[doc(alias = ")")]
 #[doc(alias = "()")]
@@ -464,8 +460,7 @@ impl Copy for () {
     // empty
 }
 
-#[cfg_attr(bootstrap, doc(primitive = "pointer"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "pointer")]
+#[rustc_doc_primitive = "pointer"]
 #[doc(alias = "ptr")]
 #[doc(alias = "*")]
 #[doc(alias = "*const")]
@@ -581,8 +576,7 @@ impl Copy for () {
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_pointer {}
 
-#[cfg_attr(bootstrap, doc(primitive = "array"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "array")]
+#[rustc_doc_primitive = "array"]
 #[doc(alias = "[]")]
 #[doc(alias = "[T;N]")] // unfortunately, rustdoc doesn't have fuzzy search for aliases
 #[doc(alias = "[T; N]")]
@@ -783,8 +777,7 @@ mod prim_pointer {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_array {}
 
-#[cfg_attr(bootstrap, doc(primitive = "slice"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "slice")]
+#[rustc_doc_primitive = "slice"]
 #[doc(alias = "[")]
 #[doc(alias = "]")]
 #[doc(alias = "[]")]
@@ -876,8 +869,7 @@ mod prim_array {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_slice {}
 
-#[cfg_attr(bootstrap, doc(primitive = "str"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "str")]
+#[rustc_doc_primitive = "str"]
 /// String slices.
 ///
 /// *[See also the `std::str` module](crate::str).*
@@ -944,8 +936,7 @@ mod prim_slice {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_str {}
 
-#[cfg_attr(bootstrap, doc(primitive = "tuple"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "tuple")]
+#[rustc_doc_primitive = "tuple"]
 #[doc(alias = "(")]
 #[doc(alias = ")")]
 #[doc(alias = "()")]
@@ -1088,8 +1079,7 @@ impl<T: Copy> Copy for (T,) {
     // empty
 }
 
-#[cfg_attr(bootstrap, doc(primitive = "f32"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f32")]
+#[rustc_doc_primitive = "f32"]
 /// A 32-bit floating point type (specifically, the "binary32" type defined in IEEE 754-2008).
 ///
 /// This type can represent a wide range of decimal numbers, like `3.5`, `27`,
@@ -1155,8 +1145,7 @@ impl<T: Copy> Copy for (T,) {
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_f32 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "f64"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f64")]
+#[rustc_doc_primitive = "f64"]
 /// A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008).
 ///
 /// This type is very similar to [`f32`], but has increased
@@ -1171,78 +1160,67 @@ mod prim_f32 {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_f64 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i8"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i8")]
+#[rustc_doc_primitive = "i8"]
 //
 /// The 8-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i8 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i16"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i16")]
+#[rustc_doc_primitive = "i16"]
 //
 /// The 16-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i16 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i32"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i32")]
+#[rustc_doc_primitive = "i32"]
 //
 /// The 32-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i32 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i64"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i64")]
+#[rustc_doc_primitive = "i64"]
 //
 /// The 64-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i64 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i128"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i128")]
+#[rustc_doc_primitive = "i128"]
 //
 /// The 128-bit signed integer type.
 #[stable(feature = "i128", since = "1.26.0")]
 mod prim_i128 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u8"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u8")]
+#[rustc_doc_primitive = "u8"]
 //
 /// The 8-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u8 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u16"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u16")]
+#[rustc_doc_primitive = "u16"]
 //
 /// The 16-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u16 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u32"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u32")]
+#[rustc_doc_primitive = "u32"]
 //
 /// The 32-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u32 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u64"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u64")]
+#[rustc_doc_primitive = "u64"]
 //
 /// The 64-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u64 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u128"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u128")]
+#[rustc_doc_primitive = "u128"]
 //
 /// The 128-bit unsigned integer type.
 #[stable(feature = "i128", since = "1.26.0")]
 mod prim_u128 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "isize"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "isize")]
+#[rustc_doc_primitive = "isize"]
 //
 /// The pointer-sized signed integer type.
 ///
@@ -1252,8 +1230,7 @@ mod prim_u128 {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_isize {}
 
-#[cfg_attr(bootstrap, doc(primitive = "usize"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "usize")]
+#[rustc_doc_primitive = "usize"]
 //
 /// The pointer-sized unsigned integer type.
 ///
@@ -1263,8 +1240,7 @@ mod prim_isize {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_usize {}
 
-#[cfg_attr(bootstrap, doc(primitive = "reference"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "reference")]
+#[rustc_doc_primitive = "reference"]
 #[doc(alias = "&")]
 #[doc(alias = "&mut")]
 //
@@ -1396,8 +1372,7 @@ mod prim_usize {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_ref {}
 
-#[cfg_attr(bootstrap, doc(primitive = "fn"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "fn")]
+#[rustc_doc_primitive = "fn"]
 //
 /// Function pointers, like `fn(usize) -> bool`.
 ///
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs
index 6b18f5f5a40..585b648873a 100644
--- a/library/core/src/ptr/const_ptr.rs
+++ b/library/core/src/ptr/const_ptr.rs
@@ -916,8 +916,16 @@ impl<T: ?Sized> *const T {
     where
         T: Sized,
     {
+        #[cfg(bootstrap)]
         // SAFETY: the caller must uphold the safety contract for `offset`.
-        unsafe { self.offset(count as isize) }
+        unsafe {
+            self.offset(count as isize)
+        }
+        #[cfg(not(bootstrap))]
+        // SAFETY: the caller must uphold the safety contract for `offset`.
+        unsafe {
+            intrinsics::offset(self, count)
+        }
     }
 
     /// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`).
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs
index 675bc8245d8..13e546497f2 100644
--- a/library/core/src/ptr/mod.rs
+++ b/library/core/src/ptr/mod.rs
@@ -374,6 +374,7 @@ use crate::hash;
 use crate::intrinsics::{
     self, assert_unsafe_precondition, is_aligned_and_not_null, is_nonoverlapping,
 };
+use crate::marker::FnPtr;
 
 use crate::mem::{self, MaybeUninit};
 
@@ -1167,26 +1168,7 @@ pub const unsafe fn read<T>(src: *const T) -> T {
             "ptr::read requires that the pointer argument is aligned and non-null",
             [T](src: *const T) => is_aligned_and_not_null(src)
         );
-
-        #[cfg(bootstrap)]
-        {
-            // We are calling the intrinsics directly to avoid function calls in the
-            // generated code as `intrinsics::copy_nonoverlapping` is a wrapper function.
-            extern "rust-intrinsic" {
-                #[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
-                fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
-            }
-
-            // `src` cannot overlap `tmp` because `tmp` was just allocated on
-            // the stack as a separate allocated object.
-            let mut tmp = MaybeUninit::<T>::uninit();
-            copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
-            tmp.assume_init()
-        }
-        #[cfg(not(bootstrap))]
-        {
-            crate::intrinsics::read_via_copy(src)
-        }
+        crate::intrinsics::read_via_copy(src)
     }
 }
 
@@ -1897,205 +1879,52 @@ pub fn hash<T: ?Sized, S: hash::Hasher>(hashee: *const T, into: &mut S) {
     hashee.hash(into);
 }
 
-#[cfg(bootstrap)]
-mod old_fn_ptr_impl {
-    use super::*;
-    // If this is a unary fn pointer, it adds a doc comment.
-    // Otherwise, it hides the docs entirely.
-    macro_rules! maybe_fnptr_doc {
-        (@ #[$meta:meta] $item:item) => {
-            #[doc(hidden)]
-            #[$meta]
-            $item
-        };
-        ($a:ident @ #[$meta:meta] $item:item) => {
-            #[doc(fake_variadic)]
-            #[doc = "This trait is implemented for function pointers with up to twelve arguments."]
-            #[$meta]
-            $item
-        };
-        ($a:ident $($rest_a:ident)+ @ #[$meta:meta] $item:item) => {
-            #[doc(hidden)]
-            #[$meta]
-            $item
-        };
-    }
-
-    // FIXME(strict_provenance_magic): function pointers have buggy codegen that
-    // necessitates casting to a usize to get the backend to do the right thing.
-    // for now I will break AVR to silence *a billion* lints. We should probably
-    // have a proper "opaque function pointer type" to handle this kind of thing.
-
-    // Impls for function pointers
-    macro_rules! fnptr_impls_safety_abi {
-        ($FnTy: ty, $($Arg: ident),*) => {
-        fnptr_impls_safety_abi! { #[stable(feature = "fnptr_impls", since = "1.4.0")] $FnTy, $($Arg),* }
-    };
-    (@c_unwind $FnTy: ty, $($Arg: ident),*) => {
-        fnptr_impls_safety_abi! { #[unstable(feature = "c_unwind", issue = "74990")] $FnTy, $($Arg),* }
-    };
-    (#[$meta:meta] $FnTy: ty, $($Arg: ident),*) => {
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> PartialEq for $FnTy {
-                    #[inline]
-                    fn eq(&self, other: &Self) -> bool {
-                        *self as usize == *other as usize
-                    }
-                }
-            }
-
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> Eq for $FnTy {}
-            }
-
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> PartialOrd for $FnTy {
-                    #[inline]
-                    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-                        (*self as usize).partial_cmp(&(*other as usize))
-                    }
-                }
-            }
-
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> Ord for $FnTy {
-                    #[inline]
-                    fn cmp(&self, other: &Self) -> Ordering {
-                        (*self as usize).cmp(&(*other as usize))
-                    }
-                }
-            }
-
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> hash::Hash for $FnTy {
-                    fn hash<HH: hash::Hasher>(&self, state: &mut HH) {
-                        state.write_usize(*self as usize)
-                    }
-                }
-            }
-
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> fmt::Pointer for $FnTy {
-                    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-                        fmt::pointer_fmt_inner(*self as usize, f)
-                    }
-                }
-            }
-
-            maybe_fnptr_doc! {
-                $($Arg)* @
-                #[$meta]
-                impl<Ret, $($Arg),*> fmt::Debug for $FnTy {
-                    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-                        fmt::pointer_fmt_inner(*self as usize, f)
-                    }
-                }
-            }
-        }
-    }
-
-    macro_rules! fnptr_impls_args {
-        ($($Arg: ident),+) => {
-            fnptr_impls_safety_abi! { extern "Rust" fn($($Arg),+) -> Ret, $($Arg),+ }
-            fnptr_impls_safety_abi! { extern "C" fn($($Arg),+) -> Ret, $($Arg),+ }
-            fnptr_impls_safety_abi! { extern "C" fn($($Arg),+ , ...) -> Ret, $($Arg),+ }
-        fnptr_impls_safety_abi! { @c_unwind extern "C-unwind" fn($($Arg),+) -> Ret, $($Arg),+ }
-        fnptr_impls_safety_abi! { @c_unwind extern "C-unwind" fn($($Arg),+ , ...) -> Ret, $($Arg),+ }
-            fnptr_impls_safety_abi! { unsafe extern "Rust" fn($($Arg),+) -> Ret, $($Arg),+ }
-            fnptr_impls_safety_abi! { unsafe extern "C" fn($($Arg),+) -> Ret, $($Arg),+ }
-            fnptr_impls_safety_abi! { unsafe extern "C" fn($($Arg),+ , ...) -> Ret, $($Arg),+ }
-        fnptr_impls_safety_abi! { @c_unwind unsafe extern "C-unwind" fn($($Arg),+) -> Ret, $($Arg),+ }
-        fnptr_impls_safety_abi! { @c_unwind unsafe extern "C-unwind" fn($($Arg),+ , ...) -> Ret, $($Arg),+ }
-        };
-        () => {
-            // No variadic functions with 0 parameters
-            fnptr_impls_safety_abi! { extern "Rust" fn() -> Ret, }
-            fnptr_impls_safety_abi! { extern "C" fn() -> Ret, }
-        fnptr_impls_safety_abi! { @c_unwind extern "C-unwind" fn() -> Ret, }
-            fnptr_impls_safety_abi! { unsafe extern "Rust" fn() -> Ret, }
-            fnptr_impls_safety_abi! { unsafe extern "C" fn() -> Ret, }
-        fnptr_impls_safety_abi! { @c_unwind unsafe extern "C-unwind" fn() -> Ret, }
-        };
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> PartialEq for F {
+    #[inline]
+    fn eq(&self, other: &Self) -> bool {
+        self.addr() == other.addr()
     }
-
-    fnptr_impls_args! {}
-    fnptr_impls_args! { T }
-    fnptr_impls_args! { A, B }
-    fnptr_impls_args! { A, B, C }
-    fnptr_impls_args! { A, B, C, D }
-    fnptr_impls_args! { A, B, C, D, E }
-    fnptr_impls_args! { A, B, C, D, E, F }
-    fnptr_impls_args! { A, B, C, D, E, F, G }
-    fnptr_impls_args! { A, B, C, D, E, F, G, H }
-    fnptr_impls_args! { A, B, C, D, E, F, G, H, I }
-    fnptr_impls_args! { A, B, C, D, E, F, G, H, I, J }
-    fnptr_impls_args! { A, B, C, D, E, F, G, H, I, J, K }
-    fnptr_impls_args! { A, B, C, D, E, F, G, H, I, J, K, L }
 }
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> Eq for F {}
 
-#[cfg(not(bootstrap))]
-mod new_fn_ptr_impl {
-    use super::*;
-    use crate::marker::FnPtr;
-
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> PartialEq for F {
-        #[inline]
-        fn eq(&self, other: &Self) -> bool {
-            self.addr() == other.addr()
-        }
-    }
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> Eq for F {}
-
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> PartialOrd for F {
-        #[inline]
-        fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-            self.addr().partial_cmp(&other.addr())
-        }
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> PartialOrd for F {
+    #[inline]
+    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+        self.addr().partial_cmp(&other.addr())
     }
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> Ord for F {
-        #[inline]
-        fn cmp(&self, other: &Self) -> Ordering {
-            self.addr().cmp(&other.addr())
-        }
+}
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> Ord for F {
+    #[inline]
+    fn cmp(&self, other: &Self) -> Ordering {
+        self.addr().cmp(&other.addr())
     }
+}
 
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> hash::Hash for F {
-        fn hash<HH: hash::Hasher>(&self, state: &mut HH) {
-            state.write_usize(self.addr() as _)
-        }
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> hash::Hash for F {
+    fn hash<HH: hash::Hasher>(&self, state: &mut HH) {
+        state.write_usize(self.addr() as _)
     }
+}
 
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> fmt::Pointer for F {
-        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-            fmt::pointer_fmt_inner(self.addr() as _, f)
-        }
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> fmt::Pointer for F {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt::pointer_fmt_inner(self.addr() as _, f)
     }
+}
 
-    #[stable(feature = "fnptr_impls", since = "1.4.0")]
-    impl<F: FnPtr> fmt::Debug for F {
-        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-            fmt::pointer_fmt_inner(self.addr() as _, f)
-        }
+#[stable(feature = "fnptr_impls", since = "1.4.0")]
+impl<F: FnPtr> fmt::Debug for F {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        fmt::pointer_fmt_inner(self.addr() as _, f)
     }
 }
+
 /// Create a `const` raw pointer to a place, without creating an intermediate reference.
 ///
 /// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs
index 7b0fd02eb9f..c339ccb1b4d 100644
--- a/library/core/src/ptr/mut_ptr.rs
+++ b/library/core/src/ptr/mut_ptr.rs
@@ -473,10 +473,20 @@ impl<T: ?Sized> *mut T {
     where
         T: Sized,
     {
+        #[cfg(bootstrap)]
         // SAFETY: the caller must uphold the safety contract for `offset`.
         // The obtained pointer is valid for writes since the caller must
         // guarantee that it points to the same allocated object as `self`.
-        unsafe { intrinsics::offset(self, count) as *mut T }
+        unsafe {
+            intrinsics::offset(self, count) as *mut T
+        }
+        #[cfg(not(bootstrap))]
+        // SAFETY: the caller must uphold the safety contract for `offset`.
+        // The obtained pointer is valid for writes since the caller must
+        // guarantee that it points to the same allocated object as `self`.
+        unsafe {
+            intrinsics::offset(self, count)
+        }
     }
 
     /// Calculates the offset from a pointer in bytes.
@@ -1016,8 +1026,16 @@ impl<T: ?Sized> *mut T {
     where
         T: Sized,
     {
+        #[cfg(bootstrap)]
+        // SAFETY: the caller must uphold the safety contract for `offset`.
+        unsafe {
+            self.offset(count as isize)
+        }
+        #[cfg(not(bootstrap))]
         // SAFETY: the caller must uphold the safety contract for `offset`.
-        unsafe { self.offset(count as isize) }
+        unsafe {
+            intrinsics::offset(self, count)
+        }
     }
 
     /// Calculates the offset from a pointer in bytes (convenience for `.byte_offset(count as isize)`).
diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs
index 506d891d989..61fcdf58b4f 100644
--- a/library/core/src/ptr/non_null.rs
+++ b/library/core/src/ptr/non_null.rs
@@ -473,7 +473,7 @@ impl<T> NonNull<[T]> {
     ///
     /// (Note that this example artificially demonstrates a use of this method,
     /// but `let slice = NonNull::from(&x[..]);` would be a better way to write code like this.)
-    #[stable(feature = "nonnull_slice_from_raw_parts", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "nonnull_slice_from_raw_parts", since = "1.70.0")]
     #[rustc_const_unstable(feature = "const_slice_from_raw_parts_mut", issue = "67456")]
     #[must_use]
     #[inline]
diff --git a/library/core/src/result.rs b/library/core/src/result.rs
index 28cb02989ec..1ee270f4c03 100644
--- a/library/core/src/result.rs
+++ b/library/core/src/result.rs
@@ -555,7 +555,7 @@ impl<T, E> Result<T, E> {
     /// ```
     #[must_use]
     #[inline]
-    #[stable(feature = "is_some_and", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "is_some_and", since = "1.70.0")]
     pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool {
         match self {
             Err(_) => false,
@@ -600,7 +600,7 @@ impl<T, E> Result<T, E> {
     /// ```
     #[must_use]
     #[inline]
-    #[stable(feature = "is_some_and", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "is_some_and", since = "1.70.0")]
     pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool {
         match self {
             Ok(_) => false,
diff --git a/library/core/src/slice/iter/macros.rs b/library/core/src/slice/iter/macros.rs
index b1ca872b845..0a30033778b 100644
--- a/library/core/src/slice/iter/macros.rs
+++ b/library/core/src/slice/iter/macros.rs
@@ -394,7 +394,7 @@ macro_rules! iterator {
             }
         }
 
-        #[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
+        #[stable(feature = "default_iters", since = "1.70.0")]
         impl<T> Default for $name<'_, T> {
             /// Creates an empty slice iterator.
             ///
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index b0ab634905f..236b7f423d6 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -970,8 +970,8 @@ impl AtomicBool {
     /// # }
     /// ```
     #[inline]
-    #[stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")]
-    #[rustc_const_stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "atomic_as_ptr", since = "1.70.0")]
+    #[rustc_const_stable(feature = "atomic_as_ptr", since = "1.70.0")]
     pub const fn as_ptr(&self) -> *mut bool {
         self.v.get().cast()
     }
@@ -1905,8 +1905,8 @@ impl<T> AtomicPtr<T> {
     /// }
     /// ```
     #[inline]
-    #[stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")]
-    #[rustc_const_stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "atomic_as_ptr", since = "1.70.0")]
+    #[rustc_const_stable(feature = "atomic_as_ptr", since = "1.70.0")]
     pub const fn as_ptr(&self) -> *mut *mut T {
         self.p.get()
     }
@@ -2854,8 +2854,8 @@ macro_rules! atomic_int {
             /// # }
             /// ```
             #[inline]
-            #[stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")]
-            #[rustc_const_stable(feature = "atomic_as_ptr", since = "CURRENT_RUSTC_VERSION")]
+            #[stable(feature = "atomic_as_ptr", since = "1.70.0")]
+            #[rustc_const_stable(feature = "atomic_as_ptr", since = "1.70.0")]
             pub const fn as_ptr(&self) -> *mut $int_type {
                 self.v.get()
             }
diff --git a/library/portable-simd/crates/core_simd/src/ops/deref.rs b/library/portable-simd/crates/core_simd/src/ops/deref.rs
index 9883a74c92d..302bf148bd3 100644
--- a/library/portable-simd/crates/core_simd/src/ops/deref.rs
+++ b/library/portable-simd/crates/core_simd/src/ops/deref.rs
@@ -71,7 +71,7 @@ macro_rules! deref_ops {
 
                 #[inline]
                 #[must_use = "operator returns a new vector without mutating the inputs"]
-                fn $call(self, rhs: &$simd) -> Self::Output {
+                fn $call(self, rhs: &'rhs $simd) -> Self::Output {
                     (*self).$call(*rhs)
                 }
             }
diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs
index c5a5991cc81..ec774e62deb 100644
--- a/library/std/src/alloc.rs
+++ b/library/std/src/alloc.rs
@@ -93,7 +93,7 @@ pub use alloc_crate::alloc::*;
 ///
 /// ```rust
 /// use std::alloc::{System, GlobalAlloc, Layout};
-/// use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
+/// use std::sync::atomic::{AtomicUsize, Ordering::Relaxed};
 ///
 /// struct Counter;
 ///
@@ -103,14 +103,14 @@ pub use alloc_crate::alloc::*;
 ///     unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
 ///         let ret = System.alloc(layout);
 ///         if !ret.is_null() {
-///             ALLOCATED.fetch_add(layout.size(), SeqCst);
+///             ALLOCATED.fetch_add(layout.size(), Relaxed);
 ///         }
 ///         ret
 ///     }
 ///
 ///     unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
 ///         System.dealloc(ptr, layout);
-///         ALLOCATED.fetch_sub(layout.size(), SeqCst);
+///         ALLOCATED.fetch_sub(layout.size(), Relaxed);
 ///     }
 /// }
 ///
@@ -118,7 +118,7 @@ pub use alloc_crate::alloc::*;
 /// static A: Counter = Counter;
 ///
 /// fn main() {
-///     println!("allocated bytes before main: {}", ALLOCATED.load(SeqCst));
+///     println!("allocated bytes before main: {}", ALLOCATED.load(Relaxed));
 /// }
 /// ```
 ///
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index 42a68496fc4..30e553f285b 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -2284,6 +2284,11 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
 ///
 /// See [`fs::remove_file`] and [`fs::remove_dir`].
 ///
+/// `remove_dir_all` will fail if `remove_dir` or `remove_file` fail on any constituent paths, including the root path.
+/// As a result, the directory you are deleting must exist, meaning that this function is not idempotent.
+///
+/// Consider ignoring the error if validating the removal is not required for your use case.
+///
 /// [`fs::remove_file`]: remove_file
 /// [`fs::remove_dir`]: remove_dir
 ///
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 4cd7885bd4a..9e09ce337bc 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -268,7 +268,7 @@ pub(crate) use self::stdio::attempt_print_to_stderr;
 #[unstable(feature = "internal_output_capture", issue = "none")]
 #[doc(no_inline, hidden)]
 pub use self::stdio::set_output_capture;
-#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "is_terminal", since = "1.70.0")]
 pub use self::stdio::IsTerminal;
 #[unstable(feature = "print_internals", issue = "none")]
 pub use self::stdio::{_eprint, _print};
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index b2c57b8ddc7..9098d36ee53 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -1047,7 +1047,7 @@ pub(crate) fn attempt_print_to_stderr(args: fmt::Arguments<'_>) {
 }
 
 /// Trait to determine if a descriptor/handle refers to a terminal/tty.
-#[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "is_terminal", since = "1.70.0")]
 pub trait IsTerminal: crate::sealed::Sealed {
     /// Returns `true` if the descriptor/handle refers to a terminal/tty.
     ///
@@ -1063,7 +1063,7 @@ pub trait IsTerminal: crate::sealed::Sealed {
     /// Note that this [may change in the future][changes].
     ///
     /// [changes]: io#platform-specific-behavior
-    #[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "is_terminal", since = "1.70.0")]
     fn is_terminal(&self) -> bool;
 }
 
@@ -1072,7 +1072,7 @@ macro_rules! impl_is_terminal {
         #[unstable(feature = "sealed", issue = "none")]
         impl crate::sealed::Sealed for $t {}
 
-        #[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
+        #[stable(feature = "is_terminal", since = "1.70.0")]
         impl IsTerminal for $t {
             #[inline]
             fn is_terminal(&self) -> bool {
diff --git a/library/std/src/os/android/net.rs b/library/std/src/os/android/net.rs
index 4e88ab8ff5c..fe40d6319c2 100644
--- a/library/std/src/os/android/net.rs
+++ b/library/std/src/os/android/net.rs
@@ -1,8 +1,8 @@
 //! Android-specific networking functionality.
 
-#![stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#![stable(feature = "unix_socket_abstract", since = "1.70.0")]
 
-#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "unix_socket_abstract", since = "1.70.0")]
 pub use crate::os::net::linux_ext::addr::SocketAddrExt;
 
 #[unstable(feature = "tcp_quickack", issue = "96256")]
diff --git a/library/std/src/os/fd/owned.rs b/library/std/src/os/fd/owned.rs
index 6a6e6f33158..2180d2974d5 100644
--- a/library/std/src/os/fd/owned.rs
+++ b/library/std/src/os/fd/owned.rs
@@ -201,7 +201,7 @@ macro_rules! impl_is_terminal {
         #[unstable(feature = "sealed", issue = "none")]
         impl crate::sealed::Sealed for $t {}
 
-        #[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
+        #[stable(feature = "is_terminal", since = "1.70.0")]
         impl crate::io::IsTerminal for $t {
             #[inline]
             fn is_terminal(&self) -> bool {
diff --git a/library/std/src/os/linux/net.rs b/library/std/src/os/linux/net.rs
index fcb3bb83485..c8e734d740b 100644
--- a/library/std/src/os/linux/net.rs
+++ b/library/std/src/os/linux/net.rs
@@ -1,8 +1,8 @@
 //! Linux-specific networking functionality.
 
-#![stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#![stable(feature = "unix_socket_abstract", since = "1.70.0")]
 
-#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "unix_socket_abstract", since = "1.70.0")]
 pub use crate::os::net::linux_ext::addr::SocketAddrExt;
 
 #[unstable(feature = "tcp_quickack", issue = "96256")]
diff --git a/library/std/src/os/net/linux_ext/addr.rs b/library/std/src/os/net/linux_ext/addr.rs
index ea8102c9cc0..aed772056e1 100644
--- a/library/std/src/os/net/linux_ext/addr.rs
+++ b/library/std/src/os/net/linux_ext/addr.rs
@@ -4,7 +4,7 @@ use crate::os::unix::net::SocketAddr;
 use crate::sealed::Sealed;
 
 /// Platform-specific extensions to [`SocketAddr`].
-#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "unix_socket_abstract", since = "1.70.0")]
 pub trait SocketAddrExt: Sealed {
     /// Creates a Unix socket address in the abstract namespace.
     ///
@@ -37,7 +37,7 @@ pub trait SocketAddrExt: Sealed {
     ///     Ok(())
     /// }
     /// ```
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     fn from_abstract_name<N>(name: N) -> crate::io::Result<SocketAddr>
     where
         N: AsRef<[u8]>;
@@ -59,6 +59,6 @@ pub trait SocketAddrExt: Sealed {
     ///     Ok(())
     /// }
     /// ```
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     fn as_abstract_name(&self) -> Option<&[u8]>;
 }
diff --git a/library/std/src/os/net/linux_ext/mod.rs b/library/std/src/os/net/linux_ext/mod.rs
index e7423dce613..62e78cc50d4 100644
--- a/library/std/src/os/net/linux_ext/mod.rs
+++ b/library/std/src/os/net/linux_ext/mod.rs
@@ -2,7 +2,7 @@
 
 #![doc(cfg(any(target_os = "linux", target_os = "android")))]
 
-#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "unix_socket_abstract", since = "1.70.0")]
 pub(crate) mod addr;
 
 #[unstable(feature = "tcp_quickack", issue = "96256")]
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs
index 52a0da5bf1a..6c99e8c3620 100644
--- a/library/std/src/os/unix/net/addr.rs
+++ b/library/std/src/os/unix/net/addr.rs
@@ -245,12 +245,12 @@ impl SocketAddr {
     }
 }
 
-#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "unix_socket_abstract", since = "1.70.0")]
 impl Sealed for SocketAddr {}
 
 #[doc(cfg(any(target_os = "android", target_os = "linux")))]
 #[cfg(any(doc, target_os = "android", target_os = "linux"))]
-#[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "unix_socket_abstract", since = "1.70.0")]
 impl linux_ext::addr::SocketAddrExt for SocketAddr {
     fn as_abstract_name(&self) -> Option<&[u8]> {
         if let AddressKind::Abstract(name) = self.address() { Some(name) } else { None }
diff --git a/library/std/src/os/unix/net/datagram.rs b/library/std/src/os/unix/net/datagram.rs
index 41cdcda4613..34db54235f1 100644
--- a/library/std/src/os/unix/net/datagram.rs
+++ b/library/std/src/os/unix/net/datagram.rs
@@ -118,7 +118,7 @@ impl UnixDatagram {
     ///     Ok(())
     /// }
     /// ```
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     pub fn bind_addr(socket_addr: &SocketAddr) -> io::Result<UnixDatagram> {
         unsafe {
             let socket = UnixDatagram::unbound()?;
@@ -233,7 +233,7 @@ impl UnixDatagram {
     ///     Ok(())
     /// }
     /// ```
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     pub fn connect_addr(&self, socket_addr: &SocketAddr) -> io::Result<()> {
         unsafe {
             cvt(libc::connect(
@@ -532,7 +532,7 @@ impl UnixDatagram {
     ///     Ok(())
     /// }
     /// ```
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     pub fn send_to_addr(&self, buf: &[u8], socket_addr: &SocketAddr) -> io::Result<usize> {
         unsafe {
             let count = cvt(libc::sendto(
diff --git a/library/std/src/os/unix/net/listener.rs b/library/std/src/os/unix/net/listener.rs
index 83f0debe676..5be8aebc70f 100644
--- a/library/std/src/os/unix/net/listener.rs
+++ b/library/std/src/os/unix/net/listener.rs
@@ -106,7 +106,7 @@ impl UnixListener {
     ///     Ok(())
     /// }
     /// ```
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     pub fn bind_addr(socket_addr: &SocketAddr) -> io::Result<UnixListener> {
         unsafe {
             let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
diff --git a/library/std/src/os/unix/net/stream.rs b/library/std/src/os/unix/net/stream.rs
index 5aa3fb92576..bf2a51b5edb 100644
--- a/library/std/src/os/unix/net/stream.rs
+++ b/library/std/src/os/unix/net/stream.rs
@@ -122,7 +122,7 @@ impl UnixStream {
     ///     Ok(())
     /// }
     /// ````
-    #[stable(feature = "unix_socket_abstract", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
     pub fn connect_addr(socket_addr: &SocketAddr) -> io::Result<UnixStream> {
         unsafe {
             let inner = Socket::new_raw(libc::AF_UNIX, libc::SOCK_STREAM)?;
diff --git a/library/std/src/os/windows/io/handle.rs b/library/std/src/os/windows/io/handle.rs
index 11948cecad8..9b77cd8321b 100644
--- a/library/std/src/os/windows/io/handle.rs
+++ b/library/std/src/os/windows/io/handle.rs
@@ -389,7 +389,7 @@ macro_rules! impl_is_terminal {
         #[unstable(feature = "sealed", issue = "none")]
         impl crate::sealed::Sealed for $t {}
 
-        #[stable(feature = "is_terminal", since = "CURRENT_RUSTC_VERSION")]
+        #[stable(feature = "is_terminal", since = "1.70.0")]
         impl crate::io::IsTerminal for $t {
             #[inline]
             fn is_terminal(&self) -> bool {
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index e5abd02a1bc..5b22333cc35 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -1509,7 +1509,7 @@ impl PathBuf {
     /// path.as_mut_os_string().push("baz");
     /// assert_eq!(path, Path::new("/foo/barbaz"));
     /// ```
-    #[stable(feature = "path_as_mut_os_str", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "path_as_mut_os_str", since = "1.70.0")]
     #[must_use]
     #[inline]
     pub fn as_mut_os_string(&mut self) -> &mut OsString {
@@ -2074,7 +2074,7 @@ impl Path {
     /// path.as_mut_os_str().make_ascii_lowercase();
     /// assert_eq!(path, Path::new("foo.txt"));
     /// ```
-    #[stable(feature = "path_as_mut_os_str", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "path_as_mut_os_str", since = "1.70.0")]
     #[must_use]
     #[inline]
     pub fn as_mut_os_str(&mut self) -> &mut OsStr {
diff --git a/library/std/src/prelude/v1.rs b/library/std/src/prelude/v1.rs
index 2aefd7c513d..7a7a7737635 100644
--- a/library/std/src/prelude/v1.rs
+++ b/library/std/src/prelude/v1.rs
@@ -91,10 +91,10 @@ pub use core::prelude::v1::cfg_eval;
 )]
 pub use core::prelude::v1::type_ascribe;
 
-// The file so far is equivalent to src/libcore/prelude/v1.rs,
-// and below to src/liballoc/prelude.rs.
-// Those files are duplicated rather than using glob imports
-// because we want docs to show these re-exports as pointing to within `std`.
+// The file so far is equivalent to core/src/prelude/v1.rs. It is duplicated
+// rather than glob imported because we want docs to show these re-exports as
+// pointing to within `std`.
+// Below are the items from the alloc crate.
 
 #[stable(feature = "rust1", since = "1.0.0")]
 #[doc(no_inline)]
diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs
index 3df990e5dd9..08ffc407ead 100644
--- a/library/std/src/primitive_docs.rs
+++ b/library/std/src/primitive_docs.rs
@@ -1,8 +1,7 @@
 // `library/{std,core}/src/primitive_docs.rs` should have the same contents.
 // These are different files so that relative links work properly without
 // having to have `CARGO_PKG_NAME` set, but conceptually they should always be the same.
-#[cfg_attr(bootstrap, doc(primitive = "bool"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "bool")]
+#[rustc_doc_primitive = "bool"]
 #[doc(alias = "true")]
 #[doc(alias = "false")]
 /// The boolean type.
@@ -64,8 +63,7 @@
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_bool {}
 
-#[cfg_attr(bootstrap, doc(primitive = "never"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "never")]
+#[rustc_doc_primitive = "never"]
 #[doc(alias = "!")]
 //
 /// The `!` type, also called "never".
@@ -276,8 +274,7 @@ mod prim_bool {}
 #[unstable(feature = "never_type", issue = "35121")]
 mod prim_never {}
 
-#[cfg_attr(bootstrap, doc(primitive = "char"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "char")]
+#[rustc_doc_primitive = "char"]
 #[allow(rustdoc::invalid_rust_codeblocks)]
 /// A character type.
 ///
@@ -401,8 +398,7 @@ mod prim_never {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_char {}
 
-#[cfg_attr(bootstrap, doc(primitive = "unit"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "unit")]
+#[rustc_doc_primitive = "unit"]
 #[doc(alias = "(")]
 #[doc(alias = ")")]
 #[doc(alias = "()")]
@@ -464,8 +460,7 @@ impl Copy for () {
     // empty
 }
 
-#[cfg_attr(bootstrap, doc(primitive = "pointer"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "pointer")]
+#[rustc_doc_primitive = "pointer"]
 #[doc(alias = "ptr")]
 #[doc(alias = "*")]
 #[doc(alias = "*const")]
@@ -581,8 +576,7 @@ impl Copy for () {
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_pointer {}
 
-#[cfg_attr(bootstrap, doc(primitive = "array"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "array")]
+#[rustc_doc_primitive = "array"]
 #[doc(alias = "[]")]
 #[doc(alias = "[T;N]")] // unfortunately, rustdoc doesn't have fuzzy search for aliases
 #[doc(alias = "[T; N]")]
@@ -783,8 +777,7 @@ mod prim_pointer {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_array {}
 
-#[cfg_attr(bootstrap, doc(primitive = "slice"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "slice")]
+#[rustc_doc_primitive = "slice"]
 #[doc(alias = "[")]
 #[doc(alias = "]")]
 #[doc(alias = "[]")]
@@ -876,8 +869,7 @@ mod prim_array {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_slice {}
 
-#[cfg_attr(bootstrap, doc(primitive = "str"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "str")]
+#[rustc_doc_primitive = "str"]
 /// String slices.
 ///
 /// *[See also the `std::str` module](crate::str).*
@@ -944,8 +936,7 @@ mod prim_slice {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_str {}
 
-#[cfg_attr(bootstrap, doc(primitive = "tuple"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "tuple")]
+#[rustc_doc_primitive = "tuple"]
 #[doc(alias = "(")]
 #[doc(alias = ")")]
 #[doc(alias = "()")]
@@ -1088,8 +1079,7 @@ impl<T: Copy> Copy for (T,) {
     // empty
 }
 
-#[cfg_attr(bootstrap, doc(primitive = "f32"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f32")]
+#[rustc_doc_primitive = "f32"]
 /// A 32-bit floating point type (specifically, the "binary32" type defined in IEEE 754-2008).
 ///
 /// This type can represent a wide range of decimal numbers, like `3.5`, `27`,
@@ -1155,8 +1145,7 @@ impl<T: Copy> Copy for (T,) {
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_f32 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "f64"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "f64")]
+#[rustc_doc_primitive = "f64"]
 /// A 64-bit floating point type (specifically, the "binary64" type defined in IEEE 754-2008).
 ///
 /// This type is very similar to [`f32`], but has increased
@@ -1171,78 +1160,67 @@ mod prim_f32 {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_f64 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i8"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i8")]
+#[rustc_doc_primitive = "i8"]
 //
 /// The 8-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i8 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i16"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i16")]
+#[rustc_doc_primitive = "i16"]
 //
 /// The 16-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i16 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i32"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i32")]
+#[rustc_doc_primitive = "i32"]
 //
 /// The 32-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i32 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i64"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i64")]
+#[rustc_doc_primitive = "i64"]
 //
 /// The 64-bit signed integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_i64 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "i128"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "i128")]
+#[rustc_doc_primitive = "i128"]
 //
 /// The 128-bit signed integer type.
 #[stable(feature = "i128", since = "1.26.0")]
 mod prim_i128 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u8"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u8")]
+#[rustc_doc_primitive = "u8"]
 //
 /// The 8-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u8 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u16"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u16")]
+#[rustc_doc_primitive = "u16"]
 //
 /// The 16-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u16 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u32"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u32")]
+#[rustc_doc_primitive = "u32"]
 //
 /// The 32-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u32 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u64"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u64")]
+#[rustc_doc_primitive = "u64"]
 //
 /// The 64-bit unsigned integer type.
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_u64 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "u128"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "u128")]
+#[rustc_doc_primitive = "u128"]
 //
 /// The 128-bit unsigned integer type.
 #[stable(feature = "i128", since = "1.26.0")]
 mod prim_u128 {}
 
-#[cfg_attr(bootstrap, doc(primitive = "isize"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "isize")]
+#[rustc_doc_primitive = "isize"]
 //
 /// The pointer-sized signed integer type.
 ///
@@ -1252,8 +1230,7 @@ mod prim_u128 {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_isize {}
 
-#[cfg_attr(bootstrap, doc(primitive = "usize"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "usize")]
+#[rustc_doc_primitive = "usize"]
 //
 /// The pointer-sized unsigned integer type.
 ///
@@ -1263,8 +1240,7 @@ mod prim_isize {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_usize {}
 
-#[cfg_attr(bootstrap, doc(primitive = "reference"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "reference")]
+#[rustc_doc_primitive = "reference"]
 #[doc(alias = "&")]
 #[doc(alias = "&mut")]
 //
@@ -1396,8 +1372,7 @@ mod prim_usize {}
 #[stable(feature = "rust1", since = "1.0.0")]
 mod prim_ref {}
 
-#[cfg_attr(bootstrap, doc(primitive = "fn"))]
-#[cfg_attr(not(bootstrap), rustc_doc_primitive = "fn")]
+#[rustc_doc_primitive = "fn"]
 //
 /// Function pointers, like `fn(usize) -> bool`.
 ///
diff --git a/library/std/src/sync/mod.rs b/library/std/src/sync/mod.rs
index 19641753ffe..f6a7c0a9f75 100644
--- a/library/std/src/sync/mod.rs
+++ b/library/std/src/sync/mod.rs
@@ -177,7 +177,7 @@ pub use self::rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
 
 #[unstable(feature = "lazy_cell", issue = "109736")]
 pub use self::lazy_lock::LazyLock;
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 pub use self::once_lock::OnceLock;
 
 pub(crate) use self::remutex::{ReentrantMutex, ReentrantMutexGuard};
diff --git a/library/std/src/sync/once_lock.rs b/library/std/src/sync/once_lock.rs
index 36951c4f13e..e83bc35ee98 100644
--- a/library/std/src/sync/once_lock.rs
+++ b/library/std/src/sync/once_lock.rs
@@ -30,7 +30,7 @@ use crate::sync::Once;
 /// assert!(value.is_some());
 /// assert_eq!(value.unwrap().as_str(), "Hello, World!");
 /// ```
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 pub struct OnceLock<T> {
     once: Once,
     // Whether or not the value is initialized is tracked by `once.is_completed()`.
@@ -59,8 +59,8 @@ impl<T> OnceLock<T> {
     /// Creates a new empty cell.
     #[inline]
     #[must_use]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
-    #[rustc_const_stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
+    #[rustc_const_stable(feature = "once_cell", since = "1.70.0")]
     pub const fn new() -> OnceLock<T> {
         OnceLock {
             once: Once::new(),
@@ -74,7 +74,7 @@ impl<T> OnceLock<T> {
     /// Returns `None` if the cell is empty, or being initialized. This
     /// method never blocks.
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn get(&self) -> Option<&T> {
         if self.is_initialized() {
             // Safe b/c checked is_initialized
@@ -88,7 +88,7 @@ impl<T> OnceLock<T> {
     ///
     /// Returns `None` if the cell is empty. This method never blocks.
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn get_mut(&mut self) -> Option<&mut T> {
         if self.is_initialized() {
             // Safe b/c checked is_initialized and we have a unique access
@@ -124,7 +124,7 @@ impl<T> OnceLock<T> {
     /// }
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn set(&self, value: T) -> Result<(), T> {
         let mut value = Some(value);
         self.get_or_init(|| value.take().unwrap());
@@ -162,7 +162,7 @@ impl<T> OnceLock<T> {
     /// assert_eq!(value, &92);
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn get_or_init<F>(&self, f: F) -> &T
     where
         F: FnOnce() -> T,
@@ -239,7 +239,7 @@ impl<T> OnceLock<T> {
     /// assert_eq!(cell.into_inner(), Some("hello".to_string()));
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn into_inner(mut self) -> Option<T> {
         self.take()
     }
@@ -264,7 +264,7 @@ impl<T> OnceLock<T> {
     /// assert_eq!(cell.get(), None);
     /// ```
     #[inline]
-    #[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+    #[stable(feature = "once_cell", since = "1.70.0")]
     pub fn take(&mut self) -> Option<T> {
         if self.is_initialized() {
             self.once = Once::new();
@@ -333,17 +333,17 @@ impl<T> OnceLock<T> {
 // scoped thread B, which fills the cell, which is
 // then destroyed by A. That is, destructor observes
 // a sent value.
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 unsafe impl<T: Sync + Send> Sync for OnceLock<T> {}
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 unsafe impl<T: Send> Send for OnceLock<T> {}
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: RefUnwindSafe + UnwindSafe> RefUnwindSafe for OnceLock<T> {}
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: UnwindSafe> UnwindSafe for OnceLock<T> {}
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T> Default for OnceLock<T> {
     /// Creates a new empty cell.
     ///
@@ -362,7 +362,7 @@ impl<T> Default for OnceLock<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: fmt::Debug> fmt::Debug for OnceLock<T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self.get() {
@@ -372,7 +372,7 @@ impl<T: fmt::Debug> fmt::Debug for OnceLock<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: Clone> Clone for OnceLock<T> {
     #[inline]
     fn clone(&self) -> OnceLock<T> {
@@ -387,7 +387,7 @@ impl<T: Clone> Clone for OnceLock<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T> From<T> for OnceLock<T> {
     /// Create a new cell with its contents set to `value`.
     ///
@@ -414,7 +414,7 @@ impl<T> From<T> for OnceLock<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: PartialEq> PartialEq for OnceLock<T> {
     #[inline]
     fn eq(&self, other: &OnceLock<T>) -> bool {
@@ -422,10 +422,10 @@ impl<T: PartialEq> PartialEq for OnceLock<T> {
     }
 }
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 impl<T: Eq> Eq for OnceLock<T> {}
 
-#[stable(feature = "once_cell", since = "CURRENT_RUSTC_VERSION")]
+#[stable(feature = "once_cell", since = "1.70.0")]
 unsafe impl<#[may_dangle] T> Drop for OnceLock<T> {
     #[inline]
     fn drop(&mut self) {
diff --git a/library/std/src/sys/common/thread_local/fast_local.rs b/library/std/src/sys/common/thread_local/fast_local.rs
index 914e017f7ff..447044a798b 100644
--- a/library/std/src/sys/common/thread_local/fast_local.rs
+++ b/library/std/src/sys/common/thread_local/fast_local.rs
@@ -11,7 +11,7 @@ use crate::{fmt, mem, panic};
 pub macro thread_local_inner {
     // used to generate the `LocalKey` value for const-initialized thread locals
     (@key $t:ty, const $init:expr) => {{
-        #[cfg_attr(not(bootstrap), inline)]
+        #[inline]
         #[deny(unsafe_op_in_unsafe_fn)]
         unsafe fn __getit(
             _init: $crate::option::Option<&mut $crate::option::Option<$t>>,
@@ -78,7 +78,7 @@ pub macro thread_local_inner {
             #[inline]
             fn __init() -> $t { $init }
 
-            #[cfg_attr(not(bootstrap), inline)]
+            #[inline]
             unsafe fn __getit(
                 init: $crate::option::Option<&mut $crate::option::Option<$t>>,
             ) -> $crate::option::Option<&'static $t> {
diff --git a/library/std/src/sys/common/thread_local/os_local.rs b/library/std/src/sys/common/thread_local/os_local.rs
index e9516f9983f..d004897df28 100644
--- a/library/std/src/sys/common/thread_local/os_local.rs
+++ b/library/std/src/sys/common/thread_local/os_local.rs
@@ -11,7 +11,7 @@ use crate::{fmt, marker, panic, ptr};
 pub macro thread_local_inner {
     // used to generate the `LocalKey` value for const-initialized thread locals
     (@key $t:ty, const $init:expr) => {{
-        #[cfg_attr(not(bootstrap), inline)]
+        #[inline]
         #[deny(unsafe_op_in_unsafe_fn)]
         unsafe fn __getit(
             _init: $crate::option::Option<&mut $crate::option::Option<$t>>,
diff --git a/library/std/src/sys/windows/fs.rs b/library/std/src/sys/windows/fs.rs
index 956db577d53..8ed62cdddcd 100644
--- a/library/std/src/sys/windows/fs.rs
+++ b/library/std/src/sys/windows/fs.rs
@@ -1132,26 +1132,29 @@ fn remove_dir_all_iterative(f: &File, delete: fn(&File) -> io::Result<()>) -> io
                     &dir,
                     &name,
                     c::SYNCHRONIZE | c::DELETE | c::FILE_LIST_DIRECTORY,
-                )?;
-                dirlist.push(child_dir);
-            } else {
-                for i in 1..=MAX_RETRIES {
-                    let result = open_link_no_reparse(&dir, &name, c::SYNCHRONIZE | c::DELETE);
-                    match result {
-                        Ok(f) => delete(&f)?,
-                        // Already deleted, so skip.
-                        Err(e) if e.kind() == io::ErrorKind::NotFound => break,
-                        // Retry a few times if the file is locked or a delete is already in progress.
-                        Err(e)
-                            if i < MAX_RETRIES
-                                && (e.raw_os_error() == Some(c::ERROR_DELETE_PENDING as _)
-                                    || e.raw_os_error()
-                                        == Some(c::ERROR_SHARING_VIOLATION as _)) => {}
-                        // Otherwise return the error.
-                        Err(e) => return Err(e),
-                    }
-                    thread::yield_now();
+                );
+                // On success, add the handle to the queue.
+                // If opening the directory fails we treat it the same as a file
+                if let Ok(child_dir) = child_dir {
+                    dirlist.push(child_dir);
+                    continue;
+                }
+            }
+            for i in 1..=MAX_RETRIES {
+                let result = open_link_no_reparse(&dir, &name, c::SYNCHRONIZE | c::DELETE);
+                match result {
+                    Ok(f) => delete(&f)?,
+                    // Already deleted, so skip.
+                    Err(e) if e.kind() == io::ErrorKind::NotFound => break,
+                    // Retry a few times if the file is locked or a delete is already in progress.
+                    Err(e)
+                        if i < MAX_RETRIES
+                            && (e.raw_os_error() == Some(c::ERROR_DELETE_PENDING as _)
+                                || e.raw_os_error() == Some(c::ERROR_SHARING_VIOLATION as _)) => {}
+                    // Otherwise return the error.
+                    Err(e) => return Err(e),
                 }
+                thread::yield_now();
             }
         }
         // If there were no more files then delete the directory.
diff --git a/library/std/src/sys_common/thread_local_key.rs b/library/std/src/sys_common/thread_local_key.rs
index 89360e45601..204834984a2 100644
--- a/library/std/src/sys_common/thread_local_key.rs
+++ b/library/std/src/sys_common/thread_local_key.rs
@@ -87,31 +87,6 @@ pub struct StaticKey {
     dtor: Option<unsafe extern "C" fn(*mut u8)>,
 }
 
-/// A type for a safely managed OS-based TLS slot.
-///
-/// This type allocates an OS TLS key when it is initialized and will deallocate
-/// the key when it falls out of scope. When compared with `StaticKey`, this
-/// type is entirely safe to use.
-///
-/// Implementations will likely, however, contain unsafe code as this type only
-/// operates on `*mut u8`, a raw pointer.
-///
-/// # Examples
-///
-/// ```ignore (cannot-doctest-private-modules)
-/// use tls::os::Key;
-///
-/// let key = Key::new(None);
-/// assert!(key.get().is_null());
-/// key.set(1 as *mut u8);
-/// assert!(!key.get().is_null());
-///
-/// drop(key); // deallocate this TLS slot.
-/// ```
-pub struct Key {
-    key: imp::Key,
-}
-
 /// Constant initialization value for static TLS keys.
 ///
 /// This value specifies no destructor by default.
@@ -194,39 +169,3 @@ impl StaticKey {
         }
     }
 }
-
-impl Key {
-    /// Creates a new managed OS TLS key.
-    ///
-    /// This key will be deallocated when the key falls out of scope.
-    ///
-    /// The argument provided is an optionally-specified destructor for the
-    /// value of this TLS key. When a thread exits and the value for this key
-    /// is non-null the destructor will be invoked. The TLS value will be reset
-    /// to null before the destructor is invoked.
-    ///
-    /// Note that the destructor will not be run when the `Key` goes out of
-    /// scope.
-    #[inline]
-    pub fn new(dtor: Option<unsafe extern "C" fn(*mut u8)>) -> Key {
-        Key { key: unsafe { imp::create(dtor) } }
-    }
-
-    /// See StaticKey::get
-    #[inline]
-    pub fn get(&self) -> *mut u8 {
-        unsafe { imp::get(self.key) }
-    }
-
-    /// See StaticKey::set
-    #[inline]
-    pub fn set(&self, val: *mut u8) {
-        unsafe { imp::set(self.key, val) }
-    }
-}
-
-impl Drop for Key {
-    fn drop(&mut self) {
-        unsafe { imp::destroy(self.key) }
-    }
-}
diff --git a/library/std/src/sys_common/thread_local_key/tests.rs b/library/std/src/sys_common/thread_local_key/tests.rs
index 6f32b858f09..6a44c65d918 100644
--- a/library/std/src/sys_common/thread_local_key/tests.rs
+++ b/library/std/src/sys_common/thread_local_key/tests.rs
@@ -1,24 +1,6 @@
-use super::{Key, StaticKey};
+use super::StaticKey;
 use core::ptr;
 
-fn assert_sync<T: Sync>() {}
-fn assert_send<T: Send>() {}
-
-#[test]
-fn smoke() {
-    assert_sync::<Key>();
-    assert_send::<Key>();
-
-    let k1 = Key::new(None);
-    let k2 = Key::new(None);
-    assert!(k1.get().is_null());
-    assert!(k2.get().is_null());
-    k1.set(ptr::invalid_mut(1));
-    k2.set(ptr::invalid_mut(2));
-    assert_eq!(k1.get() as usize, 1);
-    assert_eq!(k2.get() as usize, 2);
-}
-
 #[test]
 fn statik() {
     static K1: StaticKey = StaticKey::new(None);
diff --git a/library/std/src/thread/local.rs b/library/std/src/thread/local.rs
index fa08fdc1653..3b7c31826b9 100644
--- a/library/std/src/thread/local.rs
+++ b/library/std/src/thread/local.rs
@@ -134,10 +134,28 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
 /// thread_local! {
 ///     pub static FOO: RefCell<u32> = RefCell::new(1);
 ///
-///     #[allow(unused)]
 ///     static BAR: RefCell<f32> = RefCell::new(1.0);
 /// }
-/// # fn main() {}
+///
+/// FOO.with(|foo| assert_eq!(*foo.borrow(), 1));
+/// BAR.with(|bar| assert_eq!(*bar.borrow(), 1.0));
+/// ```
+///
+/// This macro supports a special `const {}` syntax that can be used
+/// when the initialization expression can be evaluated as a constant.
+/// This can enable a more efficient thread local implementation that
+/// can avoid lazy initialization. For types that do not
+/// [need to be dropped][crate::mem::needs_drop], this can enable an
+/// even more efficient implementation that does not need to
+/// track any additional state.
+///
+/// ```
+/// use std::cell::Cell;
+/// thread_local! {
+///     pub static FOO: Cell<u32> = const { Cell::new(1) };
+/// }
+///
+/// FOO.with(|foo| assert_eq!(foo.get(), 1));
 /// ```
 ///
 /// See [`LocalKey` documentation][`std::thread::LocalKey`] for more
diff --git a/library/test/src/formatters/json.rs b/library/test/src/formatters/json.rs
index 40976ec5e1c..8572d1c20ce 100644
--- a/library/test/src/formatters/json.rs
+++ b/library/test/src/formatters/json.rs
@@ -69,30 +69,14 @@ impl<T: Write> OutputFormatter for JsonFormatter<T> {
             name,
             ignore,
             ignore_message,
-            #[cfg(not(bootstrap))]
             source_file,
-            #[cfg(not(bootstrap))]
             start_line,
-            #[cfg(not(bootstrap))]
             start_col,
-            #[cfg(not(bootstrap))]
             end_line,
-            #[cfg(not(bootstrap))]
             end_col,
             ..
         } = desc;
 
-        #[cfg(bootstrap)]
-        let source_file = "";
-        #[cfg(bootstrap)]
-        let start_line = 0;
-        #[cfg(bootstrap)]
-        let start_col = 0;
-        #[cfg(bootstrap)]
-        let end_line = 0;
-        #[cfg(bootstrap)]
-        let end_col = 0;
-
         self.writeln_message(&format!(
             r#"{{ "type": "{test_type}", "event": "discovered", "name": "{}", "ignore": {ignore}, "ignore_message": "{}", "source_path": "{}", "start_line": {start_line}, "start_col": {start_col}, "end_line": {end_line}, "end_col": {end_col} }}"#,
             EscapedString(name.as_slice()),
diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
index 5ffdbf73fbf..c34583e6959 100644
--- a/library/test/src/tests.rs
+++ b/library/test/src/tests.rs
@@ -63,15 +63,10 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
                 name: StaticTestName("1"),
                 ignore: true,
                 ignore_message: None,
-                #[cfg(not(bootstrap))]
                 source_file: "",
-                #[cfg(not(bootstrap))]
                 start_line: 0,
-                #[cfg(not(bootstrap))]
                 start_col: 0,
-                #[cfg(not(bootstrap))]
                 end_line: 0,
-                #[cfg(not(bootstrap))]
                 end_col: 0,
                 should_panic: ShouldPanic::No,
                 compile_fail: false,
@@ -85,15 +80,10 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
                 name: StaticTestName("2"),
                 ignore: false,
                 ignore_message: None,
-                #[cfg(not(bootstrap))]
                 source_file: "",
-                #[cfg(not(bootstrap))]
                 start_line: 0,
-                #[cfg(not(bootstrap))]
                 start_col: 0,
-                #[cfg(not(bootstrap))]
                 end_line: 0,
-                #[cfg(not(bootstrap))]
                 end_col: 0,
                 should_panic: ShouldPanic::No,
                 compile_fail: false,
@@ -115,15 +105,10 @@ pub fn do_not_run_ignored_tests() {
             name: StaticTestName("whatever"),
             ignore: true,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::No,
             compile_fail: false,
@@ -148,15 +133,10 @@ pub fn ignored_tests_result_in_ignored() {
             name: StaticTestName("whatever"),
             ignore: true,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::No,
             compile_fail: false,
@@ -183,15 +163,10 @@ fn test_should_panic() {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::Yes,
             compile_fail: false,
@@ -218,15 +193,10 @@ fn test_should_panic_good_message() {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::YesWithMessage("error message"),
             compile_fail: false,
@@ -258,15 +228,10 @@ fn test_should_panic_bad_message() {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::YesWithMessage(expected),
             compile_fail: false,
@@ -302,15 +267,10 @@ fn test_should_panic_non_string_message_type() {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::YesWithMessage(expected),
             compile_fail: false,
@@ -340,15 +300,10 @@ fn test_should_panic_but_succeeds() {
                 name: StaticTestName("whatever"),
                 ignore: false,
                 ignore_message: None,
-                #[cfg(not(bootstrap))]
                 source_file: "",
-                #[cfg(not(bootstrap))]
                 start_line: 0,
-                #[cfg(not(bootstrap))]
                 start_col: 0,
-                #[cfg(not(bootstrap))]
                 end_line: 0,
-                #[cfg(not(bootstrap))]
                 end_col: 0,
                 should_panic,
                 compile_fail: false,
@@ -378,15 +333,10 @@ fn report_time_test_template(report_time: bool) -> Option<TestExecTime> {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::No,
             compile_fail: false,
@@ -425,15 +375,10 @@ fn time_test_failure_template(test_type: TestType) -> TestResult {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::No,
             compile_fail: false,
@@ -474,15 +419,10 @@ fn typed_test_desc(test_type: TestType) -> TestDesc {
         name: StaticTestName("whatever"),
         ignore: false,
         ignore_message: None,
-        #[cfg(not(bootstrap))]
         source_file: "",
-        #[cfg(not(bootstrap))]
         start_line: 0,
-        #[cfg(not(bootstrap))]
         start_col: 0,
-        #[cfg(not(bootstrap))]
         end_line: 0,
-        #[cfg(not(bootstrap))]
         end_col: 0,
         should_panic: ShouldPanic::No,
         compile_fail: false,
@@ -596,15 +536,10 @@ pub fn exclude_should_panic_option() {
             name: StaticTestName("3"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::Yes,
             compile_fail: false,
@@ -630,15 +565,10 @@ pub fn exact_filter_match() {
                     name: StaticTestName(name),
                     ignore: false,
                     ignore_message: None,
-                    #[cfg(not(bootstrap))]
                     source_file: "",
-                    #[cfg(not(bootstrap))]
                     start_line: 0,
-                    #[cfg(not(bootstrap))]
                     start_col: 0,
-                    #[cfg(not(bootstrap))]
                     end_line: 0,
-                    #[cfg(not(bootstrap))]
                     end_col: 0,
                     should_panic: ShouldPanic::No,
                     compile_fail: false,
@@ -731,15 +661,10 @@ fn sample_tests() -> Vec<TestDescAndFn> {
                 name: DynTestName((*name).clone()),
                 ignore: false,
                 ignore_message: None,
-                #[cfg(not(bootstrap))]
                 source_file: "",
-                #[cfg(not(bootstrap))]
                 start_line: 0,
-                #[cfg(not(bootstrap))]
                 start_col: 0,
-                #[cfg(not(bootstrap))]
                 end_line: 0,
-                #[cfg(not(bootstrap))]
                 end_col: 0,
                 should_panic: ShouldPanic::No,
                 compile_fail: false,
@@ -870,15 +795,10 @@ pub fn test_bench_no_iter() {
         name: StaticTestName("f"),
         ignore: false,
         ignore_message: None,
-        #[cfg(not(bootstrap))]
         source_file: "",
-        #[cfg(not(bootstrap))]
         start_line: 0,
-        #[cfg(not(bootstrap))]
         start_col: 0,
-        #[cfg(not(bootstrap))]
         end_line: 0,
-        #[cfg(not(bootstrap))]
         end_col: 0,
         should_panic: ShouldPanic::No,
         compile_fail: false,
@@ -903,15 +823,10 @@ pub fn test_bench_iter() {
         name: StaticTestName("f"),
         ignore: false,
         ignore_message: None,
-        #[cfg(not(bootstrap))]
         source_file: "",
-        #[cfg(not(bootstrap))]
         start_line: 0,
-        #[cfg(not(bootstrap))]
         start_col: 0,
-        #[cfg(not(bootstrap))]
         end_line: 0,
-        #[cfg(not(bootstrap))]
         end_col: 0,
         should_panic: ShouldPanic::No,
         compile_fail: false,
@@ -929,15 +844,10 @@ fn should_sort_failures_before_printing_them() {
         name: StaticTestName("a"),
         ignore: false,
         ignore_message: None,
-        #[cfg(not(bootstrap))]
         source_file: "",
-        #[cfg(not(bootstrap))]
         start_line: 0,
-        #[cfg(not(bootstrap))]
         start_col: 0,
-        #[cfg(not(bootstrap))]
         end_line: 0,
-        #[cfg(not(bootstrap))]
         end_col: 0,
         should_panic: ShouldPanic::No,
         compile_fail: false,
@@ -949,15 +859,10 @@ fn should_sort_failures_before_printing_them() {
         name: StaticTestName("b"),
         ignore: false,
         ignore_message: None,
-        #[cfg(not(bootstrap))]
         source_file: "",
-        #[cfg(not(bootstrap))]
         start_line: 0,
-        #[cfg(not(bootstrap))]
         start_col: 0,
-        #[cfg(not(bootstrap))]
         end_line: 0,
-        #[cfg(not(bootstrap))]
         end_col: 0,
         should_panic: ShouldPanic::No,
         compile_fail: false,
@@ -1006,15 +911,10 @@ fn test_dyn_bench_returning_err_fails_when_run_as_test() {
             name: StaticTestName("whatever"),
             ignore: false,
             ignore_message: None,
-            #[cfg(not(bootstrap))]
             source_file: "",
-            #[cfg(not(bootstrap))]
             start_line: 0,
-            #[cfg(not(bootstrap))]
             start_col: 0,
-            #[cfg(not(bootstrap))]
             end_line: 0,
-            #[cfg(not(bootstrap))]
             end_col: 0,
             should_panic: ShouldPanic::No,
             compile_fail: false,
diff --git a/library/test/src/types.rs b/library/test/src/types.rs
index 8d4e204c8ac..e79914dbf4b 100644
--- a/library/test/src/types.rs
+++ b/library/test/src/types.rs
@@ -119,15 +119,10 @@ pub struct TestDesc {
     pub name: TestName,
     pub ignore: bool,
     pub ignore_message: Option<&'static str>,
-    #[cfg(not(bootstrap))]
     pub source_file: &'static str,
-    #[cfg(not(bootstrap))]
     pub start_line: usize,
-    #[cfg(not(bootstrap))]
     pub start_col: usize,
-    #[cfg(not(bootstrap))]
     pub end_line: usize,
-    #[cfg(not(bootstrap))]
     pub end_col: usize,
     pub should_panic: options::ShouldPanic,
     pub compile_fail: bool,
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 680a8da6adf..ff261ab9832 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -19,7 +19,10 @@ try:
 except ImportError:
     lzma = None
 
-if sys.platform == 'win32':
+def platform_is_win32():
+    return sys.platform == 'win32'
+
+if platform_is_win32():
     EXE_SUFFIX = ".exe"
 else:
     EXE_SUFFIX = ""
@@ -78,7 +81,6 @@ def _download(path, url, probably_big, verbose, exception):
     if probably_big or verbose:
         print("downloading {}".format(url))
 
-    platform_is_win32 = sys.platform == 'win32'
     try:
         if probably_big or verbose:
             option = "-#"
@@ -86,7 +88,7 @@ def _download(path, url, probably_big, verbose, exception):
             option = "-s"
         # If curl is not present on Win32, we should not sys.exit
         #   but raise `CalledProcessError` or `OSError` instead
-        require(["curl", "--version"], exception=platform_is_win32)
+        require(["curl", "--version"], exception=platform_is_win32())
         with open(path, "wb") as outfile:
             run(["curl", option,
                 "-L", # Follow redirect.
@@ -99,8 +101,8 @@ def _download(path, url, probably_big, verbose, exception):
             )
     except (subprocess.CalledProcessError, OSError, RuntimeError):
         # see http://serverfault.com/questions/301128/how-to-download
-        if platform_is_win32:
-            run(["PowerShell.exe", "/nologo", "-Command",
+        if platform_is_win32():
+            run_powershell([
                  "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;",
                  "(New-Object System.Net.WebClient).DownloadFile('{}', '{}')".format(url, path)],
                 verbose=verbose,
@@ -174,6 +176,10 @@ def run(args, verbose=False, exception=False, is_bootstrap=False, **kwargs):
         else:
             sys.exit(err)
 
+def run_powershell(script, *args, **kwargs):
+    """Run a powershell script"""
+    run(["PowerShell.exe", "/nologo", "-Command"] + script, *args, **kwargs)
+
 
 def require(cmd, exit=True, exception=False):
     '''Run a command, returning its output.
@@ -209,21 +215,27 @@ def default_build_triple(verbose):
     # install, use their preference. This fixes most issues with Windows builds
     # being detected as GNU instead of MSVC.
     default_encoding = sys.getdefaultencoding()
-    try:
-        version = subprocess.check_output(["rustc", "--version", "--verbose"],
-                stderr=subprocess.DEVNULL)
-        version = version.decode(default_encoding)
-        host = next(x for x in version.split('\n') if x.startswith("host: "))
-        triple = host.split("host: ")[1]
-        if verbose:
-            print("detected default triple {} from pre-installed rustc".format(triple))
-        return triple
-    except Exception as e:
+
+    if sys.platform == 'darwin':
         if verbose:
-            print("pre-installed rustc not detected: {}".format(e))
+            print("not using rustc detection as it is unreliable on macOS")
             print("falling back to auto-detect")
+    else:
+        try:
+            version = subprocess.check_output(["rustc", "--version", "--verbose"],
+                    stderr=subprocess.DEVNULL)
+            version = version.decode(default_encoding)
+            host = next(x for x in version.split('\n') if x.startswith("host: "))
+            triple = host.split("host: ")[1]
+            if verbose:
+                print("detected default triple {} from pre-installed rustc".format(triple))
+            return triple
+        except Exception as e:
+            if verbose:
+                print("pre-installed rustc not detected: {}".format(e))
+                print("falling back to auto-detect")
 
-    required = sys.platform != 'win32'
+    required = not platform_is_win32()
     ostype = require(["uname", "-s"], exit=required)
     cputype = require(['uname', '-m'], exit=required)
 
@@ -428,6 +440,23 @@ class RustBuild(object):
                 (not os.path.exists(self.rustc()) or
                  self.program_out_of_date(self.rustc_stamp(), key)):
             if os.path.exists(bin_root):
+                # HACK: On Windows, we can't delete rust-analyzer-proc-macro-server while it's
+                # running. Kill it.
+                if platform_is_win32():
+                    print("Killing rust-analyzer-proc-macro-srv before deleting stage0 toolchain")
+                    regex =  '{}\\\\(host|{})\\\\stage0\\\\libexec'.format(
+                        os.path.basename(self.build_dir),
+                        self.build
+                    )
+                    script = (
+                        # NOTE: can't use `taskkill` or `Get-Process -Name` because they error if
+                        # the server isn't running.
+                        'Get-Process | ' +
+                        'Where-Object {$_.Name -eq "rust-analyzer-proc-macro-srv"} |' +
+                        'Where-Object {{$_.Path -match "{}"}} |'.format(regex) +
+                        'Stop-Process'
+                    )
+                    run_powershell([script])
                 shutil.rmtree(bin_root)
             tarball_suffix = '.tar.gz' if lzma is None else '.tar.xz'
             filename = "rust-std-{}-{}{}".format(
diff --git a/src/bootstrap/bootstrap_test.py b/src/bootstrap/bootstrap_test.py
index 26bd80a008f..5ecda83ee66 100644
--- a/src/bootstrap/bootstrap_test.py
+++ b/src/bootstrap/bootstrap_test.py
@@ -112,6 +112,14 @@ class GenerateAndParseConfig(unittest.TestCase):
         build = self.serialize_and_parse(["--set", "profile=compiler"])
         self.assertEqual(build.get_toml("profile"), 'compiler')
 
+    def test_set_codegen_backends(self):
+        build = self.serialize_and_parse(["--set", "rust.codegen-backends=cranelift"])
+        self.assertNotEqual(build.config_toml.find("codegen-backends = ['cranelift']"), -1)
+        build = self.serialize_and_parse(["--set", "rust.codegen-backends=cranelift,llvm"])
+        self.assertNotEqual(build.config_toml.find("codegen-backends = ['cranelift', 'llvm']"), -1)
+        build = self.serialize_and_parse(["--enable-full-tools"])
+        self.assertNotEqual(build.config_toml.find("codegen-backends = ['llvm']"), -1)
+
 if __name__ == '__main__':
     SUITE = unittest.TestSuite()
     TEST_LOADER = unittest.TestLoader()
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 0d2d512b4b2..d9d4685dfc7 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -634,6 +634,14 @@ impl Kind {
             Kind::Suggest => "suggest",
         }
     }
+
+    pub fn test_description(&self) -> &'static str {
+        match self {
+            Kind::Test => "Testing",
+            Kind::Bench => "Benchmarking",
+            _ => panic!("not a test command: {}!", self.as_str()),
+        }
+    }
 }
 
 impl<'a> Builder<'a> {
@@ -695,7 +703,6 @@ impl<'a> Builder<'a> {
                 crate::toolstate::ToolStateCheck,
                 test::ExpandYamlAnchors,
                 test::Tidy,
-                test::TidySelfTest,
                 test::Ui,
                 test::RunPassValgrind,
                 test::MirOpt,
@@ -711,11 +718,9 @@ impl<'a> Builder<'a> {
                 test::CrateLibrustc,
                 test::CrateRustdoc,
                 test::CrateRustdocJsonTypes,
-                test::CrateJsonDocLint,
-                test::SuggestTestsCrate,
+                test::CrateBootstrap,
                 test::Linkcheck,
                 test::TierCheck,
-                test::ReplacePlaceholderTest,
                 test::Cargotest,
                 test::Cargo,
                 test::RustAnalyzer,
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs
index 3574f11189e..72ac46b6bfd 100644
--- a/src/bootstrap/builder/tests.rs
+++ b/src/bootstrap/builder/tests.rs
@@ -578,7 +578,6 @@ mod dist {
                 compiler: Compiler { host, stage: 0 },
                 target: host,
                 mode: Mode::Std,
-                test_kind: test::TestKind::Test,
                 crates: vec![INTERNER.intern_str("std")],
             },]
         );
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index dd1851e29a9..571062a3a6f 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -153,8 +153,7 @@ v("experimental-targets", "llvm.experimental-targets",
   "experimental LLVM targets to build")
 v("release-channel", "rust.channel", "the name of the release channel to build")
 v("release-description", "rust.description", "optional descriptive string for version output")
-v("dist-compression-formats", None,
-  "comma-separated list of compression formats to use")
+v("dist-compression-formats", None, "List of compression formats to use")
 
 # Used on systems where "cc" is unavailable
 v("default-linker", "rust.default-linker", "the default linker")
@@ -168,8 +167,8 @@ o("extended", "build.extended", "build an extended rust tool set")
 v("tools", None, "List of extended tools will be installed")
 v("codegen-backends", None, "List of codegen backends to build")
 v("build", "build.build", "GNUs ./configure syntax LLVM build triple")
-v("host", None, "GNUs ./configure syntax LLVM host triples")
-v("target", None, "GNUs ./configure syntax LLVM target triples")
+v("host", None, "List of GNUs ./configure syntax LLVM host triples")
+v("target", None, "List of GNUs ./configure syntax LLVM target triples")
 
 v("set", None, "set arbitrary key/value pairs in TOML configuration")
 
@@ -182,6 +181,11 @@ def err(msg):
     print("configure: error: " + msg)
     sys.exit(1)
 
+def is_value_list(key):
+    for option in options:
+        if option.name == key and option.desc.startswith('List of'):
+            return True
+    return False
 
 if '--help' in sys.argv or '-h' in sys.argv:
     print('Usage: ./configure [options]')
@@ -295,6 +299,8 @@ def set(key, value, config):
     parts = key.split('.')
     for i, part in enumerate(parts):
         if i == len(parts) - 1:
+            if is_value_list(part) and isinstance(value, str):
+                value = value.split(',')
             arr[part] = value
         else:
             if part not in arr:
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 238d167c4c2..59d2e9cc69e 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -131,8 +131,7 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
     /* Extra values not defined in the built-in targets yet, but used in std */
     (Some(Mode::Std), "target_env", Some(&["libnx"])),
     // (Some(Mode::Std), "target_os", Some(&[])),
-    // #[cfg(bootstrap)] loongarch64
-    (Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa", "loongarch64"])),
+    (Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa"])),
     /* Extra names used by dependencies */
     // FIXME: Used by serde_json, but we should not be triggering on external dependencies.
     (Some(Mode::Rustc), "no_btreemap_remove_entry", None),
@@ -152,8 +151,6 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
     // Needed to avoid the need to copy windows.lib into the sysroot.
     (Some(Mode::Rustc), "windows_raw_dylib", None),
     (Some(Mode::ToolRustc), "windows_raw_dylib", None),
-    // #[cfg(bootstrap)] ohos
-    (Some(Mode::Std), "target_env", Some(&["ohos"])),
 ];
 
 /// A structure representing a Rust compiler.
@@ -249,6 +246,7 @@ struct Crate {
     name: Interned<String>,
     deps: HashSet<Interned<String>>,
     path: PathBuf,
+    has_lib: bool,
 }
 
 impl Crate {
diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
index 597aefadcfe..8f2c3faca3a 100644
--- a/src/bootstrap/metadata.rs
+++ b/src/bootstrap/metadata.rs
@@ -5,7 +5,7 @@ use serde_derive::Deserialize;
 
 use crate::cache::INTERNER;
 use crate::util::output;
-use crate::{Build, Crate};
+use crate::{t, Build, Crate};
 
 /// For more information, see the output of
 /// <https://doc.rust-lang.org/nightly/cargo/commands/cargo-metadata.html>
@@ -22,6 +22,7 @@ struct Package {
     source: Option<String>,
     manifest_path: String,
     dependencies: Vec<Dependency>,
+    targets: Vec<Target>,
 }
 
 /// For more information, see the output of
@@ -32,6 +33,11 @@ struct Dependency {
     source: Option<String>,
 }
 
+#[derive(Debug, Deserialize)]
+struct Target {
+    kind: Vec<String>,
+}
+
 /// Collects and stores package metadata of each workspace members into `build`,
 /// by executing `cargo metadata` commands.
 pub fn build(build: &mut Build) {
@@ -46,11 +52,16 @@ pub fn build(build: &mut Build) {
                 .filter(|dep| dep.source.is_none())
                 .map(|dep| INTERNER.intern_string(dep.name))
                 .collect();
-            let krate = Crate { name, deps, path };
+            let has_lib = package.targets.iter().any(|t| t.kind.iter().any(|k| k == "lib"));
+            let krate = Crate { name, deps, path, has_lib };
             let relative_path = krate.local_path(build);
             build.crates.insert(name, krate);
             let existing_path = build.crate_paths.insert(relative_path, name);
-            assert!(existing_path.is_none(), "multiple crates with the same path");
+            assert!(
+                existing_path.is_none(),
+                "multiple crates with the same path: {}",
+                existing_path.unwrap()
+            );
         }
     }
 }
@@ -60,7 +71,7 @@ pub fn build(build: &mut Build) {
 /// Note that `src/tools/cargo` is no longer a workspace member but we still
 /// treat it as one here, by invoking an additional `cargo metadata` command.
 fn workspace_members(build: &Build) -> impl Iterator<Item = Package> {
-    let cmd_metadata = |manifest_path| {
+    let collect_metadata = |manifest_path| {
         let mut cargo = Command::new(&build.initial_cargo);
         cargo
             .arg("metadata")
@@ -68,21 +79,20 @@ fn workspace_members(build: &Build) -> impl Iterator<Item = Package> {
             .arg("1")
             .arg("--no-deps")
             .arg("--manifest-path")
-            .arg(manifest_path);
-        cargo
+            .arg(build.src.join(manifest_path));
+        let metadata_output = output(&mut cargo);
+        let Output { packages, .. } = t!(serde_json::from_str(&metadata_output));
+        packages
     };
 
-    // Collects `metadata.packages` from the root workspace.
-    let root_manifest_path = build.src.join("Cargo.toml");
-    let root_output = output(&mut cmd_metadata(&root_manifest_path));
-    let Output { packages, .. } = serde_json::from_str(&root_output).unwrap();
-
-    // Collects `metadata.packages` from src/tools/cargo separately.
-    let cargo_manifest_path = build.src.join("src/tools/cargo/Cargo.toml");
-    let cargo_output = output(&mut cmd_metadata(&cargo_manifest_path));
-    let Output { packages: cargo_packages, .. } = serde_json::from_str(&cargo_output).unwrap();
+    // Collects `metadata.packages` from all workspaces.
+    let packages = collect_metadata("Cargo.toml");
+    let cargo_packages = collect_metadata("src/tools/cargo/Cargo.toml");
+    let ra_packages = collect_metadata("src/tools/rust-analyzer/Cargo.toml");
+    let bootstrap_packages = collect_metadata("src/bootstrap/Cargo.toml");
 
     // We only care about the root package from `src/tool/cargo` workspace.
     let cargo_package = cargo_packages.into_iter().find(|pkg| pkg.name == "cargo").into_iter();
-    packages.into_iter().chain(cargo_package)
+
+    packages.into_iter().chain(cargo_package).chain(ra_packages).chain(bootstrap_packages)
 }
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 601351ea8e3..aee84e9c9be 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -13,6 +13,7 @@ use std::process::{Command, Stdio};
 use crate::builder::crate_description;
 use crate::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
 use crate::cache::Interned;
+use crate::cache::INTERNER;
 use crate::compile;
 use crate::config::TargetSelection;
 use crate::dist;
@@ -27,44 +28,6 @@ use crate::{envify, CLang, DocTests, GitRepo, Mode};
 
 const ADB_TEST_DIR: &str = "/data/local/tmp/work";
 
-/// The two modes of the test runner; tests or benchmarks.
-#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, PartialOrd, Ord)]
-pub enum TestKind {
-    /// Run `cargo test`.
-    Test,
-    /// Run `cargo bench`.
-    Bench,
-}
-
-impl From<Kind> for TestKind {
-    fn from(kind: Kind) -> Self {
-        match kind {
-            Kind::Test => TestKind::Test,
-            Kind::Bench => TestKind::Bench,
-            _ => panic!("unexpected kind in crate: {:?}", kind),
-        }
-    }
-}
-
-impl TestKind {
-    // Return the cargo subcommand for this test kind
-    fn subcommand(self) -> &'static str {
-        match self {
-            TestKind::Test => "test",
-            TestKind::Bench => "bench",
-        }
-    }
-}
-
-impl Into<Kind> for TestKind {
-    fn into(self) -> Kind {
-        match self {
-            TestKind::Test => Kind::Test,
-            TestKind::Bench => Kind::Bench,
-        }
-    }
-}
-
 fn try_run(builder: &Builder<'_>, cmd: &mut Command) -> bool {
     if !builder.fail_fast {
         if !builder.try_run(cmd) {
@@ -92,26 +55,37 @@ fn try_run_quiet(builder: &Builder<'_>, cmd: &mut Command) -> bool {
 }
 
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub struct CrateJsonDocLint {
+pub struct CrateBootstrap {
+    path: Interned<PathBuf>,
     host: TargetSelection,
 }
 
-impl Step for CrateJsonDocLint {
+impl Step for CrateBootstrap {
     type Output = ();
     const ONLY_HOSTS: bool = true;
     const DEFAULT: bool = true;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
         run.path("src/tools/jsondoclint")
+            .path("src/tools/suggest-tests")
+            .path("src/tools/replace-version-placeholder")
+            .alias("tidyselftest")
     }
 
     fn make_run(run: RunConfig<'_>) {
-        run.builder.ensure(CrateJsonDocLint { host: run.target });
+        for path in run.paths {
+            let path = INTERNER.intern_path(path.assert_single_path().path.clone());
+            run.builder.ensure(CrateBootstrap { host: run.target, path });
+        }
     }
 
     fn run(self, builder: &Builder<'_>) {
         let bootstrap_host = builder.config.build;
         let compiler = builder.compiler(0, bootstrap_host);
+        let mut path = self.path.to_str().unwrap();
+        if path == "tidyselftest" {
+            path = "src/tools/tidy";
+        }
 
         let cargo = tool::prepare_tool_cargo(
             builder,
@@ -119,47 +93,18 @@ impl Step for CrateJsonDocLint {
             Mode::ToolBootstrap,
             bootstrap_host,
             "test",
-            "src/tools/jsondoclint",
+            path,
             SourceType::InTree,
             &[],
         );
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
-    }
-}
-
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub struct SuggestTestsCrate {
-    host: TargetSelection,
-}
-
-impl Step for SuggestTestsCrate {
-    type Output = ();
-    const ONLY_HOSTS: bool = true;
-    const DEFAULT: bool = true;
-
-    fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.path("src/tools/suggest-tests")
-    }
-
-    fn make_run(run: RunConfig<'_>) {
-        run.builder.ensure(SuggestTestsCrate { host: run.target });
-    }
-
-    fn run(self, builder: &Builder<'_>) {
-        let bootstrap_host = builder.config.build;
-        let compiler = builder.compiler(0, bootstrap_host);
-
-        let suggest_tests = tool::prepare_tool_cargo(
-            builder,
-            compiler,
-            Mode::ToolBootstrap,
+        builder.info(&format!(
+            "{} {} stage0 ({})",
+            builder.kind.test_description(),
+            path,
             bootstrap_host,
-            "test",
-            "src/tools/suggest-tests",
-            SourceType::InTree,
-            &[],
-        );
-        add_flags_and_try_run_tests(builder, &mut suggest_tests.into());
+        ));
+        let crate_name = path.rsplit_once('/').unwrap().1;
+        run_cargo_test(cargo, &[], &[], crate_name, compiler, bootstrap_host, builder);
     }
 }
 
@@ -208,7 +153,11 @@ You can skip linkcheck with --exclude src/tools/linkchecker"
             SourceType::InTree,
             &[],
         );
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &[], "linkchecker", compiler, bootstrap_host, builder);
+
+        if builder.doc_tests == DocTests::No {
+            return;
+        }
 
         // Build all the default documentation.
         builder.default_doc(&[]);
@@ -344,7 +293,7 @@ impl Step for Cargo {
         let compiler = builder.compiler(self.stage, self.host);
 
         builder.ensure(tool::Cargo { compiler, target: self.host });
-        let mut cargo = tool::prepare_tool_cargo(
+        let cargo = tool::prepare_tool_cargo(
             builder,
             compiler,
             Mode::ToolRustc,
@@ -355,10 +304,8 @@ impl Step for Cargo {
             &[],
         );
 
-        if !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-        cargo.arg("--").args(builder.config.cmd.test_args());
+        // NOTE: can't use `run_cargo_test` because we need to overwrite `PATH`
+        let mut cargo = prepare_cargo_test(cargo, &[], &[], "cargo", compiler, self.host, builder);
 
         // Don't run cross-compile tests, we may not have cross-compiled libstd libs
         // available.
@@ -366,10 +313,10 @@ impl Step for Cargo {
         // Forcibly disable tests using nightly features since any changes to
         // those features won't be able to land.
         cargo.env("CARGO_TEST_DISABLE_NIGHTLY", "1");
-
         cargo.env("PATH", &path_for_cargo(builder, compiler));
 
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        let _time = util::timeit(&builder);
+        add_flags_and_try_run_tests(builder, &mut cargo);
     }
 }
 
@@ -426,9 +373,7 @@ impl Step for RustAnalyzer {
         cargo.env("SKIP_SLOW_TESTS", "1");
 
         cargo.add_rustc_lib_path(builder, compiler);
-        cargo.arg("--").args(builder.config.cmd.test_args());
-
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &[], "rust-analyzer", compiler, host, builder);
     }
 }
 
@@ -471,17 +416,13 @@ impl Step for Rustfmt {
             &[],
         );
 
-        if !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-
         let dir = testdir(builder, compiler.host);
         t!(fs::create_dir_all(&dir));
         cargo.env("RUSTFMT_TEST_DIR", dir);
 
         cargo.add_rustc_lib_path(builder, compiler);
 
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &[], "rustfmt", compiler, host, builder);
     }
 }
 
@@ -527,12 +468,9 @@ impl Step for RustDemangler {
         t!(fs::create_dir_all(&dir));
 
         cargo.env("RUST_DEMANGLER_DRIVER_PATH", rust_demangler);
-
-        cargo.arg("--").args(builder.config.cmd.test_args());
-
         cargo.add_rustc_lib_path(builder, compiler);
 
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &[], "rust-demangler", compiler, host, builder);
     }
 }
 
@@ -655,10 +593,6 @@ impl Step for Miri {
         );
         cargo.add_rustc_lib_path(builder, compiler);
 
-        if !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-
         // miri tests need to know about the stage sysroot
         cargo.env("MIRI_SYSROOT", &miri_sysroot);
         cargo.env("MIRI_HOST_SYSROOT", sysroot);
@@ -670,13 +604,14 @@ impl Step for Miri {
 
         // Set the target.
         cargo.env("MIRI_TEST_TARGET", target.rustc_target_arg());
-        // Forward test filters.
-        cargo.arg("--").args(builder.config.cmd.test_args());
 
-        // This can NOT be `add_flags_and_try_run_tests` since the Miri test runner
-        // does not understand those flags!
-        let mut cargo = Command::from(cargo);
-        builder.run(&mut cargo);
+        // This can NOT be `run_cargo_test` since the Miri test runner
+        // does not understand the flags added by `add_flags_and_try_run_test`.
+        let mut cargo = prepare_cargo_test(cargo, &[], &[], "miri", compiler, target, builder);
+        {
+            let _time = util::timeit(&builder);
+            builder.run(&mut cargo);
+        }
 
         // # Run `cargo miri test`.
         // This is just a smoke test (Miri's own CI invokes this in a bunch of different ways and ensures
@@ -709,6 +644,7 @@ impl Step for Miri {
         cargo.env("RUST_BACKTRACE", "1");
 
         let mut cargo = Command::from(cargo);
+        let _time = util::timeit(&builder);
         builder.run(&mut cargo);
     }
 }
@@ -748,8 +684,7 @@ impl Step for CompiletestTest {
             &[],
         );
         cargo.allow_features("test");
-
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &[], "compiletest", compiler, host, builder);
     }
 }
 
@@ -792,20 +727,15 @@ impl Step for Clippy {
             &[],
         );
 
-        if !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-
         cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler));
         cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler));
         let host_libs = builder.stage_out(compiler, Mode::ToolRustc).join(builder.cargo_dir());
         cargo.env("HOST_LIBS", host_libs);
 
-        cargo.arg("--").args(builder.config.cmd.test_args());
-
         cargo.add_rustc_lib_path(builder, compiler);
+        let mut cargo = prepare_cargo_test(cargo, &[], &[], "clippy", compiler, host, builder);
 
-        if builder.try_run(&mut cargo.into()) {
+        if builder.try_run(&mut cargo) {
             // The tests succeeded; nothing to do.
             return;
         }
@@ -1203,40 +1133,6 @@ help: to skip test's attempt to check tidiness, pass `--exclude src/tools/tidy`
     }
 }
 
-/// Runs tidy's own tests.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub struct TidySelfTest;
-
-impl Step for TidySelfTest {
-    type Output = ();
-    const DEFAULT: bool = true;
-    const ONLY_HOSTS: bool = true;
-
-    fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.alias("tidyselftest")
-    }
-
-    fn make_run(run: RunConfig<'_>) {
-        run.builder.ensure(TidySelfTest);
-    }
-
-    fn run(self, builder: &Builder<'_>) {
-        let bootstrap_host = builder.config.build;
-        let compiler = builder.compiler(0, bootstrap_host);
-        let cargo = tool::prepare_tool_cargo(
-            builder,
-            compiler,
-            Mode::ToolBootstrap,
-            bootstrap_host,
-            "test",
-            "src/tools/tidy",
-            SourceType::InTree,
-            &[],
-        );
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
-    }
-}
-
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub struct ExpandYamlAnchors;
 
@@ -2111,7 +2007,6 @@ impl Step for RustcGuide {
 pub struct CrateLibrustc {
     compiler: Compiler,
     target: TargetSelection,
-    test_kind: TestKind,
     crates: Vec<Interned<String>>,
 }
 
@@ -2133,9 +2028,8 @@ impl Step for CrateLibrustc {
             .iter()
             .map(|p| builder.crate_paths[&p.assert_single_path().path].clone())
             .collect();
-        let test_kind = builder.kind.into();
 
-        builder.ensure(CrateLibrustc { compiler, target: run.target, test_kind, crates });
+        builder.ensure(CrateLibrustc { compiler, target: run.target, crates });
     }
 
     fn run(self, builder: &Builder<'_>) {
@@ -2143,18 +2037,106 @@ impl Step for CrateLibrustc {
             compiler: self.compiler,
             target: self.target,
             mode: Mode::Rustc,
-            test_kind: self.test_kind,
             crates: self.crates,
         });
     }
 }
 
+/// Given a `cargo test` subcommand, add the appropriate flags and run it.
+///
+/// Returns whether the test succeeded.
+fn run_cargo_test(
+    cargo: impl Into<Command>,
+    libtest_args: &[&str],
+    crates: &[Interned<String>],
+    primary_crate: &str,
+    compiler: Compiler,
+    target: TargetSelection,
+    builder: &Builder<'_>,
+) -> bool {
+    let mut cargo =
+        prepare_cargo_test(cargo, libtest_args, crates, primary_crate, compiler, target, builder);
+    let _time = util::timeit(&builder);
+    add_flags_and_try_run_tests(builder, &mut cargo)
+}
+
+/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
+fn prepare_cargo_test(
+    cargo: impl Into<Command>,
+    libtest_args: &[&str],
+    crates: &[Interned<String>],
+    primary_crate: &str,
+    compiler: Compiler,
+    target: TargetSelection,
+    builder: &Builder<'_>,
+) -> Command {
+    let mut cargo = cargo.into();
+
+    // Pass in some standard flags then iterate over the graph we've discovered
+    // in `cargo metadata` with the maps above and figure out what `-p`
+    // arguments need to get passed.
+    if builder.kind == Kind::Test && !builder.fail_fast {
+        cargo.arg("--no-fail-fast");
+    }
+    match builder.doc_tests {
+        DocTests::Only => {
+            cargo.arg("--doc");
+        }
+        DocTests::No => {
+            let krate = &builder
+                .crates
+                .get(&INTERNER.intern_str(primary_crate))
+                .unwrap_or_else(|| panic!("missing crate {primary_crate}"));
+            if krate.has_lib {
+                cargo.arg("--lib");
+            }
+            cargo.args(&["--bins", "--examples", "--tests", "--benches"]);
+        }
+        DocTests::Yes => {}
+    }
+
+    for &krate in crates {
+        cargo.arg("-p").arg(krate);
+    }
+
+    cargo.arg("--").args(&builder.config.cmd.test_args()).args(libtest_args);
+    if !builder.config.verbose_tests {
+        cargo.arg("--quiet");
+    }
+
+    // The tests are going to run with the *target* libraries, so we need to
+    // ensure that those libraries show up in the LD_LIBRARY_PATH equivalent.
+    //
+    // Note that to run the compiler we need to run with the *host* libraries,
+    // but our wrapper scripts arrange for that to be the case anyway.
+    let mut dylib_path = dylib_path();
+    dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
+    cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
+
+    if target.contains("emscripten") {
+        cargo.env(
+            format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
+            builder.config.nodejs.as_ref().expect("nodejs not configured"),
+        );
+    } else if target.starts_with("wasm32") {
+        let node = builder.config.nodejs.as_ref().expect("nodejs not configured");
+        let runner = format!("{} {}/src/etc/wasm32-shim.js", node.display(), builder.src.display());
+        cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)), &runner);
+    } else if builder.remote_tested(target) {
+        cargo.env(
+            format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
+            format!("{} run 0", builder.tool_exe(Tool::RemoteTestClient).display()),
+        );
+    }
+
+    cargo
+}
+
 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub struct Crate {
     pub compiler: Compiler,
     pub target: TargetSelection,
     pub mode: Mode,
-    pub test_kind: TestKind,
     pub crates: Vec<Interned<String>>,
 }
 
@@ -2170,14 +2152,13 @@ impl Step for Crate {
         let builder = run.builder;
         let host = run.build_triple();
         let compiler = builder.compiler_for(builder.top_stage, host, host);
-        let test_kind = builder.kind.into();
         let crates = run
             .paths
             .iter()
             .map(|p| builder.crate_paths[&p.assert_single_path().path].clone())
             .collect();
 
-        builder.ensure(Crate { compiler, target: run.target, mode: Mode::Std, test_kind, crates });
+        builder.ensure(Crate { compiler, target: run.target, mode: Mode::Std, crates });
     }
 
     /// Runs all unit tests plus documentation tests for a given crate defined
@@ -2192,7 +2173,6 @@ impl Step for Crate {
         let compiler = self.compiler;
         let target = self.target;
         let mode = self.mode;
-        let test_kind = self.test_kind;
 
         builder.ensure(compile::Std::new(compiler, target));
         builder.ensure(RemoteCopyLibs { compiler, target });
@@ -2204,7 +2184,7 @@ impl Step for Crate {
         let compiler = builder.compiler_for(compiler.stage, compiler.host, target);
 
         let mut cargo =
-            builder.cargo(compiler, mode, SourceType::InTree, target, test_kind.subcommand());
+            builder.cargo(compiler, mode, SourceType::InTree, target, builder.kind.as_str());
         match mode {
             Mode::Std => {
                 compile::std_cargo(builder, target, compiler.stage, &mut cargo);
@@ -2215,69 +2195,14 @@ impl Step for Crate {
             _ => panic!("can only test libraries"),
         };
 
-        // Build up the base `cargo test` command.
-        //
-        // Pass in some standard flags then iterate over the graph we've discovered
-        // in `cargo metadata` with the maps above and figure out what `-p`
-        // arguments need to get passed.
-        if test_kind.subcommand() == "test" && !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-        match builder.doc_tests {
-            DocTests::Only => {
-                cargo.arg("--doc");
-            }
-            DocTests::No => {
-                cargo.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]);
-            }
-            DocTests::Yes => {}
-        }
-
-        for krate in &self.crates {
-            cargo.arg("-p").arg(krate);
-        }
-
-        // The tests are going to run with the *target* libraries, so we need to
-        // ensure that those libraries show up in the LD_LIBRARY_PATH equivalent.
-        //
-        // Note that to run the compiler we need to run with the *host* libraries,
-        // but our wrapper scripts arrange for that to be the case anyway.
-        let mut dylib_path = dylib_path();
-        dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
-        cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-
-        cargo.arg("--");
-        cargo.args(&builder.config.cmd.test_args());
-
-        cargo.arg("-Z").arg("unstable-options");
-        cargo.arg("--format").arg("json");
-
-        if target.contains("emscripten") {
-            cargo.env(
-                format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
-                builder.config.nodejs.as_ref().expect("nodejs not configured"),
-            );
-        } else if target.starts_with("wasm32") {
-            let node = builder.config.nodejs.as_ref().expect("nodejs not configured");
-            let runner =
-                format!("{} {}/src/etc/wasm32-shim.js", node.display(), builder.src.display());
-            cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)), &runner);
-        } else if builder.remote_tested(target) {
-            cargo.env(
-                format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
-                format!("{} run 0", builder.tool_exe(Tool::RemoteTestClient).display()),
-            );
-        }
-
         let _guard = builder.msg(
-            test_kind,
+            builder.kind,
             compiler.stage,
             crate_description(&self.crates),
             compiler.host,
             target,
         );
-        let _time = util::timeit(&builder);
-        crate::render_tests::try_run_tests(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &self.crates, &self.crates[0], compiler, target, builder);
     }
 }
 
@@ -2285,7 +2210,6 @@ impl Step for Crate {
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub struct CrateRustdoc {
     host: TargetSelection,
-    test_kind: TestKind,
 }
 
 impl Step for CrateRustdoc {
@@ -2300,13 +2224,10 @@ impl Step for CrateRustdoc {
     fn make_run(run: RunConfig<'_>) {
         let builder = run.builder;
 
-        let test_kind = builder.kind.into();
-
-        builder.ensure(CrateRustdoc { host: run.target, test_kind });
+        builder.ensure(CrateRustdoc { host: run.target });
     }
 
     fn run(self, builder: &Builder<'_>) {
-        let test_kind = self.test_kind;
         let target = self.host;
 
         let compiler = if builder.download_rustc() {
@@ -2325,29 +2246,11 @@ impl Step for CrateRustdoc {
             compiler,
             Mode::ToolRustc,
             target,
-            test_kind.subcommand(),
+            builder.kind.as_str(),
             "src/tools/rustdoc",
             SourceType::InTree,
             &[],
         );
-        if test_kind.subcommand() == "test" && !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-        match builder.doc_tests {
-            DocTests::Only => {
-                cargo.arg("--doc");
-            }
-            DocTests::No => {
-                cargo.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]);
-            }
-            DocTests::Yes => {}
-        }
-
-        cargo.arg("-p").arg("rustdoc:0.0.0");
-
-        cargo.arg("--");
-        cargo.args(&builder.config.cmd.test_args());
-
         if self.host.contains("musl") {
             cargo.arg("'-Ctarget-feature=-crt-static'");
         }
@@ -2387,22 +2290,22 @@ impl Step for CrateRustdoc {
         dylib_path.insert(0, PathBuf::from(&*libdir));
         cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
 
-        if !builder.config.verbose_tests {
-            cargo.arg("--quiet");
-        }
-
-        let _guard = builder.msg(test_kind, compiler.stage, "rustdoc", compiler.host, target);
-
-        let _time = util::timeit(&builder);
-
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+        let _guard = builder.msg(builder.kind, compiler.stage, "rustdoc", compiler.host, target);
+        run_cargo_test(
+            cargo,
+            &[],
+            &[INTERNER.intern_str("rustdoc:0.0.0")],
+            "rustdoc",
+            compiler,
+            target,
+            builder,
+        );
     }
 }
 
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub struct CrateRustdocJsonTypes {
     host: TargetSelection,
-    test_kind: TestKind,
 }
 
 impl Step for CrateRustdocJsonTypes {
@@ -2417,13 +2320,10 @@ impl Step for CrateRustdocJsonTypes {
     fn make_run(run: RunConfig<'_>) {
         let builder = run.builder;
 
-        let test_kind = builder.kind.into();
-
-        builder.ensure(CrateRustdocJsonTypes { host: run.target, test_kind });
+        builder.ensure(CrateRustdocJsonTypes { host: run.target });
     }
 
     fn run(self, builder: &Builder<'_>) {
-        let test_kind = self.test_kind;
         let target = self.host;
 
         // Use the previous stage compiler to reuse the artifacts that are
@@ -2433,34 +2333,35 @@ impl Step for CrateRustdocJsonTypes {
         let compiler = builder.compiler_for(builder.top_stage, target, target);
         builder.ensure(compile::Rustc::new(compiler, target));
 
-        let mut cargo = tool::prepare_tool_cargo(
+        let cargo = tool::prepare_tool_cargo(
             builder,
             compiler,
             Mode::ToolRustc,
             target,
-            test_kind.subcommand(),
+            builder.kind.as_str(),
             "src/rustdoc-json-types",
             SourceType::InTree,
             &[],
         );
-        if test_kind.subcommand() == "test" && !builder.fail_fast {
-            cargo.arg("--no-fail-fast");
-        }
-
-        cargo.arg("-p").arg("rustdoc-json-types");
-
-        cargo.arg("--");
-        cargo.args(&builder.config.cmd.test_args());
 
-        if self.host.contains("musl") {
-            cargo.arg("'-Ctarget-feature=-crt-static'");
-        }
+        // FIXME: this looks very wrong, libtest doesn't accept `-C` arguments and the quotes are fishy.
+        let libtest_args = if self.host.contains("musl") {
+            ["'-Ctarget-feature=-crt-static'"].as_slice()
+        } else {
+            &[]
+        };
 
         let _guard =
-            builder.msg(test_kind, compiler.stage, "rustdoc-json-types", compiler.host, target);
-        let _time = util::timeit(&builder);
-
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
+            builder.msg(builder.kind, compiler.stage, "rustdoc-json-types", compiler.host, target);
+        run_cargo_test(
+            cargo,
+            libtest_args,
+            &[INTERNER.intern_str("rustdoc-json-types")],
+            "rustdoc-json-types",
+            compiler,
+            target,
+            builder,
+        );
     }
 }
 
@@ -2598,13 +2499,15 @@ impl Step for Bootstrap {
         check_bootstrap.arg("bootstrap_test.py").current_dir(builder.src.join("src/bootstrap/"));
         try_run(builder, &mut check_bootstrap);
 
+        let host = builder.config.build;
+        let compiler = builder.compiler(0, host);
         let mut cmd = Command::new(&builder.initial_cargo);
         cmd.arg("test")
             .current_dir(builder.src.join("src/bootstrap"))
             .env("RUSTFLAGS", "-Cdebuginfo=2")
             .env("CARGO_TARGET_DIR", builder.out.join("bootstrap"))
             .env("RUSTC_BOOTSTRAP", "1")
-            .env("RUSTDOC", builder.rustdoc(builder.compiler(0, builder.build.build)))
+            .env("RUSTDOC", builder.rustdoc(compiler))
             .env("RUSTC", &builder.initial_rustc);
         if let Some(flags) = option_env!("RUSTFLAGS") {
             // Use the same rustc flags for testing as for "normal" compilation,
@@ -2612,24 +2515,9 @@ impl Step for Bootstrap {
             // https://github.com/rust-lang/rust/issues/49215
             cmd.env("RUSTFLAGS", flags);
         }
-        if !builder.fail_fast {
-            cmd.arg("--no-fail-fast");
-        }
-        match builder.doc_tests {
-            DocTests::Only => {
-                cmd.arg("--doc");
-            }
-            DocTests::No => {
-                cmd.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]);
-            }
-            DocTests::Yes => {}
-        }
-
-        cmd.arg("--").args(&builder.config.cmd.test_args());
         // rustbuild tests are racy on directory creation so just run them one at a time.
         // Since there's not many this shouldn't be a problem.
-        cmd.arg("--test-threads=1");
-        add_flags_and_try_run_tests(builder, &mut cmd);
+        run_cargo_test(cmd, &["--test-threads=1"], &[], "bootstrap", compiler, host, builder);
     }
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -2686,43 +2574,6 @@ impl Step for TierCheck {
 }
 
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
-pub struct ReplacePlaceholderTest;
-
-impl Step for ReplacePlaceholderTest {
-    type Output = ();
-    const ONLY_HOSTS: bool = true;
-    const DEFAULT: bool = true;
-
-    /// Ensure the version placeholder replacement tool builds
-    fn run(self, builder: &Builder<'_>) {
-        builder.info("build check for version replacement placeholder");
-
-        // Test the version placeholder replacement tool itself.
-        let bootstrap_host = builder.config.build;
-        let compiler = builder.compiler(0, bootstrap_host);
-        let cargo = tool::prepare_tool_cargo(
-            builder,
-            compiler,
-            Mode::ToolBootstrap,
-            bootstrap_host,
-            "test",
-            "src/tools/replace-version-placeholder",
-            SourceType::InTree,
-            &[],
-        );
-        add_flags_and_try_run_tests(builder, &mut cargo.into());
-    }
-
-    fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.path("src/tools/replace-version-placeholder")
-    }
-
-    fn make_run(run: RunConfig<'_>) {
-        run.builder.ensure(Self);
-    }
-}
-
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub struct LintDocs {
     pub compiler: Compiler,
     pub target: TargetSelection,
@@ -2779,7 +2630,7 @@ impl Step for RustInstaller {
             SourceType::InTree,
             &[],
         );
-        try_run(builder, &mut cargo.into());
+        run_cargo_test(cargo, &[], &[], "installer", compiler, bootstrap_host, builder);
 
         // We currently don't support running the test.sh script outside linux(?) environments.
         // Eventually this should likely migrate to #[test]s in rust-installer proper rather than a
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 9418cf0a7ed..39f6369b4d3 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -141,7 +141,7 @@ pub fn prepare_tool_cargo(
     mode: Mode,
     target: TargetSelection,
     command: &'static str,
-    path: &'static str,
+    path: &str,
     source_type: SourceType,
     extra_features: &[String],
 ) -> CargoCommand {
diff --git a/src/ci/scripts/install-awscli.sh b/src/ci/scripts/install-awscli.sh
index 3d8f0de7a39..aa62407eaea 100755
--- a/src/ci/scripts/install-awscli.sh
+++ b/src/ci/scripts/install-awscli.sh
@@ -10,15 +10,14 @@
 #
 # Before compressing please make sure all the wheels end with `-none-any.whl`.
 # If that's not the case you'll need to remove the non-cross-platform ones and
-# replace them with the .tar.gz downloaded from https://pypi.org. Also make
-# sure it's possible to call this script with both Python 2 and Python 3.
+# replace them with the .tar.gz downloaded from https://pypi.org.
 
 set -euo pipefail
 IFS=$'\n\t'
 
 source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
 
-MIRROR="${MIRRORS_BASE}/2019-07-27-awscli.tar"
+MIRROR="${MIRRORS_BASE}/2023-04-28-awscli.tar"
 DEPS_DIR="/tmp/awscli-deps"
 
 pip="pip"
@@ -29,6 +28,8 @@ if isLinux; then
 
     sudo apt-get install -y python3-setuptools python3-wheel
     ciCommandAddPath "${HOME}/.local/bin"
+elif isMacOS; then
+    pip="pip3"
 fi
 
 mkdir -p "${DEPS_DIR}"
diff --git a/src/doc/rustdoc/src/lints.md b/src/doc/rustdoc/src/lints.md
index 45db3bb9b00..fd57b079644 100644
--- a/src/doc/rustdoc/src/lints.md
+++ b/src/doc/rustdoc/src/lints.md
@@ -374,3 +374,41 @@ warning: this URL is not a hyperlink
 
 warning: 2 warnings emitted
 ```
+
+## `unescaped_backticks`
+
+This lint is **allowed by default**. It detects backticks (\`) that are not escaped.
+This usually means broken inline code. For example:
+
+```rust
+#![warn(rustdoc::unescaped_backticks)]
+
+/// `add(a, b) is the same as `add(b, a)`.
+pub fn add(a: i32, b: i32) -> i32 { a + b }
+```
+
+Which will give:
+
+```text
+warning: unescaped backtick
+ --> src/lib.rs:3:41
+  |
+3 | /// `add(a, b) is the same as `add(b, a)`.
+  |                                         ^
+  |
+note: the lint level is defined here
+ --> src/lib.rs:1:9
+  |
+1 | #![warn(rustdoc::unescaped_backticks)]
+  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: a previous inline code might be longer than expected
+  |
+3 | /// `add(a, b)` is the same as `add(b, a)`.
+  |               +
+help: if you meant to use a literal backtick, escape it
+  |
+3 | /// `add(a, b) is the same as `add(b, a)\`.
+  |                                         +
+
+warning: 1 warning emitted
+```
diff --git a/src/doc/rustdoc/src/scraped-examples.md b/src/doc/rustdoc/src/scraped-examples.md
index d75f6d522e8..7197e01c8e3 100644
--- a/src/doc/rustdoc/src/scraped-examples.md
+++ b/src/doc/rustdoc/src/scraped-examples.md
@@ -24,14 +24,14 @@ Then this code snippet will be included in the documentation for `a_func`. This
 This feature is unstable, so you can enable it by calling Rustdoc with the unstable `rustdoc-scrape-examples` flag:
 
 ```bash
-cargo doc -Zunstable-options -Zrustdoc-scrape-examples=examples
+cargo doc -Zunstable-options -Zrustdoc-scrape-examples
 ```
 
 To enable this feature on [docs.rs](https://docs.rs), add this to your Cargo.toml:
 
 ```toml
 [package.metadata.docs.rs]
-cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples=examples"]
+cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
 ```
 
 
diff --git a/src/doc/style-guide/src/statements.md b/src/doc/style-guide/src/statements.md
index 4ab1c36f976..671e6d31a57 100644
--- a/src/doc/style-guide/src/statements.md
+++ b/src/doc/style-guide/src/statements.md
@@ -138,18 +138,31 @@ Otherwise, the `else` keyword and opening brace should be placed on the next lin
 For example:
 
 ```rust
-let Some(x) = abcdef()
-    .foo(
-        "abc",
-        some_really_really_really_long_ident,
-        "ident",
-        "123456",
-    )
-    .bar()
-    .baz()
-    .qux("fffffffffffffffff")
-else {
-    foo_bar()
+fn main() {
+    let Some(x) = abcdef()
+        .foo(
+            "abc",
+            some_really_really_really_long_ident,
+            "ident",
+            "123456",
+        )
+        .bar()
+        .baz()
+        .qux("fffffffffffffffff")
+    else {
+        return
+    };
+
+    let Some(x) = some_really_really_really_really_really_really_really_really_really_long_name
+    else {
+        return;
+    };
+
+    let Some(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) =
+        bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+    else {
+        return;
+    };
 }
 ```
 
diff --git a/src/doc/unstable-book/src/language-features/intrinsics.md b/src/doc/unstable-book/src/language-features/intrinsics.md
index a0fb4e743d3..ea9bace6dd4 100644
--- a/src/doc/unstable-book/src/language-features/intrinsics.md
+++ b/src/doc/unstable-book/src/language-features/intrinsics.md
@@ -22,7 +22,7 @@ via a declaration like
 extern "rust-intrinsic" {
     fn transmute<T, U>(x: T) -> U;
 
-    fn offset<T>(dst: *const T, offset: isize) -> *const T;
+    fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
 }
 ```
 
diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py
index 4f73746f817..c4381e202b9 100644
--- a/src/etc/lldb_providers.py
+++ b/src/etc/lldb_providers.py
@@ -31,7 +31,7 @@ from lldb import SBValue, SBData, SBError, eBasicTypeLong, eBasicTypeUnsignedLon
 #
 # You can find more information and examples here:
 #   1. https://lldb.llvm.org/varformats.html
-#   2. https://lldb.llvm.org/python-reference.html
+#   2. https://lldb.llvm.org/use/python-reference.html
 #   3. https://lldb.llvm.org/python_reference/lldb.formatters.cpp.libcxx-pysrc.html
 #   4. https://github.com/llvm-mirror/lldb/tree/master/examples/summaries/cocoa
 ####################################################################################################
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index c992a5388d1..8ccdb16b784 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -304,7 +304,7 @@ pub(crate) fn clean_predicate<'tcx>(
             clean_region_outlives_predicate(pred)
         }
         ty::PredicateKind::Clause(ty::Clause::TypeOutlives(pred)) => {
-            clean_type_outlives_predicate(pred, cx)
+            clean_type_outlives_predicate(bound_predicate.rebind(pred), cx)
         }
         ty::PredicateKind::Clause(ty::Clause::Projection(pred)) => {
             Some(clean_projection_predicate(bound_predicate.rebind(pred), cx))
@@ -345,7 +345,7 @@ fn clean_poly_trait_predicate<'tcx>(
 }
 
 fn clean_region_outlives_predicate<'tcx>(
-    pred: ty::OutlivesPredicate<ty::Region<'tcx>, ty::Region<'tcx>>,
+    pred: ty::RegionOutlivesPredicate<'tcx>,
 ) -> Option<WherePredicate> {
     let ty::OutlivesPredicate(a, b) = pred;
 
@@ -358,13 +358,13 @@ fn clean_region_outlives_predicate<'tcx>(
 }
 
 fn clean_type_outlives_predicate<'tcx>(
-    pred: ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>,
+    pred: ty::Binder<'tcx, ty::TypeOutlivesPredicate<'tcx>>,
     cx: &mut DocContext<'tcx>,
 ) -> Option<WherePredicate> {
-    let ty::OutlivesPredicate(ty, lt) = pred;
+    let ty::OutlivesPredicate(ty, lt) = pred.skip_binder();
 
     Some(WherePredicate::BoundPredicate {
-        ty: clean_middle_ty(ty::Binder::dummy(ty), cx, None),
+        ty: clean_middle_ty(pred.rebind(ty), cx, None),
         bounds: vec![GenericBound::Outlives(
             clean_middle_region(lt).expect("failed to clean lifetimes"),
         )],
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 74f330b7621..7371b44465b 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -11,6 +11,7 @@ use arrayvec::ArrayVec;
 use thin_vec::ThinVec;
 
 use rustc_ast as ast;
+use rustc_ast_pretty::pprust;
 use rustc_attr::{ConstStability, Deprecation, Stability, StabilityLevel};
 use rustc_const_eval::const_eval::is_unstable_const_fn;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
@@ -711,6 +712,78 @@ impl Item {
         };
         Some(tcx.visibility(def_id))
     }
+
+    pub(crate) fn attributes(&self, tcx: TyCtxt<'_>, keep_as_is: bool) -> Vec<String> {
+        const ALLOWED_ATTRIBUTES: &[Symbol] =
+            &[sym::export_name, sym::link_section, sym::no_mangle, sym::repr, sym::non_exhaustive];
+
+        use rustc_abi::IntegerType;
+        use rustc_middle::ty::ReprFlags;
+
+        let mut attrs: Vec<String> = self
+            .attrs
+            .other_attrs
+            .iter()
+            .filter_map(|attr| {
+                if keep_as_is {
+                    Some(pprust::attribute_to_string(attr))
+                } else if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) {
+                    Some(
+                        pprust::attribute_to_string(attr)
+                            .replace("\\\n", "")
+                            .replace('\n', "")
+                            .replace("  ", " "),
+                    )
+                } else {
+                    None
+                }
+            })
+            .collect();
+        if let Some(def_id) = self.item_id.as_def_id() &&
+            !def_id.is_local() &&
+            // This check is needed because `adt_def` will panic if not a compatible type otherwise...
+            matches!(self.type_(), ItemType::Struct | ItemType::Enum | ItemType::Union)
+        {
+            let repr = tcx.adt_def(def_id).repr();
+            let mut out = Vec::new();
+            if repr.flags.contains(ReprFlags::IS_C) {
+                out.push("C");
+            }
+            if repr.flags.contains(ReprFlags::IS_TRANSPARENT) {
+                out.push("transparent");
+            }
+            if repr.flags.contains(ReprFlags::IS_SIMD) {
+                out.push("simd");
+            }
+            let pack_s;
+            if let Some(pack) = repr.pack {
+                pack_s = format!("packed({})", pack.bytes());
+                out.push(&pack_s);
+            }
+            let align_s;
+            if let Some(align) = repr.align {
+                align_s = format!("align({})", align.bytes());
+                out.push(&align_s);
+            }
+            let int_s;
+            if let Some(int) = repr.int {
+                int_s = match int {
+                    IntegerType::Pointer(is_signed) => {
+                        format!("{}size", if is_signed { 'i' } else { 'u' })
+                    }
+                    IntegerType::Fixed(size, is_signed) => {
+                        format!("{}{}", if is_signed { 'i' } else { 'u' }, size.size().bytes() * 8)
+                    }
+                };
+                out.push(&int_s);
+            }
+            if out.is_empty() {
+                return Vec::new();
+            }
+            attrs.push(format!("#[repr({})]", out.join(", ")));
+        }
+        attrs
+    }
 }
 
 #[derive(Clone, Debug)]
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs
index d71098ad89d..575d8ee65b7 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -1063,15 +1063,10 @@ impl Tester for Collector {
                     Ignore::Some(ref ignores) => ignores.iter().any(|s| target_str.contains(s)),
                 },
                 ignore_message: None,
-                #[cfg(not(bootstrap))]
                 source_file: "",
-                #[cfg(not(bootstrap))]
                 start_line: 0,
-                #[cfg(not(bootstrap))]
                 start_col: 0,
-                #[cfg(not(bootstrap))]
                 end_line: 0,
-                #[cfg(not(bootstrap))]
                 end_col: 0,
                 // compiler failures are test failures
                 should_panic: test::ShouldPanic::No,
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index a5f08fdac11..73bf27c9d34 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -48,7 +48,6 @@ use std::str;
 use std::string::ToString;
 
 use askama::Template;
-use rustc_ast_pretty::pprust;
 use rustc_attr::{ConstStability, Deprecation, StabilityLevel};
 use rustc_data_structures::captures::Captures;
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
@@ -849,10 +848,10 @@ fn assoc_method(
     let (indent, indent_str, end_newline) = if parent == ItemType::Trait {
         header_len += 4;
         let indent_str = "    ";
-        write!(w, "{}", render_attributes_in_pre(meth, indent_str));
+        write!(w, "{}", render_attributes_in_pre(meth, indent_str, tcx));
         (4, indent_str, Ending::NoNewline)
     } else {
-        render_attributes_in_code(w, meth);
+        render_attributes_in_code(w, meth, tcx);
         (0, "", Ending::Newline)
     };
     w.reserve(header_len + "<a href=\"\" class=\"fn\">{".len() + "</a>".len());
@@ -1021,36 +1020,15 @@ fn render_assoc_item(
     }
 }
 
-const ALLOWED_ATTRIBUTES: &[Symbol] =
-    &[sym::export_name, sym::link_section, sym::no_mangle, sym::repr, sym::non_exhaustive];
-
-fn attributes(it: &clean::Item) -> Vec<String> {
-    it.attrs
-        .other_attrs
-        .iter()
-        .filter_map(|attr| {
-            if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) {
-                Some(
-                    pprust::attribute_to_string(attr)
-                        .replace("\\\n", "")
-                        .replace('\n', "")
-                        .replace("  ", " "),
-                )
-            } else {
-                None
-            }
-        })
-        .collect()
-}
-
 // When an attribute is rendered inside a `<pre>` tag, it is formatted using
 // a whitespace prefix and newline.
-fn render_attributes_in_pre<'a>(
+fn render_attributes_in_pre<'a, 'b: 'a>(
     it: &'a clean::Item,
     prefix: &'a str,
-) -> impl fmt::Display + Captures<'a> {
+    tcx: TyCtxt<'b>,
+) -> impl fmt::Display + Captures<'a> + Captures<'b> {
     crate::html::format::display_fn(move |f| {
-        for a in attributes(it) {
+        for a in it.attributes(tcx, false) {
             writeln!(f, "{}{}", prefix, a)?;
         }
         Ok(())
@@ -1059,8 +1037,8 @@ fn render_attributes_in_pre<'a>(
 
 // When an attribute is rendered inside a <code> tag, it is formatted using
 // a div to produce a newline after it.
-fn render_attributes_in_code(w: &mut Buffer, it: &clean::Item) {
-    for a in attributes(it) {
+fn render_attributes_in_code(w: &mut Buffer, it: &clean::Item, tcx: TyCtxt<'_>) {
+    for a in it.attributes(tcx, false) {
         write!(w, "<div class=\"code-attribute\">{}</div>", a);
     }
 }
@@ -1155,10 +1133,10 @@ fn render_assoc_items_inner(
     let (non_trait, traits): (Vec<_>, _) = v.iter().partition(|i| i.inner_impl().trait_.is_none());
     if !non_trait.is_empty() {
         let mut tmp_buf = Buffer::html();
-        let (render_mode, id) = match what {
+        let (render_mode, id, class_html) = match what {
             AssocItemRender::All => {
                 write_impl_section_heading(&mut tmp_buf, "Implementations", "implementations");
-                (RenderMode::Normal, "implementations-list".to_owned())
+                (RenderMode::Normal, "implementations-list".to_owned(), "")
             }
             AssocItemRender::DerefFor { trait_, type_, deref_mut_ } => {
                 let id =
@@ -1175,7 +1153,11 @@ fn render_assoc_items_inner(
                     ),
                     &id,
                 );
-                (RenderMode::ForDeref { mut_: deref_mut_ }, cx.derive_id(id))
+                (
+                    RenderMode::ForDeref { mut_: deref_mut_ },
+                    cx.derive_id(id),
+                    r#" class="impl-items""#,
+                )
             }
         };
         let mut impls_buf = Buffer::html();
@@ -1199,7 +1181,7 @@ fn render_assoc_items_inner(
         }
         if !impls_buf.is_empty() {
             write!(w, "{}", tmp_buf.into_inner()).unwrap();
-            write!(w, "<div id=\"{}\">", id).unwrap();
+            write!(w, "<div id=\"{id}\"{class_html}>").unwrap();
             write!(w, "{}", impls_buf.into_inner()).unwrap();
             w.write_str("</div>").unwrap();
         }
@@ -1788,12 +1770,14 @@ fn render_impl(
                 .into_string()
             );
         }
+        if !default_impl_items.is_empty() || !impl_items.is_empty() {
+            w.write_str("<div class=\"impl-items\">");
+            close_tags.insert_str(0, "</div>");
+        }
     }
     if !default_impl_items.is_empty() || !impl_items.is_empty() {
-        w.write_str("<div class=\"impl-items\">");
         w.push_buffer(default_impl_items);
         w.push_buffer(impl_items);
-        close_tags.insert_str(0, "</div>");
     }
     w.write_str(&close_tags);
 }
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 3e71d41ec96..4cc81e860f0 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -548,7 +548,7 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle
             w,
             "{attrs}{vis}{constness}{asyncness}{unsafety}{abi}fn \
                 {name}{generics}{decl}{notable_traits}{where_clause}",
-            attrs = render_attributes_in_pre(it, ""),
+            attrs = render_attributes_in_pre(it, "", tcx),
             vis = visibility,
             constness = constness,
             asyncness = asyncness,
@@ -589,7 +589,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
             it.name.unwrap(),
             t.generics.print(cx),
             bounds,
-            attrs = render_attributes_in_pre(it, ""),
+            attrs = render_attributes_in_pre(it, "", tcx),
         );
 
         if !t.generics.where_predicates.is_empty() {
@@ -1063,7 +1063,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &
             t.generics.print(cx),
             print_where_clause(&t.generics, cx, 0, Ending::Newline),
             bounds(&t.bounds, true, cx),
-            attrs = render_attributes_in_pre(it, ""),
+            attrs = render_attributes_in_pre(it, "", cx.tcx()),
         );
     });
 
@@ -1085,7 +1085,7 @@ fn item_opaque_ty(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &cl
             t.generics.print(cx),
             where_clause = print_where_clause(&t.generics, cx, 0, Ending::Newline),
             bounds = bounds(&t.bounds, false, cx),
-            attrs = render_attributes_in_pre(it, ""),
+            attrs = render_attributes_in_pre(it, "", cx.tcx()),
         );
     });
 
@@ -1109,7 +1109,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea
                 t.generics.print(cx),
                 where_clause = print_where_clause(&t.generics, cx, 0, Ending::Newline),
                 type_ = t.type_.print(cx),
-                attrs = render_attributes_in_pre(it, ""),
+                attrs = render_attributes_in_pre(it, "", cx.tcx()),
             );
         });
     }
@@ -1168,7 +1168,8 @@ fn item_union(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean:
             &'b self,
         ) -> impl fmt::Display + Captures<'a> + 'b + Captures<'cx> {
             display_fn(move |f| {
-                let v = render_attributes_in_pre(self.it, "");
+                let tcx = self.cx.borrow().tcx();
+                let v = render_attributes_in_pre(self.it, "", tcx);
                 write!(f, "{v}")
             })
         }
@@ -1244,13 +1245,13 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
     let tcx = cx.tcx();
     let count_variants = e.variants().count();
     wrap_item(w, |mut w| {
+        render_attributes_in_code(w, it, tcx);
         write!(
             w,
-            "{attrs}{}enum {}{}",
+            "{}enum {}{}",
             visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
             it.name.unwrap(),
             e.generics.print(cx),
-            attrs = render_attributes_in_pre(it, ""),
         );
         if !print_where_clause_and_check(w, &e.generics, cx) {
             // If there wasn't a `where` clause, we add a whitespace.
@@ -1445,7 +1446,7 @@ fn item_primitive(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
 fn item_constant(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, c: &clean::Constant) {
     wrap_item(w, |w| {
         let tcx = cx.tcx();
-        render_attributes_in_code(w, it);
+        render_attributes_in_code(w, it, tcx);
 
         write!(
             w,
@@ -1492,7 +1493,7 @@ fn item_constant(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, c: &cle
 
 fn item_struct(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean::Struct) {
     wrap_item(w, |w| {
-        render_attributes_in_code(w, it);
+        render_attributes_in_code(w, it, cx.tcx());
         render_struct(w, it, Some(&s.generics), s.ctor_kind, &s.fields, "", true, cx);
     });
 
@@ -1542,7 +1543,7 @@ fn item_struct(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean
 
 fn item_static(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean::Static) {
     wrap_item(w, |w| {
-        render_attributes_in_code(w, it);
+        render_attributes_in_code(w, it, cx.tcx());
         write!(
             w,
             "{vis}static {mutability}{name}: {typ}",
@@ -1558,7 +1559,7 @@ fn item_static(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean
 fn item_foreign_type(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
     wrap_item(w, |w| {
         w.write_str("extern {\n");
-        render_attributes_in_code(w, it);
+        render_attributes_in_code(w, it, cx.tcx());
         write!(
             w,
             "    {}type {};\n}}",
diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs
index edd046ab772..62aab46fa7e 100644
--- a/src/librustdoc/json/conversions.rs
+++ b/src/librustdoc/json/conversions.rs
@@ -41,12 +41,7 @@ impl JsonRenderer<'_> {
             })
             .collect();
         let docs = item.attrs.collapsed_doc_value();
-        let attrs = item
-            .attrs
-            .other_attrs
-            .iter()
-            .map(rustc_ast_pretty::pprust::attribute_to_string)
-            .collect();
+        let attrs = item.attributes(self.tcx, true);
         let span = item.span(self.tcx);
         let visibility = item.visibility(self.tcx);
         let clean::Item { name, item_id, .. } = item;
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 4a88dc5254d..66080f64b9c 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -7,14 +7,15 @@
 #![feature(assert_matches)]
 #![feature(box_patterns)]
 #![feature(drain_filter)]
+#![feature(impl_trait_in_assoc_type)]
+#![feature(iter_intersperse)]
+#![feature(lazy_cell)]
 #![feature(let_chains)]
-#![feature(test)]
 #![feature(never_type)]
-#![feature(lazy_cell)]
-#![feature(type_ascription)]
-#![feature(iter_intersperse)]
+#![feature(round_char_boundary)]
+#![feature(test)]
 #![feature(type_alias_impl_trait)]
-#![cfg_attr(not(bootstrap), feature(impl_trait_in_assoc_type))]
+#![feature(type_ascription)]
 #![recursion_limit = "256"]
 #![warn(rustc::internal)]
 #![allow(clippy::collapsible_if, clippy::collapsible_else_if)]
@@ -33,6 +34,7 @@ extern crate tracing;
 // Dependencies listed in Cargo.toml do not need `extern crate`.
 
 extern crate pulldown_cmark;
+extern crate rustc_abi;
 extern crate rustc_ast;
 extern crate rustc_ast_pretty;
 extern crate rustc_attr;
diff --git a/src/librustdoc/lint.rs b/src/librustdoc/lint.rs
index 6d289eb996d..749c1ff51bf 100644
--- a/src/librustdoc/lint.rs
+++ b/src/librustdoc/lint.rs
@@ -174,6 +174,17 @@ declare_rustdoc_lint! {
    "codeblock could not be parsed as valid Rust or is empty"
 }
 
+declare_rustdoc_lint! {
+   /// The `unescaped_backticks` lint detects unescaped backticks (\`), which usually
+   /// mean broken inline code. This is a `rustdoc` only lint, see the documentation
+   /// in the [rustdoc book].
+   ///
+   /// [rustdoc book]: ../../../rustdoc/lints.html#unescaped_backticks
+   UNESCAPED_BACKTICKS,
+   Allow,
+   "detects unescaped backticks in doc comments"
+}
+
 pub(crate) static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
     vec![
         BROKEN_INTRA_DOC_LINKS,
@@ -185,6 +196,7 @@ pub(crate) static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
         INVALID_HTML_TAGS,
         BARE_URLS,
         MISSING_CRATE_LEVEL_DOCS,
+        UNESCAPED_BACKTICKS,
     ]
 });
 
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index f2486abaaa7..7e173a171a8 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -1295,7 +1295,8 @@ impl LinkCollector<'_, '_> {
                                 }
                             }
                         }
-                        resolution_failure(self, diag, path_str, disambiguator, smallvec![err])
+                        resolution_failure(self, diag, path_str, disambiguator, smallvec![err]);
+                        return vec![];
                     }
                 }
             }
@@ -1331,13 +1332,14 @@ impl LinkCollector<'_, '_> {
                     .fold(0, |acc, res| if let Ok(res) = res { acc + res.len() } else { acc });
 
                 if len == 0 {
-                    return resolution_failure(
+                    resolution_failure(
                         self,
                         diag,
                         path_str,
                         disambiguator,
                         candidates.into_iter().filter_map(|res| res.err()).collect(),
                     );
+                    return vec![];
                 } else if len == 1 {
                     candidates.into_iter().filter_map(|res| res.ok()).flatten().collect::<Vec<_>>()
                 } else {
@@ -1642,9 +1644,8 @@ fn resolution_failure(
     path_str: &str,
     disambiguator: Option<Disambiguator>,
     kinds: SmallVec<[ResolutionFailure<'_>; 3]>,
-) -> Vec<(Res, Option<DefId>)> {
+) {
     let tcx = collector.cx.tcx;
-    let mut recovered_res = None;
     report_diagnostic(
         tcx,
         BROKEN_INTRA_DOC_LINKS,
@@ -1736,19 +1737,25 @@ fn resolution_failure(
 
                         if !path_str.contains("::") {
                             if disambiguator.map_or(true, |d| d.ns() == MacroNS)
-                                && let Some(&res) = collector.cx.tcx.resolutions(()).all_macro_rules
-                                                             .get(&Symbol::intern(path_str))
+                                && collector
+                                    .cx
+                                    .tcx
+                                    .resolutions(())
+                                    .all_macro_rules
+                                    .get(&Symbol::intern(path_str))
+                                    .is_some()
                             {
                                 diag.note(format!(
                                     "`macro_rules` named `{path_str}` exists in this crate, \
                                      but it is not in scope at this link's location"
                                 ));
-                                recovered_res = res.try_into().ok().map(|res| (res, None));
                             } else {
                                 // If the link has `::` in it, assume it was meant to be an
                                 // intra-doc link. Otherwise, the `[]` might be unrelated.
-                                diag.help("to escape `[` and `]` characters, \
-                                           add '\\' before them like `\\[` or `\\]`");
+                                diag.help(
+                                    "to escape `[` and `]` characters, \
+                                           add '\\' before them like `\\[` or `\\]`",
+                                );
                             }
                         }
 
@@ -1854,11 +1861,6 @@ fn resolution_failure(
             }
         },
     );
-
-    match recovered_res {
-        Some(r) => vec![r],
-        None => Vec::new(),
-    }
 }
 
 fn report_multiple_anchors(cx: &DocContext<'_>, diag_info: DiagnosticInfo<'_>) {
diff --git a/src/librustdoc/passes/lint.rs b/src/librustdoc/passes/lint.rs
index 97031c4f028..e653207b9b6 100644
--- a/src/librustdoc/passes/lint.rs
+++ b/src/librustdoc/passes/lint.rs
@@ -4,6 +4,7 @@
 mod bare_urls;
 mod check_code_block_syntax;
 mod html_tags;
+mod unescaped_backticks;
 
 use super::Pass;
 use crate::clean::*;
@@ -27,6 +28,7 @@ impl<'a, 'tcx> DocVisitor for Linter<'a, 'tcx> {
         bare_urls::visit_item(self.cx, item);
         check_code_block_syntax::visit_item(self.cx, item);
         html_tags::visit_item(self.cx, item);
+        unescaped_backticks::visit_item(self.cx, item);
 
         self.visit_item_recur(item)
     }
diff --git a/src/librustdoc/passes/lint/unescaped_backticks.rs b/src/librustdoc/passes/lint/unescaped_backticks.rs
new file mode 100644
index 00000000000..33cef82a60c
--- /dev/null
+++ b/src/librustdoc/passes/lint/unescaped_backticks.rs
@@ -0,0 +1,416 @@
+//! Detects unescaped backticks (\`) in doc comments.
+
+use crate::clean::Item;
+use crate::core::DocContext;
+use crate::html::markdown::main_body_opts;
+use crate::passes::source_span_for_markdown_range;
+use pulldown_cmark::{BrokenLink, Event, Parser};
+use rustc_errors::DiagnosticBuilder;
+use rustc_lint_defs::Applicability;
+use std::ops::Range;
+
+pub(crate) fn visit_item(cx: &DocContext<'_>, item: &Item) {
+    let tcx = cx.tcx;
+    let Some(hir_id) = DocContext::as_local_hir_id(tcx, item.item_id) else {
+        // If non-local, no need to check anything.
+        return;
+    };
+
+    let dox = item.attrs.collapsed_doc_value().unwrap_or_default();
+    if dox.is_empty() {
+        return;
+    }
+
+    let link_names = item.link_names(&cx.cache);
+    let mut replacer = |broken_link: BrokenLink<'_>| {
+        link_names
+            .iter()
+            .find(|link| *link.original_text == *broken_link.reference)
+            .map(|link| ((*link.href).into(), (*link.new_text).into()))
+    };
+    let parser = Parser::new_with_broken_link_callback(&dox, main_body_opts(), Some(&mut replacer))
+        .into_offset_iter();
+
+    let mut element_stack = Vec::new();
+
+    let mut prev_text_end = 0;
+    for (event, event_range) in parser {
+        match event {
+            Event::Start(_) => {
+                element_stack.push(Element::new(event_range));
+            }
+            Event::End(_) => {
+                let element = element_stack.pop().unwrap();
+
+                let Some(backtick_index) = element.backtick_index else {
+                    continue;
+                };
+
+                // If we can't get a span of the backtick, because it is in a `#[doc = ""]` attribute,
+                // use the span of the entire attribute as a fallback.
+                let span = source_span_for_markdown_range(
+                    tcx,
+                    &dox,
+                    &(backtick_index..backtick_index + 1),
+                    &item.attrs,
+                )
+                .unwrap_or_else(|| item.attr_span(tcx));
+
+                cx.tcx.struct_span_lint_hir(crate::lint::UNESCAPED_BACKTICKS, hir_id, span, "unescaped backtick", |lint| {
+                    let mut help_emitted = false;
+
+                    match element.prev_code_guess {
+                        PrevCodeGuess::None => {}
+                        PrevCodeGuess::Start { guess, .. } => {
+                            // "foo` `bar`" -> "`foo` `bar`"
+                            if let Some(suggest_index) = clamp_start(guess, &element.suggestible_ranges)
+                                && can_suggest_backtick(&dox, suggest_index)
+                            {
+                                suggest_insertion(cx, item, &dox, lint, suggest_index, '`', "the opening backtick of a previous inline code may be missing");
+                                help_emitted = true;
+                            }
+                        }
+                        PrevCodeGuess::End { guess, .. } => {
+                            // "`foo `bar`" -> "`foo` `bar`"
+                            // Don't `clamp_end` here, because the suggestion is guaranteed to be inside
+                            // an inline code node and we intentionally "break" the inline code here.
+                            let suggest_index = guess;
+                            if can_suggest_backtick(&dox, suggest_index) {
+                                suggest_insertion(cx, item, &dox, lint, suggest_index, '`', "a previous inline code might be longer than expected");
+                                help_emitted = true;
+                            }
+                        }
+                    }
+
+                    if !element.prev_code_guess.is_confident() {
+                        // "`foo` bar`" -> "`foo` `bar`"
+                        if let Some(guess) = guess_start_of_code(&dox, element.element_range.start..backtick_index)
+                            && let Some(suggest_index) = clamp_start(guess, &element.suggestible_ranges)
+                            && can_suggest_backtick(&dox, suggest_index)
+                        {
+                            suggest_insertion(cx, item, &dox, lint, suggest_index, '`', "the opening backtick of an inline code may be missing");
+                            help_emitted = true;
+                        }
+
+                        // "`foo` `bar" -> "`foo` `bar`"
+                        // Don't suggest closing backtick after single trailing char,
+                        // if we already suggested opening backtick. For example:
+                        // "foo`." -> "`foo`." or "foo`s" -> "`foo`s".
+                        if let Some(guess) = guess_end_of_code(&dox, backtick_index + 1..element.element_range.end)
+                            && let Some(suggest_index) = clamp_end(guess, &element.suggestible_ranges)
+                            && can_suggest_backtick(&dox, suggest_index)
+                            && (!help_emitted || suggest_index - backtick_index > 2)
+                        {
+                            suggest_insertion(cx, item, &dox, lint, suggest_index, '`', "the closing backtick of an inline code may be missing");
+                            help_emitted = true;
+                        }
+                    }
+
+                    if !help_emitted {
+                        lint.help("the opening or closing backtick of an inline code may be missing");
+                    }
+
+                    suggest_insertion(cx, item, &dox, lint, backtick_index, '\\', "if you meant to use a literal backtick, escape it");
+
+                    lint
+                });
+            }
+            Event::Code(_) => {
+                let element = element_stack
+                    .last_mut()
+                    .expect("expected inline code node to be inside of an element");
+                assert!(
+                    event_range.start >= element.element_range.start
+                        && event_range.end <= element.element_range.end
+                );
+
+                // This inline code might be longer than it's supposed to be.
+                // Only check single backtick inline code for now.
+                if !element.prev_code_guess.is_confident()
+                    && dox.as_bytes().get(event_range.start) == Some(&b'`')
+                    && dox.as_bytes().get(event_range.start + 1) != Some(&b'`')
+                {
+                    let range_inside = event_range.start + 1..event_range.end - 1;
+                    let text_inside = &dox[range_inside.clone()];
+
+                    let is_confident = text_inside.starts_with(char::is_whitespace)
+                        || text_inside.ends_with(char::is_whitespace);
+
+                    if let Some(guess) = guess_end_of_code(&dox, range_inside) {
+                        // Find earlier end of code.
+                        element.prev_code_guess = PrevCodeGuess::End { guess, is_confident };
+                    } else {
+                        // Find alternate start of code.
+                        let range_before = element.element_range.start..event_range.start;
+                        if let Some(guess) = guess_start_of_code(&dox, range_before) {
+                            element.prev_code_guess = PrevCodeGuess::Start { guess, is_confident };
+                        }
+                    }
+                }
+            }
+            Event::Text(text) => {
+                let element = element_stack
+                    .last_mut()
+                    .expect("expected inline text node to be inside of an element");
+                assert!(
+                    event_range.start >= element.element_range.start
+                        && event_range.end <= element.element_range.end
+                );
+
+                // The first char is escaped if the prev char is \ and not part of a text node.
+                let is_escaped = prev_text_end < event_range.start
+                    && dox.as_bytes()[event_range.start - 1] == b'\\';
+
+                // Don't lint backslash-escaped (\`) or html-escaped (&#96;) backticks.
+                if *text == *"`" && !is_escaped && *text == dox[event_range.clone()] {
+                    // We found a stray backtick.
+                    assert!(
+                        element.backtick_index.is_none(),
+                        "expected at most one unescaped backtick per element",
+                    );
+                    element.backtick_index = Some(event_range.start);
+                }
+
+                prev_text_end = event_range.end;
+
+                if is_escaped {
+                    // Ensure that we suggest "`\x" and not "\`x".
+                    element.suggestible_ranges.push(event_range.start - 1..event_range.end);
+                } else {
+                    element.suggestible_ranges.push(event_range);
+                }
+            }
+            _ => {}
+        }
+    }
+}
+
+/// A previous inline code node, that looks wrong.
+///
+/// `guess` is the position, where we want to suggest a \` and the guess `is_confident` if an
+/// inline code starts or ends with a whitespace.
+#[derive(Debug)]
+enum PrevCodeGuess {
+    None,
+
+    /// Missing \` at start.
+    ///
+    /// ```markdown
+    /// foo` `bar`
+    /// ```
+    Start {
+        guess: usize,
+        is_confident: bool,
+    },
+
+    /// Missing \` at end.
+    ///
+    /// ```markdown
+    /// `foo `bar`
+    /// ```
+    End {
+        guess: usize,
+        is_confident: bool,
+    },
+}
+
+impl PrevCodeGuess {
+    fn is_confident(&self) -> bool {
+        match *self {
+            PrevCodeGuess::None => false,
+            PrevCodeGuess::Start { is_confident, .. } | PrevCodeGuess::End { is_confident, .. } => {
+                is_confident
+            }
+        }
+    }
+}
+
+/// A markdown [tagged element], which may or may not contain an unescaped backtick.
+///
+/// [tagged element]: https://docs.rs/pulldown-cmark/0.9/pulldown_cmark/enum.Tag.html
+#[derive(Debug)]
+struct Element {
+    /// The full range (span) of the element in the doc string.
+    element_range: Range<usize>,
+
+    /// The ranges where we're allowed to put backticks.
+    /// This is used to prevent breaking markdown elements like links or lists.
+    suggestible_ranges: Vec<Range<usize>>,
+
+    /// The unescaped backtick.
+    backtick_index: Option<usize>,
+
+    /// Suggest a different start or end of an inline code.
+    prev_code_guess: PrevCodeGuess,
+}
+
+impl Element {
+    const fn new(element_range: Range<usize>) -> Self {
+        Self {
+            element_range,
+            suggestible_ranges: Vec::new(),
+            backtick_index: None,
+            prev_code_guess: PrevCodeGuess::None,
+        }
+    }
+}
+
+/// Given a potentially unclosed inline code, attempt to find the start.
+fn guess_start_of_code(dox: &str, range: Range<usize>) -> Option<usize> {
+    assert!(dox.as_bytes()[range.end] == b'`');
+
+    let mut braces = 0;
+    let mut guess = 0;
+    for (idx, ch) in dox[range.clone()].char_indices().rev() {
+        match ch {
+            ')' | ']' | '}' => braces += 1,
+            '(' | '[' | '{' => {
+                if braces == 0 {
+                    guess = idx + 1;
+                    break;
+                }
+                braces -= 1;
+            }
+            ch if ch.is_whitespace() && braces == 0 => {
+                guess = idx + 1;
+                break;
+            }
+            _ => (),
+        }
+    }
+
+    guess += range.start;
+
+    // Don't suggest empty inline code or duplicate backticks.
+    can_suggest_backtick(dox, guess).then_some(guess)
+}
+
+/// Given a potentially unclosed inline code, attempt to find the end.
+fn guess_end_of_code(dox: &str, range: Range<usize>) -> Option<usize> {
+    // Punctuation that should be outside of the inline code.
+    const TRAILING_PUNCTUATION: &[u8] = b".,";
+
+    assert!(dox.as_bytes()[range.start - 1] == b'`');
+
+    let text = dox[range.clone()].trim_end();
+    let mut braces = 0;
+    let mut guess = text.len();
+    for (idx, ch) in text.char_indices() {
+        match ch {
+            '(' | '[' | '{' => braces += 1,
+            ')' | ']' | '}' => {
+                if braces == 0 {
+                    guess = idx;
+                    break;
+                }
+                braces -= 1;
+            }
+            ch if ch.is_whitespace() && braces == 0 => {
+                guess = idx;
+                break;
+            }
+            _ => (),
+        }
+    }
+
+    // Strip a single trailing punctuation.
+    if guess >= 1
+        && TRAILING_PUNCTUATION.contains(&text.as_bytes()[guess - 1])
+        && (guess < 2 || !TRAILING_PUNCTUATION.contains(&text.as_bytes()[guess - 2]))
+    {
+        guess -= 1;
+    }
+
+    guess += range.start;
+
+    // Don't suggest empty inline code or duplicate backticks.
+    can_suggest_backtick(dox, guess).then_some(guess)
+}
+
+/// Returns whether inserting a backtick at `dox[index]` will not produce double backticks.
+fn can_suggest_backtick(dox: &str, index: usize) -> bool {
+    (index == 0 || dox.as_bytes()[index - 1] != b'`')
+        && (index == dox.len() || dox.as_bytes()[index] != b'`')
+}
+
+/// Increase the index until it is inside or one past the end of one of the ranges.
+///
+/// The ranges must be sorted for this to work correctly.
+fn clamp_start(index: usize, ranges: &[Range<usize>]) -> Option<usize> {
+    for range in ranges {
+        if range.start >= index {
+            return Some(range.start);
+        }
+        if index <= range.end {
+            return Some(index);
+        }
+    }
+    None
+}
+
+/// Decrease the index until it is inside or one past the end of one of the ranges.
+///
+/// The ranges must be sorted for this to work correctly.
+fn clamp_end(index: usize, ranges: &[Range<usize>]) -> Option<usize> {
+    for range in ranges.iter().rev() {
+        if range.end <= index {
+            return Some(range.end);
+        }
+        if index >= range.start {
+            return Some(index);
+        }
+    }
+    None
+}
+
+/// Try to emit a span suggestion and fall back to help messages if we can't find a suitable span.
+///
+/// This helps finding backticks in huge macro-generated docs.
+fn suggest_insertion(
+    cx: &DocContext<'_>,
+    item: &Item,
+    dox: &str,
+    lint: &mut DiagnosticBuilder<'_, ()>,
+    insert_index: usize,
+    suggestion: char,
+    message: &str,
+) {
+    /// Maximum bytes of context to show around the insertion.
+    const CONTEXT_MAX_LEN: usize = 80;
+
+    if let Some(span) =
+        source_span_for_markdown_range(cx.tcx, &dox, &(insert_index..insert_index), &item.attrs)
+    {
+        lint.span_suggestion(span, message, suggestion, Applicability::MaybeIncorrect);
+    } else {
+        let line_start = dox[..insert_index].rfind('\n').map_or(0, |idx| idx + 1);
+        let line_end = dox[insert_index..].find('\n').map_or(dox.len(), |idx| idx + insert_index);
+
+        let context_before_max_len = if insert_index - line_start < CONTEXT_MAX_LEN / 2 {
+            insert_index - line_start
+        } else if line_end - insert_index < CONTEXT_MAX_LEN / 2 {
+            CONTEXT_MAX_LEN - (line_end - insert_index)
+        } else {
+            CONTEXT_MAX_LEN / 2
+        };
+        let context_after_max_len = CONTEXT_MAX_LEN - context_before_max_len;
+
+        let (prefix, context_start) = if insert_index - line_start <= context_before_max_len {
+            ("", line_start)
+        } else {
+            ("...", dox.ceil_char_boundary(insert_index - context_before_max_len))
+        };
+        let (suffix, context_end) = if line_end - insert_index <= context_after_max_len {
+            ("", line_end)
+        } else {
+            ("...", dox.floor_char_boundary(insert_index + context_after_max_len))
+        };
+
+        let context_full = &dox[context_start..context_end].trim_end();
+        let context_before = &dox[context_start..insert_index];
+        let context_after = &dox[insert_index..context_end].trim_end();
+        lint.help(format!(
+            "{message}\n change: {prefix}{context_full}{suffix}\nto this: {prefix}{context_before}{suggestion}{context_after}{suffix}"
+        ));
+    }
+}
diff --git a/src/stage0.json b/src/stage0.json
index 9250d9c2804..7a8bf0a80ab 100644
--- a/src/stage0.json
+++ b/src/stage0.json
@@ -17,409 +17,409 @@
     "tool is executed."
   ],
   "compiler": {
-    "date": "2023-03-07",
+    "date": "2023-04-20",
     "version": "beta"
   },
   "rustfmt": {
-    "date": "2023-03-07",
+    "date": "2023-04-21",
     "version": "nightly"
   },
   "checksums_sha256": {
-    "dist/2023-03-07/cargo-beta-aarch64-apple-darwin.tar.gz": "ec2466b2212a7453ae902b85f7b1879fa9d37275f21972aef488e8b4ca04e195",
-    "dist/2023-03-07/cargo-beta-aarch64-apple-darwin.tar.xz": "5eaa63f70f842836dc847059ec188d5c1dbcdaf77116dc08ba6421eb09706c12",
-    "dist/2023-03-07/cargo-beta-aarch64-pc-windows-msvc.tar.gz": "5514aa4051d8c6ff9b7e334a4cbc8b2ad5ad8db0b9853a693ae998888df0070d",
-    "dist/2023-03-07/cargo-beta-aarch64-pc-windows-msvc.tar.xz": "47b4cdc96afb1796e8ddbf4fed4868d08bfc8fe90c5f517f7c4d8539d89ca827",
-    "dist/2023-03-07/cargo-beta-aarch64-unknown-linux-gnu.tar.gz": "514ed7e95642daaff551b31af9f6b8e1afd301d4a3197574c4296dd938f7f98d",
-    "dist/2023-03-07/cargo-beta-aarch64-unknown-linux-gnu.tar.xz": "0a3f61fc865330e5a9e1f37a59226a6660995ccae8610e742c2ea42a7b8f9b9f",
-    "dist/2023-03-07/cargo-beta-aarch64-unknown-linux-musl.tar.gz": "838c7a9cfdf76e3e2a0e9c2ad37124eb029ea2f0e015640c7c9ca5f45fe1c260",
-    "dist/2023-03-07/cargo-beta-aarch64-unknown-linux-musl.tar.xz": "1ee5a28da6b8f7fc5f98b8214ed2dda28769dc345c9ffc8046ef644f69fd0382",
-    "dist/2023-03-07/cargo-beta-arm-unknown-linux-gnueabi.tar.gz": "3ac81e710ff821e206148d998654044d0b3092d929da3a1d3a5ffa2ada00d922",
-    "dist/2023-03-07/cargo-beta-arm-unknown-linux-gnueabi.tar.xz": "64891e59a7e8c94011f98849d37a056535966966f753b923ffcf8ceccacfaf03",
-    "dist/2023-03-07/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz": "fcab9d5fddbe72db02964adf9fcc13e5acc67f0f65bcdd3bc325aa9f0c223acd",
-    "dist/2023-03-07/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz": "2bfaf117eb512e53c4f01765d198b3647fc0058d7f77721b58cfab5e72b1f7ec",
-    "dist/2023-03-07/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz": "dd955a4f258603e5cb5c85473fb6bfeace54cbc2345d99dc9d8fa7f984bcd915",
-    "dist/2023-03-07/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz": "7b19dbf54ff04009209d505a97bf66327a87ad6ac8a9be4aa26be3d38fec52db",
-    "dist/2023-03-07/cargo-beta-i686-pc-windows-gnu.tar.gz": "88e8e79c154a34596740b85030c16a27d62defef5db8eefad0b3d4397e7222af",
-    "dist/2023-03-07/cargo-beta-i686-pc-windows-gnu.tar.xz": "a996fac21b8198632a3bb3746549f6a36bd7c2b12d9820b7af64a5ffe8074df5",
-    "dist/2023-03-07/cargo-beta-i686-pc-windows-msvc.tar.gz": "3b8834bf152ecf2bda797475d7d556746e2a1374c61e4ab2ff81b41bbff3a87f",
-    "dist/2023-03-07/cargo-beta-i686-pc-windows-msvc.tar.xz": "2fee05bf93a16004f4f8fde437918a44874a9495c1e45d954a1098c104249bd2",
-    "dist/2023-03-07/cargo-beta-i686-unknown-linux-gnu.tar.gz": "544ce4096e455c5259c4577feddaf5a6ec34e6a8bec2710e74f8910f60c1da1a",
-    "dist/2023-03-07/cargo-beta-i686-unknown-linux-gnu.tar.xz": "2f39706fa21cb08d8bfe6a32a5a3314742ddf040bb42e844d5b3f8d0d29fd39f",
-    "dist/2023-03-07/cargo-beta-mips-unknown-linux-gnu.tar.gz": "7f60d7a0d60e06fb4530291f1e64956cfc7c92bd034b63d1ebdedbeb9f7bca17",
-    "dist/2023-03-07/cargo-beta-mips-unknown-linux-gnu.tar.xz": "3c6d8de9f254edd01461235f14e89c7b863da84f338e3a842921dc092db4d82a",
-    "dist/2023-03-07/cargo-beta-mips64-unknown-linux-gnuabi64.tar.gz": "2c0ef292ecd4bf27e74323ae5fa7bd6c6395d70f4adc4e6d4228c266fb87be7d",
-    "dist/2023-03-07/cargo-beta-mips64-unknown-linux-gnuabi64.tar.xz": "1886d8e978dddefff73f758e7c1d28964209dc986195cd39bd8d3d34197cde52",
-    "dist/2023-03-07/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "125a9a8a6d57f1694ed5bef51d9d351da3bbf0ff1ac631641cc5046098385536",
-    "dist/2023-03-07/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "851654268ac5ce9d1f3dae9228464bef01771244945653ff7e9f8d7a52761813",
-    "dist/2023-03-07/cargo-beta-mipsel-unknown-linux-gnu.tar.gz": "46a3bd35af46f6b59b610bbc596233bb428c2b8387f95d3e308565d57e6ca276",
-    "dist/2023-03-07/cargo-beta-mipsel-unknown-linux-gnu.tar.xz": "d941bb502be268962400e78005b30ac4a5975ab012e2cb7fb631b002a7e116ec",
-    "dist/2023-03-07/cargo-beta-powerpc-unknown-linux-gnu.tar.gz": "3853bfc5c0734f3f92e0d7cd07583729d3e67f7ec3b496b5349ac690ee3632e5",
-    "dist/2023-03-07/cargo-beta-powerpc-unknown-linux-gnu.tar.xz": "17a0c76f33244ca66c942cd6054e343a395d27437d69f166471f0aee8c404a55",
-    "dist/2023-03-07/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz": "b37f9c476ae9fe802bdb0fc449657c90a567033f4df382befeee1517f53db05a",
-    "dist/2023-03-07/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz": "b315d765b176f90a5c74c102687ea8b54ea94d5a772ad03741aa3297a5466562",
-    "dist/2023-03-07/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz": "e84ef7a7b4fb7b504e6a0ae335432430ad9f4db356650c738e0db676ce672321",
-    "dist/2023-03-07/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz": "3b830e1077a195e2048b621a1ace2c0470135ae5821f83113a16bdd449dc9828",
-    "dist/2023-03-07/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz": "db373e61134b7f9340b5d8dfa24fb989e3acadb90b4d27008c08715720cfeba5",
-    "dist/2023-03-07/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz": "bb7d046253f1fcf98f8ef9b33820793579a09d201ae1bb5616302bcf7103453f",
-    "dist/2023-03-07/cargo-beta-s390x-unknown-linux-gnu.tar.gz": "495c5d11852010647d15d54352052ca932034d77f3ac3bd9bf605d52c37fb47a",
-    "dist/2023-03-07/cargo-beta-s390x-unknown-linux-gnu.tar.xz": "002d9a037a9de13d0e99f695bbb8f9177e14df2e6309917a7d728023dcaa1640",
-    "dist/2023-03-07/cargo-beta-x86_64-apple-darwin.tar.gz": "9c93e76966a317d2dbb673345c33269b67d6db101114275424a50f5e4c3b7a89",
-    "dist/2023-03-07/cargo-beta-x86_64-apple-darwin.tar.xz": "0ac70e1699e2684fcaff30d4330d04795f3f9579226dc1dd0ecefaed9efa24de",
-    "dist/2023-03-07/cargo-beta-x86_64-pc-windows-gnu.tar.gz": "8ad0af38dac9c0a49d73691d7f62487c8c72a378ff4fbb7f380fd106600ce836",
-    "dist/2023-03-07/cargo-beta-x86_64-pc-windows-gnu.tar.xz": "e1c263909d66c14d5b835d2d8ba9df9d1f54750a85b79c4163483126594f71fc",
-    "dist/2023-03-07/cargo-beta-x86_64-pc-windows-msvc.tar.gz": "684b44e6cb7b2ea6feb8a5f768f138b7c3c3819ba5f146461ffa860e4ba2ee0d",
-    "dist/2023-03-07/cargo-beta-x86_64-pc-windows-msvc.tar.xz": "194037a4e7a035becdf8540532625e7a3d2e5e9a75c093713467d16f2c630fda",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-freebsd.tar.gz": "b19ed2a67bc6d654520c2ceda0d1a8e0128a0d042a72cb6506eaf975c3665bc1",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-freebsd.tar.xz": "2773155eb716d1cde85c8ee7fe87f534decf08cb92d4812463a8f5f45b5cf4b9",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-illumos.tar.gz": "3d97d07c075c7473645b71391fdecb6b8a43af42f15ccce0bc13146624f3d9e7",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-illumos.tar.xz": "6266332b1a18e851cd4cf618c1ba5a8162c06c8ceffa3a6e619cbfaf5c8f2914",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-linux-gnu.tar.gz": "6e0ca0e10d1243e81768f1760f268aa2ce1dcf4f79a718a44e09b92ae5b2c87a",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-linux-gnu.tar.xz": "84aa0a73dd6d3ab9d5efb10e0480dedb864341124c19b35040239af27fcd8651",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-linux-musl.tar.gz": "6de4590228b94c6c62fec90da7f5579fef16cddd30d4bad29ac39e40081818be",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-linux-musl.tar.xz": "317b64417648885b08064543e0dea13d1062e682224b3b866c12ac6abeda1648",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-netbsd.tar.gz": "aad64656cc4b9915bfe5ac780ac935964a13481a9070ca31f58d5b8c1750e40b",
-    "dist/2023-03-07/cargo-beta-x86_64-unknown-netbsd.tar.xz": "0ba3f47a551b38c83106003c775539b7384c9bbfa4cae28923e63e28a32227da",
-    "dist/2023-03-07/rust-std-beta-aarch64-apple-darwin.tar.gz": "b3f00164840826f89eb930445cac0afa2ebda2153195574b91ff4dcd286042c1",
-    "dist/2023-03-07/rust-std-beta-aarch64-apple-darwin.tar.xz": "c94d3fe8dfaf35f88d557a37e3aa1da8999b5e2e022f85f1bc0ae7ed5218a3ef",
-    "dist/2023-03-07/rust-std-beta-aarch64-apple-ios-sim.tar.gz": "3f43a002c0c099eedf12c2d2d3e1bee3c8ea345368e89cedd5918705f37086d5",
-    "dist/2023-03-07/rust-std-beta-aarch64-apple-ios-sim.tar.xz": "891547f5c2d06ef95f272f829438b0d5c9f34d9e1e7d068dbb0a5d31c685658c",
-    "dist/2023-03-07/rust-std-beta-aarch64-apple-ios.tar.gz": "c1fe0f8fb661dec65dd7a13b038deae93d4b66f0e0988a0a72374e9945915612",
-    "dist/2023-03-07/rust-std-beta-aarch64-apple-ios.tar.xz": "1f65f0ae9685aaf14805b63111ddae27c8e9b39cc88cb3a5347ad9e93d863581",
-    "dist/2023-03-07/rust-std-beta-aarch64-linux-android.tar.gz": "9fc988f57fb6a0530a338cd3a0a87925b095e9a2f3887f87231c9414828241c5",
-    "dist/2023-03-07/rust-std-beta-aarch64-linux-android.tar.xz": "2aab2cc1377391588db019a231d8f989de79342a630625a4e7c2fee560549668",
-    "dist/2023-03-07/rust-std-beta-aarch64-pc-windows-msvc.tar.gz": "4527b7439a0419e96b8c59735fbe98d8628985b63ce64c24749273b625012c39",
-    "dist/2023-03-07/rust-std-beta-aarch64-pc-windows-msvc.tar.xz": "80badae3069223541e3092b07331eab3330bd66a21522037fece15314085c513",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-fuchsia.tar.gz": "6f7141d28b549d6cf6f64a5944a4748db730d865a9bb1f3a344cd19cd45269d1",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-fuchsia.tar.xz": "87f97fad69b53a36354c17abfa58edbaaf86d1db071a53fa96e9822c4f0a7846",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz": "8decda618f8cf30f51b8f26861baab0f53824af6cfa965af585f0653771d113a",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz": "dd140223ec842ebe4c69ec6aa2966b97dacdd9ce112490e310f374134188d0c4",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-linux-musl.tar.gz": "4aa6ad6fbfb9bea40c5b4c3fdae8f79feeaeca71f0848c1e9281650d4b5880e5",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-linux-musl.tar.xz": "2d62f25f3c16704f2f52b8bf2fb505b5f8e3a3e44ae3971b0a3081fdd5932bc3",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz": "87982e6e6e3865d520fa35994948c7b82c4fc9f698b4e1316e0ab0bbff3d7455",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz": "815a45384be320225b438be952d798ddcbfc223d7629ce8e106499f626c170f7",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-none.tar.gz": "041d4a16c7e6ea18f76b119e069630636716c5f7c2f38e0fdfe69062da9cd942",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-none.tar.xz": "227e8434ac0f294bdb102d4aad6c6b1425f148f2bf8eac9473f522e4e8851d15",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-uefi.tar.gz": "a1f6c1268c3e28e78f43f2a922ff2d260466f4e2888555c122fb490ba28d8f53",
-    "dist/2023-03-07/rust-std-beta-aarch64-unknown-uefi.tar.xz": "68f46477d721677d2faf0091aad1d2f72387bdf1e5590dead06eec51390e9906",
-    "dist/2023-03-07/rust-std-beta-arm-linux-androideabi.tar.gz": "d1bdca54a9807d058a26f2999fc82ae474e6d5f8cb555196f6583130c81bd6ee",
-    "dist/2023-03-07/rust-std-beta-arm-linux-androideabi.tar.xz": "8cc49d1e16181848d73d617914d664b45cc42fc8bf80d3bca7ca69fe1a4fe7ee",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz": "b09c3776268888966d3752dc614e677c821731593ef757ce45fcd6f6b1b28bdf",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz": "7d43314c408514ece5f3ab6929f906bb224336171c3fe41a5b980afedfbeb172",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz": "9493fb7c2cf30e0c986babd8ec41e3c626373d4e62f8558dacd01cfb85dec04a",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz": "9c833f219410f9e6e77451e4af1a355685831dbeaa99006ac814801883a17312",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-musleabi.tar.gz": "8e9c3045dbf1fba7e54b8d34bbc3ed8a95b6c984ebee0123690889455d963f87",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-musleabi.tar.xz": "54f7f9a2baf29a5fbc41b6624a4ae0f056e10f0dbfffffcd08377dc6888ca85f",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz": "3f214ab1da499c6a64bc5bc54fb9e95becb318b469531e4d9f7b234f5456dcff",
-    "dist/2023-03-07/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz": "3e4c0742356393a07cbcc6502e1d1f9a3187921c67d4d554bc3c95bb9e4e226f",
-    "dist/2023-03-07/rust-std-beta-armebv7r-none-eabi.tar.gz": "25f7466a419353fd7e4c9a3771df8f0a64e689d3c38f18e297a6a2c670174d9b",
-    "dist/2023-03-07/rust-std-beta-armebv7r-none-eabi.tar.xz": "42c713261708e90fcab6dd2b8d5b2df4387a33c829bc981f502622d5ca352ac4",
-    "dist/2023-03-07/rust-std-beta-armebv7r-none-eabihf.tar.gz": "31b240296f2e72dbeb3facf395486e8f8ac0b0b5f10a389ed4e6dd803821afac",
-    "dist/2023-03-07/rust-std-beta-armebv7r-none-eabihf.tar.xz": "c33a7bb47b94f8d5c716e4d6b43bf17395bbe9611762a01a5763dda4e725c64d",
-    "dist/2023-03-07/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz": "509cdcdc107051d7cbc8f02874445a9cb2f0dcd3190cfabd68615b8883b8f32e",
-    "dist/2023-03-07/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz": "01fb58ffd2cb6257f25d290cbd25be8bf216c18ccbfd97a42317d9e442008d4c",
-    "dist/2023-03-07/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz": "19ada8a7b1178056008f3168dd854994d6dc0fd32facebef915891b5a7fe83ae",
-    "dist/2023-03-07/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz": "5925328b29a9a54536ea7de55442f4bcacce4b2ec01c69e7c8d5e7f109f5dcab",
-    "dist/2023-03-07/rust-std-beta-armv7-linux-androideabi.tar.gz": "bd569b576ad68f20d0352e5ae9a7ea0008941f879dcf1cd57f14b7eb7fddb95f",
-    "dist/2023-03-07/rust-std-beta-armv7-linux-androideabi.tar.xz": "c483223f7abed0c145b9c94a6630a1d4caf26720cd451cb4b70971f1f907d6cc",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz": "84a1ea166b81fe2cc673beac5831ee182a303c5166279af33478a730a1987086",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz": "fa04a59350792a59c8b62800002f5f6e013710d96e3e9d3a6787b1c3b668569c",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz": "a605160aeef9a5d60bb83376d816112c621f753e4f16907481aeeea27568da77",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz": "d6f3e091217d657a259f7392acf26aa7cc2a7692028412bb97cd26cb7f31b34a",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz": "ce179ad977098491c2dd27d57d7dc5a71b9b450b07d36c19e55c0cf9961d3888",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz": "fdfa1b894ef5d1afe7cf9790de3077632d4fe693464d19ede5d6b377ff09a73d",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz": "673dae7f6d71cf984b69e0bf22b8f50a8597d5c6304ac0fc613ad5116c4a8fa7",
-    "dist/2023-03-07/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz": "9bd8bd07be4488f6828ce4b5456bcfe49bd9ae416cbb859c9b1460334ac9f4fa",
-    "dist/2023-03-07/rust-std-beta-armv7a-none-eabi.tar.gz": "b571a28b02107adc227fe02878064f44e5d23bcc91b530f57b4dfa43a4c3ec1c",
-    "dist/2023-03-07/rust-std-beta-armv7a-none-eabi.tar.xz": "854433b082a6bad442c1b9cc9708357b779cbcb84de65f832cfcba06a6088157",
-    "dist/2023-03-07/rust-std-beta-armv7r-none-eabi.tar.gz": "04c1479778038948f30d2fa87a18562939569422fe57e91659f9f0a5e8ca7f5a",
-    "dist/2023-03-07/rust-std-beta-armv7r-none-eabi.tar.xz": "38d52dc26074ebd93e6a61dbb0c934a66f32dd1113cdd9d32e4d5829ce62e188",
-    "dist/2023-03-07/rust-std-beta-armv7r-none-eabihf.tar.gz": "14e4707dc514aec378e1aae2949231ee3bbe216164a794e7e6d233db54f13459",
-    "dist/2023-03-07/rust-std-beta-armv7r-none-eabihf.tar.xz": "c0bf08f5d378955ba15441b5229d1ef202e6d071a243ae7fb34b9f1724fd90cf",
-    "dist/2023-03-07/rust-std-beta-asmjs-unknown-emscripten.tar.gz": "d9468e5a056478482cb9a85a63aba6d1987026275ed0c8ef64fe7a84ee5e35f6",
-    "dist/2023-03-07/rust-std-beta-asmjs-unknown-emscripten.tar.xz": "77262a746f577b0e6f9b6c1aa338f90eeaf8221ad70f5ca93500459c1749f3b3",
-    "dist/2023-03-07/rust-std-beta-i586-pc-windows-msvc.tar.gz": "2c8c95b80e43acb921674d4a9b2986d89dc008e5977a6a05e820adfd385f55ca",
-    "dist/2023-03-07/rust-std-beta-i586-pc-windows-msvc.tar.xz": "9573dbb30fd7a24d4d7e831f51e6c05c76d856d545ce4601f4e91b784c348355",
-    "dist/2023-03-07/rust-std-beta-i586-unknown-linux-gnu.tar.gz": "f1861d5b7875a81a11a98a6cde90fe958d1819517de21e377cd05b58eb5dde27",
-    "dist/2023-03-07/rust-std-beta-i586-unknown-linux-gnu.tar.xz": "f8e816f9ca02c3cc515d07d5b5cecc8c5dcee64b8deb1bc1ab249010664d1cef",
-    "dist/2023-03-07/rust-std-beta-i586-unknown-linux-musl.tar.gz": "614a80336890ab422366caf16c73c26a7982c2369393a40633eb925113e93306",
-    "dist/2023-03-07/rust-std-beta-i586-unknown-linux-musl.tar.xz": "e8dbf05a3964ce39dc4c732c5a4bce60cea1764c151b1ed4333e0da858659050",
-    "dist/2023-03-07/rust-std-beta-i686-linux-android.tar.gz": "34df9ba98cbb7fef8624e921045110d0b4623028a611f5819bc79aef9e611024",
-    "dist/2023-03-07/rust-std-beta-i686-linux-android.tar.xz": "bef0d789d8d66d0eb69970ee23e4cc966f655efde901db13a4fc9d02c875848f",
-    "dist/2023-03-07/rust-std-beta-i686-pc-windows-gnu.tar.gz": "c86ba5a55d449af72a4450566a9152edac5fb43ab03d1385779bb4ab62255f7e",
-    "dist/2023-03-07/rust-std-beta-i686-pc-windows-gnu.tar.xz": "8dfab1eb07c9391be73cdefd892f6d7ca72be99a7fda5528906343108c5b5503",
-    "dist/2023-03-07/rust-std-beta-i686-pc-windows-msvc.tar.gz": "99c56608131dbab4775a35ea16d50149af37ea57ef0c0dd52bec2639dc3bfce6",
-    "dist/2023-03-07/rust-std-beta-i686-pc-windows-msvc.tar.xz": "1983fae15ae3e5480efb1cbd0fd0509e863eecdc456e50899bdc6cfc2da580c1",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-freebsd.tar.gz": "4652d56693b3432446ebeb5b52399b27d95066c0085a24a4ff5b96a2116cef95",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-freebsd.tar.xz": "a89a970a699864eda563170f41210ae3692059f8b141d532172907ca1456e8a4",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-linux-gnu.tar.gz": "0d6b69445aa064ad6c53a26b52011b4533e83c7398a9ff4a10c29bd2c5f1673a",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-linux-gnu.tar.xz": "4cd1770586a92192da3aa4fa8a846412db8377fe04ce5502792c67d8d3bf9278",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-linux-musl.tar.gz": "b7c0385692fb7218dc16e3935b6181beeaea1adb731a5ca2dc876a3fa825dfbd",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-linux-musl.tar.xz": "92c608fd3be1bf98ce343f4b42e187fa1182560bfe10a2c3110037b0600f611c",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-uefi.tar.gz": "97703dfc96fadd27af79faec3b9b14f5e64549870c5451e8ca5023dc97a7253a",
-    "dist/2023-03-07/rust-std-beta-i686-unknown-uefi.tar.xz": "7470fc83530b83ad3bae30e7185ca54811f97629ef64b70d3fc2fb757639abf7",
-    "dist/2023-03-07/rust-std-beta-mips-unknown-linux-gnu.tar.gz": "54f2ff0de486ab6e6ed6dae72d798e1fcd4653b7df1f8d4127eb6a6396572081",
-    "dist/2023-03-07/rust-std-beta-mips-unknown-linux-gnu.tar.xz": "fb3c1a6daec2ae77de369ef6bd93955d67e70b7b2799a286d2332f5b7d46b715",
-    "dist/2023-03-07/rust-std-beta-mips-unknown-linux-musl.tar.gz": "4af2c66e9e2b3d4003a47aa638177b256db683f7945fd4cf02122c144736045d",
-    "dist/2023-03-07/rust-std-beta-mips-unknown-linux-musl.tar.xz": "8f3f4385b4a6fb9f8cbeec20b7f7b794d1374221bcab5c2a5aa59d94acdd6855",
-    "dist/2023-03-07/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.gz": "ae14ec5c0ea8629de6b8db2a83a4ceb08be6475a07c89abbd8697f72f9d46427",
-    "dist/2023-03-07/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.xz": "e2ddff933278d45c9e2d4e6734babd3b6a1e104325d814c8faecc4a51d197a96",
-    "dist/2023-03-07/rust-std-beta-mips64-unknown-linux-muslabi64.tar.gz": "d67f7fdfbffcdb4daf134209ae62c051959ef5b450ce12f6ff87b5d7f2d69c7f",
-    "dist/2023-03-07/rust-std-beta-mips64-unknown-linux-muslabi64.tar.xz": "f5ecb43d0445a03d4677b3a8997f899938755c877bad2262dd88f1c5b2960c1b",
-    "dist/2023-03-07/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "9a9b36ce50e1167259c43d5dd8669ca26831bf7d2df6162395df6f22b3c3b7cf",
-    "dist/2023-03-07/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "966d074243e8bdbacbe85fbeae546d9d65b3579015abf18a458798f16ad6c940",
-    "dist/2023-03-07/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.gz": "a64b67a50418e8ced6333075541a30f7272fe11f11160969c92efad447c94ebe",
-    "dist/2023-03-07/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.xz": "f2fee3ae76bb483871b23a4ec1cc22cd89193e087d5389362385d21ddd162392",
-    "dist/2023-03-07/rust-std-beta-mipsel-unknown-linux-gnu.tar.gz": "f659bb468e1e4a44288953e654808452f1b08bc7acef546b72e0b31fb3552503",
-    "dist/2023-03-07/rust-std-beta-mipsel-unknown-linux-gnu.tar.xz": "7be5f817c2cca408804be8f0168e60a407d6088b3758688d2e8a79662b26b340",
-    "dist/2023-03-07/rust-std-beta-mipsel-unknown-linux-musl.tar.gz": "2c988d57deb6d9f88a6ff4180b41a65bd2a69722b6d3dd7a80ecc3bfc1ebda0b",
-    "dist/2023-03-07/rust-std-beta-mipsel-unknown-linux-musl.tar.xz": "8e852cb52c7189a5de0274bc592a720ab1d657f39dd689aea0c11cc8d45b7441",
-    "dist/2023-03-07/rust-std-beta-nvptx64-nvidia-cuda.tar.gz": "24db414fdf589e5c686e0c1441b061d82b480a305cf7926d7a54f3ce6bcc48da",
-    "dist/2023-03-07/rust-std-beta-nvptx64-nvidia-cuda.tar.xz": "f4a90b86b5cfd448c5b7c1b29b99c0f016d64deeee7bfb98048d8b0215f15174",
-    "dist/2023-03-07/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz": "9c04535d6ad8a823e94e98e3d8aa300ae7181501dfb9819ddbe072ffefe2df98",
-    "dist/2023-03-07/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz": "121faf0e67f1fbf609b6f2746c343b2a7fb7efaf0a7129a9d867e8d8c52d5816",
-    "dist/2023-03-07/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz": "013b5968c15c7257932ea79c8df23dafdc20606a4dd6e7b7f784d56d59831835",
-    "dist/2023-03-07/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz": "26abe47cc533337847c021c08fcb88ec77152b5a33500ab948fc45c8bdab23ee",
-    "dist/2023-03-07/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz": "c72d7e9f58640933bbe5dc1cd7b0ba87f5080ed397099d04cacad992a989199a",
-    "dist/2023-03-07/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz": "4ef96cf7f4ad93c41b69e9f6a48937cdfb307d7ec65ab2f475707680f638848a",
-    "dist/2023-03-07/rust-std-beta-riscv32i-unknown-none-elf.tar.gz": "b4d5fabcc593313b41bbe1a4a201d2acd23f07ce249b6414bb5fb940df519d90",
-    "dist/2023-03-07/rust-std-beta-riscv32i-unknown-none-elf.tar.xz": "537d209c9ea5a7d7750206612b353d33d54a5c55af45c4e8e4f113c6d561cd5b",
-    "dist/2023-03-07/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz": "8307dd2783e0ccefb27cd645ab53717c851e91c5c5a2e466bc2ebe00f23afeef",
-    "dist/2023-03-07/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz": "f2bb8932f9d2a0e51caf64367bb34d1c30456863d3933c766c69be50c0474ff5",
-    "dist/2023-03-07/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz": "300892f31875cbca564b54124e85fada8af945247c3a31049e6000494f3a633f",
-    "dist/2023-03-07/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz": "ebeb2d2bdace58faca8f5d8d3e06581c30f18ac7e0e096d03fd4444a7ca9b7b4",
-    "dist/2023-03-07/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz": "62d9e27a3c321bed86839ce6a492e28aa51b1d70bd1b0ff0d6cf8784ee78c8de",
-    "dist/2023-03-07/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz": "c876705073fa8735fb3b89453a4cb00c3324d3e8ee570acf3bab21ab0ec0d240",
-    "dist/2023-03-07/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz": "97751b6d399463e9dbdae41979d0e6405d0faf90ee859d2bb87787a4146420e4",
-    "dist/2023-03-07/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz": "cde9469f915b2f37537da5a596ab75eeeff64affd5f26619cd59dab06c03b13a",
-    "dist/2023-03-07/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz": "000796b94967c2285fa240542063743d389595aa64a58a64145ca093ae505222",
-    "dist/2023-03-07/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz": "3ce3f15333e074060c6fc97f40bc2d41d582744df97c1e4630839a34397e793e",
-    "dist/2023-03-07/rust-std-beta-s390x-unknown-linux-gnu.tar.gz": "8a44c200db94509b83ea2bcf3b5ca7b8ff1f3c7aa0c9b7942ee3047b619aa161",
-    "dist/2023-03-07/rust-std-beta-s390x-unknown-linux-gnu.tar.xz": "6484f92b2d2793c47f1665d4c0bb93fe64359a3cafb658957bd3ffa33c3753b2",
-    "dist/2023-03-07/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz": "d60be45093cbbd1269be0dc0e73ccded00a9b72b65fde8c8c5fb72d79cdcdcf9",
-    "dist/2023-03-07/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz": "8b46c3bb7a74116d8dfa69fa46cc70b4771c6a28d73c501bc935573e1d06cd20",
-    "dist/2023-03-07/rust-std-beta-sparcv9-sun-solaris.tar.gz": "5caf2b9c9dd509ef50840484b577b6ddac2cda32519b75a97053de85340439df",
-    "dist/2023-03-07/rust-std-beta-sparcv9-sun-solaris.tar.xz": "bc00a55394520283826011467d9f27c74369d47e3d5bd0f9c7b7cc2f2cf74cac",
-    "dist/2023-03-07/rust-std-beta-thumbv6m-none-eabi.tar.gz": "38ab6ccd205e1ae9c7599482927bfe42096ad02cef8660bc9aae345b1081e723",
-    "dist/2023-03-07/rust-std-beta-thumbv6m-none-eabi.tar.xz": "7d605918c0bf111a02fec102de688bee0f2f18e3583c004571710421741224f8",
-    "dist/2023-03-07/rust-std-beta-thumbv7em-none-eabi.tar.gz": "cc7b6933e5f16bc828b446289c561d9810a977a322bdd9e406fa9c5b3e3e925f",
-    "dist/2023-03-07/rust-std-beta-thumbv7em-none-eabi.tar.xz": "d42fffb2fb88bac3090a9d99bfb91405f9bac5b09b88b286f74a85deb31adb2d",
-    "dist/2023-03-07/rust-std-beta-thumbv7em-none-eabihf.tar.gz": "63619f93d1047979d90cc37f6903d4d34c28c793f5d07d448b8f818049c0694c",
-    "dist/2023-03-07/rust-std-beta-thumbv7em-none-eabihf.tar.xz": "3f9735ea8a2b340803e95d55bbd1d510b501e4cd5844a9334ee9cda5733f17cf",
-    "dist/2023-03-07/rust-std-beta-thumbv7m-none-eabi.tar.gz": "73581e242b9f002eb36dcf05594859419cbe77393a8b21e8e1f447aaad05b0d0",
-    "dist/2023-03-07/rust-std-beta-thumbv7m-none-eabi.tar.xz": "f582f14891696a51458b3fea2db8ad883012aab40a5d8cfe97b420d0ad7ab901",
-    "dist/2023-03-07/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz": "5036157df192a76a3bc5084e9c4e53d9151871c1bd86851c361a08d09779cb0e",
-    "dist/2023-03-07/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz": "6b85161caf4a45bdaff3f5428fc41b7bc81a216484c755b7cab297a4914b7c7f",
-    "dist/2023-03-07/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz": "b749800ef87d357cc010ba46305d6603a40f7c52be3c1778e6a88a2956b89bc2",
-    "dist/2023-03-07/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz": "622dcf6bfae396ddf89dd0935a3269cc4f86f5ccc7c83982a75b915600f19733",
-    "dist/2023-03-07/rust-std-beta-thumbv8m.base-none-eabi.tar.gz": "7ec9e547fc95900efd3f04cb6f76213be5da762d997c85e8ea8434cbc0c0eebd",
-    "dist/2023-03-07/rust-std-beta-thumbv8m.base-none-eabi.tar.xz": "358fca90a80aeefdcd829aa6d3a027d81ceec010cc42aef971285c7d31699fd6",
-    "dist/2023-03-07/rust-std-beta-thumbv8m.main-none-eabi.tar.gz": "4d87df24f8c466cf2193eec458ce4033926088004d88b3ec4b9c74ed1d137a8a",
-    "dist/2023-03-07/rust-std-beta-thumbv8m.main-none-eabi.tar.xz": "65ded045c0615432a6017524c24da2e66b3ecd83e8869e382a00f2407fd06441",
-    "dist/2023-03-07/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz": "f8e081253423ac6fb29d502267e8fc22a3409965bebdd331dd00420ba609511c",
-    "dist/2023-03-07/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz": "c69a893777fc2acc407832752ea51d4bad5c4741c4a256172e4ebddeb5f939a7",
-    "dist/2023-03-07/rust-std-beta-wasm32-unknown-emscripten.tar.gz": "28a8d21a98af1f950bb3f62d6fd124bc2fab0c0c27a419c1fcc1a84d31191b8c",
-    "dist/2023-03-07/rust-std-beta-wasm32-unknown-emscripten.tar.xz": "b0a774faa4acdbff7d7581617da76e759e073a8d75b435373d9737c4300a178b",
-    "dist/2023-03-07/rust-std-beta-wasm32-unknown-unknown.tar.gz": "2a785745d3129a25441572d221a30d4108a35abf3bd73a387a5d65a5df82ff18",
-    "dist/2023-03-07/rust-std-beta-wasm32-unknown-unknown.tar.xz": "b5a50098ad047748644c7f510cb2682c52499d12f02a1e94c59a4f904c8002e6",
-    "dist/2023-03-07/rust-std-beta-wasm32-wasi.tar.gz": "265fa8b315a5d39a35fb8d32d5e46c3c66f9608992a3d708ac90437818cfed45",
-    "dist/2023-03-07/rust-std-beta-wasm32-wasi.tar.xz": "26839f3ed020dbda8ba893492cf504d565e7e1af7cfec5ad76053443d1022839",
-    "dist/2023-03-07/rust-std-beta-x86_64-apple-darwin.tar.gz": "8322910f96d5e206fc3ad237b4cf456e9fc2be0cbb00a57bfc2625126fe84d12",
-    "dist/2023-03-07/rust-std-beta-x86_64-apple-darwin.tar.xz": "3b1d0288890649121ed4487ec6ef5986913bcad5d224e8fed6feb5fcf56a3b2c",
-    "dist/2023-03-07/rust-std-beta-x86_64-apple-ios.tar.gz": "ea0a805d90b4b18c0b525faf4eedd2827d1f009d3c7a5cdc084db60c54e86d72",
-    "dist/2023-03-07/rust-std-beta-x86_64-apple-ios.tar.xz": "86bbc9cb184cb3c18a0afa1b982e951ee1e2569fca23ae7f85efd29f26e21983",
-    "dist/2023-03-07/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz": "f6bab7e24104f142c62f6d12585725bca24496d45888b22b07d2cc50f2f7f11a",
-    "dist/2023-03-07/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz": "20a1ae7636cc1dd9daec73818ecba60c60162d2a016822f1d3e828f55fc4ef9a",
-    "dist/2023-03-07/rust-std-beta-x86_64-linux-android.tar.gz": "78e7cae3d09a115fdd447bac210a78595076c37287b6dc142f9c363d207e16f5",
-    "dist/2023-03-07/rust-std-beta-x86_64-linux-android.tar.xz": "f37fcdc813462bcd94b0a06e38e665da9e5c1b5704cd029a23498c003a0df0a2",
-    "dist/2023-03-07/rust-std-beta-x86_64-pc-solaris.tar.gz": "afb0facbc35bc80c9f23ba59b9367c95b907c944aa5e1eff0fcf9687ca1089cb",
-    "dist/2023-03-07/rust-std-beta-x86_64-pc-solaris.tar.xz": "c771fd343a9a2073a8170730936153698d94aed87aa15b52a04075a6bfedd4ba",
-    "dist/2023-03-07/rust-std-beta-x86_64-pc-windows-gnu.tar.gz": "c753b3450a584ec7614e20fe308653c2451cc1910de76da663ee5c53a451004b",
-    "dist/2023-03-07/rust-std-beta-x86_64-pc-windows-gnu.tar.xz": "0d072a92ee2d33dd6b6122d273ba8cdbbc7dbc4cf090ca7abbe08fbfb16d5f86",
-    "dist/2023-03-07/rust-std-beta-x86_64-pc-windows-msvc.tar.gz": "de23d40c1aefa660f1411bb0c17da4f16b093244c0d515861b0866aed1e06b07",
-    "dist/2023-03-07/rust-std-beta-x86_64-pc-windows-msvc.tar.xz": "6f7b6070ae06074f338fc9eae327bf219389b5f88ee7ae07eb1e290d277b0f8f",
-    "dist/2023-03-07/rust-std-beta-x86_64-sun-solaris.tar.gz": "f2d68b5119525110c29dbd19a747f3ad632f45facee5c437e6796a2a213c52d3",
-    "dist/2023-03-07/rust-std-beta-x86_64-sun-solaris.tar.xz": "2da196278cc5a2eba2400d5d2b13fe74b65e9daefda0a6231684baaf76982147",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-freebsd.tar.gz": "c922f51ac5c80630d9cf2b1a0f770bcd1c1d74180a716b9852d37a6621035c38",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-freebsd.tar.xz": "b6ae7c3cd80b12537d0802444be97acf9be5072c058d025ced07398b0651f45c",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-fuchsia.tar.gz": "2fa8a0fcba9ecd4ac6c47b22091a4f58708f96197f95dcc8075e80a4256fdb0e",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-fuchsia.tar.xz": "025575e750bc2e1b43e7bf288a87059c96629d0d7290a57cfd0e31f2d0efb9aa",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-illumos.tar.gz": "8cfc61094c5ea8eec46131c17deaa8dfaa900f75300b996abd167f527defbb3f",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-illumos.tar.xz": "2e7c57376dbf890dc7d6bb7a0b555ee791b147aea4924882a3a94f9b75347f43",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz": "4840a693353f759d2d9e3fa40df97f200f27106159a9b126698a6ce07c3a117c",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz": "9a13a8c8e16028d0e07608da8fbd0ea5b51d9d425230712adcbac679ef5fef9d",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz": "0ac015df12c5212ac61b5a691d982a4fd64a8f77653b3d41e47da974abecda9f",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz": "bc12d3599f60a5860a15958ea7d4dc537d64802a23bc75e37a7381d875d3de2d",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-linux-musl.tar.gz": "10ae35f994f504db3f58f098e8af9bc15f0c8e878b0af8487b6975846dcaf5ee",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-linux-musl.tar.xz": "6d46f12168472f6a82980987d02b7e646a0814219c809ce04c352048be0a2981",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-netbsd.tar.gz": "978d7e3df8d6a16af9461eed0fdf79745c8a3ac91dc7e53ac4670e1991916e59",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-netbsd.tar.xz": "f936f6d186df0efcbf1655e7d2436bdebf5cd56ff811802c9ff753f20f38579e",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-none.tar.gz": "9c76650dd06c6d679716e4215259720ff5abed7731621617b9a785bb1c1f3c88",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-none.tar.xz": "4ec0d0b2dc4d163db2967df2f16dfd822adba2d85e85fcb21984c84377b4a5c2",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-redox.tar.gz": "701342db468d8bd5c08b962adf3b2c34d83a10fe81936d3b91937b5667e3f5e9",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-redox.tar.xz": "1c32cbb84bf8f967de3fe71e63c3c0d28c799276d9c2b5f2b3afbe87e57f026a",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-uefi.tar.gz": "51492e36780f026b1485d2c0394bc232d8825f3317fd438b1f8eaf9b8d50712e",
-    "dist/2023-03-07/rust-std-beta-x86_64-unknown-uefi.tar.xz": "33e46267265e9ec7394932b197c598d48147a119bd7346614714590181c84884",
-    "dist/2023-03-07/rustc-beta-aarch64-apple-darwin.tar.gz": "16927a64c3e0737274ebe4c8e6423977d5f2d684751f678fd2dc5c6a6020ab4b",
-    "dist/2023-03-07/rustc-beta-aarch64-apple-darwin.tar.xz": "66f758933129e0b1856b477f364e04187316227b4853aee8a5f95f6c7ad60fac",
-    "dist/2023-03-07/rustc-beta-aarch64-pc-windows-msvc.tar.gz": "10a7cd771929aee13937bab01ad1e6d19998cc4ef58816ad8306539140fe3dfc",
-    "dist/2023-03-07/rustc-beta-aarch64-pc-windows-msvc.tar.xz": "1d9ce8c7728b1831ce564df9a8ee9502ddcfd83c764d0f8c5b941a9beb570fb9",
-    "dist/2023-03-07/rustc-beta-aarch64-unknown-linux-gnu.tar.gz": "d75924fdcaa76b064d018e612457a4f960536c51767f46fe20d5e90d41424d45",
-    "dist/2023-03-07/rustc-beta-aarch64-unknown-linux-gnu.tar.xz": "1956f0965e3065a5901f935c42b10e07783ca33a2a8b6f182a5104edc4d73a01",
-    "dist/2023-03-07/rustc-beta-aarch64-unknown-linux-musl.tar.gz": "40fbf2a72485dadf04eaf2a128f631c02542cb53f0d2b2c26369e8b8ee08463a",
-    "dist/2023-03-07/rustc-beta-aarch64-unknown-linux-musl.tar.xz": "cb7f9812a09ec7397ccb67f36484ce22425446940b65cdc4c72e823a6fab5ec1",
-    "dist/2023-03-07/rustc-beta-arm-unknown-linux-gnueabi.tar.gz": "bc95e80e02e822913eadf5319253e7422615468db1c9627d394992319c3e4d5d",
-    "dist/2023-03-07/rustc-beta-arm-unknown-linux-gnueabi.tar.xz": "5b089b4b531cbd43909518093f6cfb1e5d4df138ede86ef7cc0e0e1053a43452",
-    "dist/2023-03-07/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz": "030d2ec4494c9139966cbb833c1616a78b973f10409defbb39f936652ef97449",
-    "dist/2023-03-07/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz": "2b2a728780b1bd30ec0cbcf014cb8914ed423a46a97f330c23b7386d8aec2ab7",
-    "dist/2023-03-07/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz": "2406baa5db6a46e51c79201fde893089ad16f31a17b117509774ee76f16bcdad",
-    "dist/2023-03-07/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz": "d121bf988fe4225d1cee4b452a0d5aa1620c990456dd9002c0af179802dc33c8",
-    "dist/2023-03-07/rustc-beta-i686-pc-windows-gnu.tar.gz": "eb5d4ae35799c3ddacc77e946b9fe8c1ba88f193c14c58ff23ee7ad89bdc6d9d",
-    "dist/2023-03-07/rustc-beta-i686-pc-windows-gnu.tar.xz": "1aeb85967f6de2267024abab0bb46dec4ce3bd06e687af39745cb556c37a82fb",
-    "dist/2023-03-07/rustc-beta-i686-pc-windows-msvc.tar.gz": "be2b29bd8ac4214eb5dff5f51c30cabfe859bc02b994c87cb139af50889abced",
-    "dist/2023-03-07/rustc-beta-i686-pc-windows-msvc.tar.xz": "1c097877d03021b975f2968bda73301a541b7989eb217537ffa3ae079e576c5e",
-    "dist/2023-03-07/rustc-beta-i686-unknown-linux-gnu.tar.gz": "3066f0d3b0e0319c8e9bfcc2215bb16729611563cedb976de0356a050ea68357",
-    "dist/2023-03-07/rustc-beta-i686-unknown-linux-gnu.tar.xz": "3908a8675f8b5743ce407e12cd0a32f0144db9b38bb49f05c47e855973d1e8c8",
-    "dist/2023-03-07/rustc-beta-mips-unknown-linux-gnu.tar.gz": "7aad6a6e37fb7f4fe835c2bbe7d1deb36ef973b7c94f3969b003812f87a92ff0",
-    "dist/2023-03-07/rustc-beta-mips-unknown-linux-gnu.tar.xz": "29e434023a1d94aaa5003723e2bcd31588d674f2ae243109e34f8e88e141c58c",
-    "dist/2023-03-07/rustc-beta-mips64-unknown-linux-gnuabi64.tar.gz": "4b2e92cd5a01df031060d03d088829056039951ce8b7edd9549944a6f567e07e",
-    "dist/2023-03-07/rustc-beta-mips64-unknown-linux-gnuabi64.tar.xz": "7e82c3f1a6d5175e452abd4f321469063cb2007f9f33cb3302a5745f985aefb5",
-    "dist/2023-03-07/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "b9fb2eb2f43b7479efb227964141f3beb29db829f449830ee41ac83280366ac7",
-    "dist/2023-03-07/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "c4eedd1aa5ac1532387a3091525d9d94fa7979002e0399b351bdd8d3bd064475",
-    "dist/2023-03-07/rustc-beta-mipsel-unknown-linux-gnu.tar.gz": "03685364b7750002a9a88717170c4330052c0838de82727734ebcb2d8b0466bc",
-    "dist/2023-03-07/rustc-beta-mipsel-unknown-linux-gnu.tar.xz": "13834ad521e7a3439c56dac58a548f816a60cc2b4f0d25952fb610b0245cd141",
-    "dist/2023-03-07/rustc-beta-powerpc-unknown-linux-gnu.tar.gz": "840a15c851f96e9b6b662d0b39c947b922e54195b07822ab6b1e13d5c8206a32",
-    "dist/2023-03-07/rustc-beta-powerpc-unknown-linux-gnu.tar.xz": "5721cb8347f4e9e546a59cec5c89ff548a2dbe867e27107678da6862a435781f",
-    "dist/2023-03-07/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz": "bb0c56acb9bb9940e970f23649f0d41338950f2e1c97cbca5e2de673069dca54",
-    "dist/2023-03-07/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz": "89c102653c6d4f562ad32fbc2d1b82ef38917528a7da6a3219f7b232dac62fcd",
-    "dist/2023-03-07/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz": "7ca86f54a307ec8e4751a58d541745c900813ef9b355ba21442629ef6d965ea1",
-    "dist/2023-03-07/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz": "c88a9c0581a8e3d119c57b9825ea8052e448871ed9c64f7530528e7fc833acaa",
-    "dist/2023-03-07/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz": "48f8abaffc106eba05c903ec250aeff17a71efa88702459da0ba8be58e62c8c4",
-    "dist/2023-03-07/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz": "04c176b55b9fdb2fc123e1e012fb8e2dc3bee74861b6cfedf2c1ffbbb3320293",
-    "dist/2023-03-07/rustc-beta-s390x-unknown-linux-gnu.tar.gz": "a908e7f868fcd71050f57e08d15648cd6da04a0f9d150d87739349fb9c87a515",
-    "dist/2023-03-07/rustc-beta-s390x-unknown-linux-gnu.tar.xz": "75062df65fbf89ab1d5344a3471e2c6322f9124fb447b32f634fb6d41695d5c7",
-    "dist/2023-03-07/rustc-beta-x86_64-apple-darwin.tar.gz": "df5224bb128f668474b9702457f5a349144b3148f44ae77109c7ad78800a4c42",
-    "dist/2023-03-07/rustc-beta-x86_64-apple-darwin.tar.xz": "9d27f437e483025cbdb69804f05138ebf181dceda8d32a676ea72ea4f27e69c3",
-    "dist/2023-03-07/rustc-beta-x86_64-pc-windows-gnu.tar.gz": "a7f05d2072c3d3eb7ea88c09ec24a2ce0007ad31df5d3405c6766a68f2fd8ff4",
-    "dist/2023-03-07/rustc-beta-x86_64-pc-windows-gnu.tar.xz": "5e6477ac67b7db05caf15704541db112846415523c483df123d5f566e33afae4",
-    "dist/2023-03-07/rustc-beta-x86_64-pc-windows-msvc.tar.gz": "3a9fd984f8a6673494859dce2dda6be7293effdc3ff7b4620b1078ba346150eb",
-    "dist/2023-03-07/rustc-beta-x86_64-pc-windows-msvc.tar.xz": "5a12779df3e03ecb9ec334c02245f4dd779a4763ee789a9d6c72c244fed5b444",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-freebsd.tar.gz": "dd04e308e72a9cee60db732a17f12e1acbf279fd07efc232648087b765338f44",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-freebsd.tar.xz": "1dd44474ba9956abcdb0aa9d50c39fc7dcc3a78cd56450009bf4ee10cd94ef2e",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-illumos.tar.gz": "0db8082563772e480dfa71851182fd8a45cf6776d486e02204d92af0784c86a6",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-illumos.tar.xz": "eef088e452e105bffe4d28d38d1eacd4982253f0d59cdeb1f406068961699e0c",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-linux-gnu.tar.gz": "b767ffb06f21b1be530d79a81d8550680d15fd511de5cafae6da9da71017362b",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-linux-gnu.tar.xz": "d62e8956025dca9d6a9259cc8a35c6d364d161648adb91b50f1fe7e2aec5eb1b",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-linux-musl.tar.gz": "aeb32342fc36171ae54b8677348dee02b10207bc85da773a1c7bacfac5e736fb",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-linux-musl.tar.xz": "b051ffe45858f1ae2e60461183e4181a1b5c3fa4b349788416fb80b3e3fe39ea",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-netbsd.tar.gz": "2e5ed0ad450602ce32de9509e5317b1b205d4b715f716befb0389f6f6ad94cda",
-    "dist/2023-03-07/rustc-beta-x86_64-unknown-netbsd.tar.xz": "9347db918ca8139f0d816f297d327f48039f02e1d9d9f443fc0f46fb260c8901",
-    "dist/2023-03-07/rustc-nightly-aarch64-apple-darwin.tar.gz": "034c90c20d39fd2384b03ad2a756d3ca28a7447423bd709a0ade19374aa0fb05",
-    "dist/2023-03-07/rustc-nightly-aarch64-apple-darwin.tar.xz": "89d6d968fd5e55a950a798f06a09e1a776cf11dccc94b8123c21c55ebf55e9b7",
-    "dist/2023-03-07/rustc-nightly-aarch64-pc-windows-msvc.tar.gz": "809733a64b50a7c9c637afb442e45c4424a0fec96d921cfb0c8a7b30fa52edf7",
-    "dist/2023-03-07/rustc-nightly-aarch64-pc-windows-msvc.tar.xz": "03057ff6c4ae76618edea292f49abfcdcad09615a6164186348aba218936c3f0",
-    "dist/2023-03-07/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz": "e34521e27196fae399e0cbec28700ac409a829cf365bf5b9a7dc5530af61b93e",
-    "dist/2023-03-07/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz": "e17a9773d58ff0f48cce6c86326cbc33c4e0e8ce08f1a6d475481af9771ae6d6",
-    "dist/2023-03-07/rustc-nightly-aarch64-unknown-linux-musl.tar.gz": "01fffcbc734b7de28773a658178534a2cd4d262b156161abd6e5d1d471b45181",
-    "dist/2023-03-07/rustc-nightly-aarch64-unknown-linux-musl.tar.xz": "84c0c9d65f00f259df87e78bbe03d0f31075e70b71c587ca580e63604ee654e9",
-    "dist/2023-03-07/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz": "215cc518a7caacd106ffaaf28f709d1ddb3b4595acdf8574866d4e351576330d",
-    "dist/2023-03-07/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz": "f50d088adf616f3c25d095254b93d9032a41e5c6a3906afee959b223d6205dfe",
-    "dist/2023-03-07/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz": "a902efadc47040841653e67f918814a16242312c79ef11c10d69ba9999473c88",
-    "dist/2023-03-07/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz": "d608e664a5ce02b246b6b00910bdcb5f09e565e41cefbbb8efc579ac9a73c810",
-    "dist/2023-03-07/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "9e8151095f851f71c1d72d41e4ac63ee0dcc81d0f172ce9df4143b6499047aff",
-    "dist/2023-03-07/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "285530c33e600a4df44fd06abeac8e48aa5c084386c4cbe78e797c54f85d01ec",
-    "dist/2023-03-07/rustc-nightly-i686-pc-windows-gnu.tar.gz": "c0e245e17691d38d9f69164e5d9e02d08b5c2355f6fa9cea4bacf50af672c67f",
-    "dist/2023-03-07/rustc-nightly-i686-pc-windows-gnu.tar.xz": "d0c0e699cde96fb23ad5bcc7a8dbf94c86271404b72055bd3382eb29ae4ea85a",
-    "dist/2023-03-07/rustc-nightly-i686-pc-windows-msvc.tar.gz": "b083a065a973394293c11369199385a96d79a6cac5c9d695848e7ac2e51507af",
-    "dist/2023-03-07/rustc-nightly-i686-pc-windows-msvc.tar.xz": "b819b9af08383249f99f0137b636ac42ce84e3e5220c9e0fc1d9e0d348dca54f",
-    "dist/2023-03-07/rustc-nightly-i686-unknown-linux-gnu.tar.gz": "7337d5bc52c0e18c24546b04777ac24461b34e31a59d7df1611f70aee483528f",
-    "dist/2023-03-07/rustc-nightly-i686-unknown-linux-gnu.tar.xz": "efaae84475ddb1845fca470d6d77d842da4e2ad0cca0b2c1e9210c6fce3ff08c",
-    "dist/2023-03-07/rustc-nightly-mips-unknown-linux-gnu.tar.gz": "bd12029bcf9539959c9c9451093cf51ed9db6c7e26b9b9a3bf8617e481b9f094",
-    "dist/2023-03-07/rustc-nightly-mips-unknown-linux-gnu.tar.xz": "b9ea393526c68b9b502d81387cd4a1db7eeddad61467d2442be7c30d210727d8",
-    "dist/2023-03-07/rustc-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "997b37b199cc270b5a832aa608d18e0005a510efb587f154f899a22fb7f13639",
-    "dist/2023-03-07/rustc-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "e66332078213bf0cce845605d2f7faf28d859e3a98d12d61737ef782a9bdb187",
-    "dist/2023-03-07/rustc-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "8a7cbbeb0a9f82333068b51c49d33f694d91da327b1169bc44e9d570840d48d8",
-    "dist/2023-03-07/rustc-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "5eb5e2e270a4a475ef2933fe34c764dc6cfaaae423b0d1acb5313fda970f98ba",
-    "dist/2023-03-07/rustc-nightly-mipsel-unknown-linux-gnu.tar.gz": "3140ecca2db80b80118a08cc3fc7ac2989054338525bcc1fe0e2ef1fb5f742bd",
-    "dist/2023-03-07/rustc-nightly-mipsel-unknown-linux-gnu.tar.xz": "0432d418a81564af612a5dac562d7f4d72d7a18ac25260ad183609380efb6bc5",
-    "dist/2023-03-07/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz": "5be5fa12eafd82618c1f3f611351f23af1150c48b5e02f80f5b4252ec45c11dc",
-    "dist/2023-03-07/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz": "c288c46b8f077ee604d6de6286dc908086383be91ba17700c3f6273d064c6d82",
-    "dist/2023-03-07/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz": "de3fe2a9c4c87c5d622a1375dd4fd68064bcd2e5c36dbbc92b95ee42c8ad839e",
-    "dist/2023-03-07/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz": "b2fbb76cc9e323d0e61d927d7aceff561074b6dbf9907ed3c8dfd867d1308bd8",
-    "dist/2023-03-07/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "f16e202e7e2cfc3a47a0eddd5271fd3a9b7bac5f3c476ce619a249b88cc3ef0b",
-    "dist/2023-03-07/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "61a1cc7f9ce2e8d8ce62165ae7e8b8a53d5c78265641553305130f7a66c706ea",
-    "dist/2023-03-07/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "25ed59822afbd23edc354adb7e3bc361be9170ddd44fb15d7434e7240a66637b",
-    "dist/2023-03-07/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "fdadf6c8d04b99094385b4678015f23da571c3cc134b99e96c3964b15d91d9fe",
-    "dist/2023-03-07/rustc-nightly-s390x-unknown-linux-gnu.tar.gz": "b84099f98efd9554a005f8b6d8f15dc9bcd60f9f37856174306873631fa7597c",
-    "dist/2023-03-07/rustc-nightly-s390x-unknown-linux-gnu.tar.xz": "608f5a3a1628306618126f94349171566d9a38f14f58875ec1b1e990bd7b1b20",
-    "dist/2023-03-07/rustc-nightly-x86_64-apple-darwin.tar.gz": "4d8b094bf5c608b55e5b618838dafff4b701be093d42aea388c998c2676b226a",
-    "dist/2023-03-07/rustc-nightly-x86_64-apple-darwin.tar.xz": "f11249dc7fd5d208b10b9ead00dc8baa410ce92f61f597e3a550c138e9145413",
-    "dist/2023-03-07/rustc-nightly-x86_64-pc-windows-gnu.tar.gz": "db689e50dbef48555609217d09205cd1e397770469a82a9c0ad1f2cf1dd1643b",
-    "dist/2023-03-07/rustc-nightly-x86_64-pc-windows-gnu.tar.xz": "36160f7b9a98a463d4e62ed18ff59f5aa34aedf25cf7a7bbd1e4f93dfbfc4a60",
-    "dist/2023-03-07/rustc-nightly-x86_64-pc-windows-msvc.tar.gz": "0b10bbbf73fa9a9524746b080d44bcb29d31f013ab809b4c06a71e626f637b4a",
-    "dist/2023-03-07/rustc-nightly-x86_64-pc-windows-msvc.tar.xz": "a96259b26388fbf7907df887aacd8059f87207b46bb84ca9b87c460040a17d21",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-freebsd.tar.gz": "0327b112309ab37508c5bd814a77a50e8eb86b19705758ee0a3c09cc560f89cc",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-freebsd.tar.xz": "a7715f358798fc2f78ae6cb08b46f58ad577b91d0aa286893f8f51fda6b2de57",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-illumos.tar.gz": "ed8d664f8609211b3eff0a606f1d5b5f46eb8ab0095df626a26c3abccc518fab",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-illumos.tar.xz": "10badd3e994e93bf48ff1aafc7c056ac525afd12ac4761c0be7af94e361faad5",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz": "77b7bf994db683057ce94871fb288a24ba41d9a8f5441dfa9a39f3e772f295e3",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "738db7237b08938d978a00b5b972f4c52f36a128ba103ddb67318a905c7e2d27",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-linux-musl.tar.gz": "50c57bbf49ec12092dad9de0e559c18f2049de07a0edac4b596a71a2f25a5e0f",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-linux-musl.tar.xz": "31af1fbb0f1288e6d7b8eb594cb1936257603038c1ce8b89399056f5d3e1e9c4",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-netbsd.tar.gz": "0a9e395f0b74cc945458d4ad4176567e86cfded1a594eaa485baadb4794dcb64",
-    "dist/2023-03-07/rustc-nightly-x86_64-unknown-netbsd.tar.xz": "26ff4a12db2b583e2e0b87aeb3d3eb9d1edc3478bfd40ffeb7ebdbfb8d8b2987",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-apple-darwin.tar.gz": "498c7ca27319868d6d2cfb9448b516de1a12076523f092d6c0df10848ba73ff5",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-apple-darwin.tar.xz": "eec9591d608e13c34fc8108fe976ae2085d688416d82c71bf18f3b00e35a1442",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz": "e9822c7e59218e75af96657bc8a5c3a20c77209f6f1d8861c626aabe7ba9a61d",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz": "dbad704c1fcfbd8562f366017c514aa90874de6028a9b41764ab7d78a72df6bf",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz": "5529210f57a0128889c19491846ff7c6f214d3a81d0619ee8dbd840f5f6f84a7",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz": "d59160d2f737322d401e864ae6b7be47f784a334c7cb378a0bbc2769e975945a",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz": "ab98e6c8fa7998065e0aaf211559d71405cc6e1910e3799889a27bdeea8c620f",
-    "dist/2023-03-07/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz": "04ca84fc64c1d211bd29f99b278d9072babbd1e0e9009d9f6f8f1b05f93a70ca",
-    "dist/2023-03-07/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz": "e80942fde81d3b54c4d0fc73576eebcda215535e4d80093f2a68f434958c0d9a",
-    "dist/2023-03-07/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz": "a9f10f9a51d3e3564f40c65f6d50c8ef67b4e074981f06f4d3b66aa398883f42",
-    "dist/2023-03-07/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz": "a5566343b6e3abadb152cd4a325735830aa9a60d5f2f87ef1aff66bbde276b14",
-    "dist/2023-03-07/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz": "9682e6c4a153d5083b0b360ed9248772da89f05f1142a6f297fc67218b60f298",
-    "dist/2023-03-07/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "51c14ab7679c23825e3a5b9637035768fd43f1e2787a12e431699710f4324998",
-    "dist/2023-03-07/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "f44893b879649a288c77b826e7e10202a2d3a5b8a8b123d8a030e69671a3ac43",
-    "dist/2023-03-07/rustfmt-nightly-i686-pc-windows-gnu.tar.gz": "7d5a0e567d8efd65b06b4a75ddc50e7bc2e36b42abaeab15147e970688c0bd07",
-    "dist/2023-03-07/rustfmt-nightly-i686-pc-windows-gnu.tar.xz": "541d5cb3d7beff1c0f9f2ea4a521303a372c2b6f4476d76bcfce4974a2753dfa",
-    "dist/2023-03-07/rustfmt-nightly-i686-pc-windows-msvc.tar.gz": "ccc65022f10cf0d7b8228806742c5163cd77edfcc2624894b96b2c9d6d974da4",
-    "dist/2023-03-07/rustfmt-nightly-i686-pc-windows-msvc.tar.xz": "fccfae7200edd30cd1b6083d00a400641b77e0a4a6e3bf2573710964c896c0d1",
-    "dist/2023-03-07/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz": "eed06879dacc571c289745a943de9bde2e39bee79ab5a5de0304fdc00e116855",
-    "dist/2023-03-07/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz": "cb1ed1cf09ce5cdbec931ea27b6fccd37b63108c780ae21c1756c68e0415c59b",
-    "dist/2023-03-07/rustfmt-nightly-mips-unknown-linux-gnu.tar.gz": "b0681834694c5aa27c404d2328a5ce3e3dcc8a0b146fcd9d47113655cf94c948",
-    "dist/2023-03-07/rustfmt-nightly-mips-unknown-linux-gnu.tar.xz": "a246b3e7c6ad436ad7523607bcf3a1fc42a66dd9da6a401fdaba5724fdf6801c",
-    "dist/2023-03-07/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "fa5b4d24c046b01b981fb81540155af5677490f2ac151418fa7791ec0f5aed56",
-    "dist/2023-03-07/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "b28148883461e905440ba25f755dc6a46c393a69a4cea48044e376fb90caa44b",
-    "dist/2023-03-07/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "ff37f00813b2ef0c206fb66cd383f87a089fad6a3746a9d62b27109557eb0097",
-    "dist/2023-03-07/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "2132cfd61404cfdad4e21ad95066836c77863756d46abc1fd2b702f46b3c7fac",
-    "dist/2023-03-07/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.gz": "89d1e41fd9bdd76c15faba83abfa1ffdadfffb6cd1b49c18e2d1333856296ee3",
-    "dist/2023-03-07/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.xz": "2353107ac3875f9cdf690b6684941c2def1c240416208dee58f58e78eefbd96e",
-    "dist/2023-03-07/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz": "b6e0882de92b73d540d22df393750646487dcf12c11b0bdad01265ce5cd6275f",
-    "dist/2023-03-07/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz": "c64967a706e7448f97d40b50356672b03f2731fde3488084007bbe7cd07409a6",
-    "dist/2023-03-07/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz": "d7d829f5a23aa25b320cd4f4c12d2db11d7e36c67a9396de7426933169159b62",
-    "dist/2023-03-07/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz": "1080d035d29fb9f8e1c007796e38164261ba19d4362b847d571eb7d3a6281d5c",
-    "dist/2023-03-07/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "874d841241b37072a6fb6c8d70f0afc9535ffb47793270b3a2a5c96ba46b7ec2",
-    "dist/2023-03-07/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "7ede80fb9a1aa27380d764d04e587a30fb6aee36138b145e32d518cbe8ec95b5",
-    "dist/2023-03-07/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "e1ec7d8b92740b0dff06e9424ac8d08b64e4aa85c5e8d46f9234fdeab5ad5e44",
-    "dist/2023-03-07/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "9058714e2f253ca681b24308a59bee006f636dff0b7571ebdf7c7687233b5a2f",
-    "dist/2023-03-07/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz": "6087e0abf78f2cb49240314cd31aa9bbfca02eb4918db4a2aaaa6758e8364560",
-    "dist/2023-03-07/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz": "2c775b1d4e2f3218a1d51f8ac79c63e8c2eabc46106e2a38d5bd1febcba7d12b",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-apple-darwin.tar.gz": "3a14e2b54773816cfdee1a835d2f758abfaacef36af6a7744c464b0ce5713c8b",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-apple-darwin.tar.xz": "3f6f7e5b9180f0114781b776a7f1bca72b208ddd102a9e44cebcd501eea7a31b",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz": "c92bf50f2a729af4b045184cd984bde0d97979cf8ae35975a1eaad5d8ae04195",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz": "c62b8f4862d0f8c38b890408c014be5d6d245f2a49d6f31a80c9447bbed4d8b4",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz": "8452a8704cb04ce2deef2cce2d9f2be066c5bd35aef323877ebef6f8f739710d",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz": "e694bb8697679196246f13031a9eef5129b0441a8c93c0292382b21cefab39a7",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz": "37f7ecfc0ba9314b2ec46ce202973cd7e36062a88070427ced9ffed3ad96c685",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz": "7aef4412810218743a85f1c7cce423394a327a708d31441441050bc1fcae0d80",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-illumos.tar.gz": "70701d0bc637c282436e9ef6f18dadcb8068305ac64b1abb802bbc5054ff042c",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-illumos.tar.xz": "2d8e170259a254cf6b1c5749a681040db70e2603b7231082483f03e2714765ba",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz": "7241cab5f93fc338fbb07acd2d38e2fa8615c4e6ebb0a53f51ac60c23838845f",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz": "2742e08cf5900ad3002809c632b8b8962325699307943ba2bafa0931204cc787",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz": "576c17a72e47fc743d60818bbfefe17c0223eb979cfed3046bf4797e6c2a6d26",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz": "25026a50665f53b7ac3e1e08b3a5a3a526411c8c18be6d64df6ab23ee0819b64",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz": "773679226499447a48cd823d324fc906a1d93f3fb5abc137920aa67ece410de9",
-    "dist/2023-03-07/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz": "53c88668c3c9ab6df7f3cace825a45616909bb28628ee8636a8ce86b77cf4bb5"
+    "dist/2023-04-20/cargo-beta-aarch64-apple-darwin.tar.gz": "4d98b7d2ed4ff9a73c3d26a45acd113406c122a0d4ced1c1945cbbcefc857828",
+    "dist/2023-04-20/cargo-beta-aarch64-apple-darwin.tar.xz": "3319213011ff4898373894d1ff5c7d9b2dee44cc39c6b0bc69e9736ae5a971e7",
+    "dist/2023-04-20/cargo-beta-aarch64-pc-windows-msvc.tar.gz": "84307f386d3c331ebb43da3b4b7fce61672a32a88ceabfecbd452f0d510eed0a",
+    "dist/2023-04-20/cargo-beta-aarch64-pc-windows-msvc.tar.xz": "7903dd5957bfb2f45127f66ad6bec16bef461a1620ccc39ff44e0566786c97d0",
+    "dist/2023-04-20/cargo-beta-aarch64-unknown-linux-gnu.tar.gz": "f383343e236a896ebfa382a5f1ce5087239582ac2d8772625441ea91d08b9f1e",
+    "dist/2023-04-20/cargo-beta-aarch64-unknown-linux-gnu.tar.xz": "ece2088b56c5ae2fd41027f6986d16e812b13eda2b0ff3672fbb103d265be1e5",
+    "dist/2023-04-20/cargo-beta-aarch64-unknown-linux-musl.tar.gz": "1766ef8efeed5f606d3ffe6f5a041defb8b07982f83cbc54d134dc278216a506",
+    "dist/2023-04-20/cargo-beta-aarch64-unknown-linux-musl.tar.xz": "492a07d0164f28ba0cd25e2f32d94c800ef106c8f9a39b8253fca05cc33e243e",
+    "dist/2023-04-20/cargo-beta-arm-unknown-linux-gnueabi.tar.gz": "44c2d142fd8f1d868e349413e9c072cc518cdf98ab76b29c30eb54feedf39a9c",
+    "dist/2023-04-20/cargo-beta-arm-unknown-linux-gnueabi.tar.xz": "3c8819f0ca9e0988c6ca6b8261d1e2c1f37c57af2a6fc49d8b75cffaba835551",
+    "dist/2023-04-20/cargo-beta-arm-unknown-linux-gnueabihf.tar.gz": "c59ad33dc775892a7465d3e49ff304b7ee105f554f9ba8c7f4bdc9b057b696f8",
+    "dist/2023-04-20/cargo-beta-arm-unknown-linux-gnueabihf.tar.xz": "8b17731fef0970ee38d1ebd9868ffda44c6ab57a51bac497a36587e49a96f857",
+    "dist/2023-04-20/cargo-beta-armv7-unknown-linux-gnueabihf.tar.gz": "b1e93383e4de4901c1cfa4e85e07d3d5f7e224628df32efd47824dd391c84bf5",
+    "dist/2023-04-20/cargo-beta-armv7-unknown-linux-gnueabihf.tar.xz": "12a4606fc358ad00934cf7dc4b3779c70653acc304d8f4c3ebfd29322a401fbb",
+    "dist/2023-04-20/cargo-beta-i686-pc-windows-gnu.tar.gz": "4a69cda4b23f8482e73f060cb13e71ae16968b9e7a78514ca5c588f285bf8148",
+    "dist/2023-04-20/cargo-beta-i686-pc-windows-gnu.tar.xz": "415929203b23223cb590b37b68b05f27ad84d92b0ee203c26db02da5633b0edd",
+    "dist/2023-04-20/cargo-beta-i686-pc-windows-msvc.tar.gz": "5897a03a62444d6fcc2928afb702b7087b3d6d3ee79dd283b08456857a461fad",
+    "dist/2023-04-20/cargo-beta-i686-pc-windows-msvc.tar.xz": "2c739f9481782515cc4e911686dd5afc5fe839a88fade616bad2c97ac3f5ce81",
+    "dist/2023-04-20/cargo-beta-i686-unknown-linux-gnu.tar.gz": "e9fe240dff59be45f5e9b798e8c05c1548d983ba9356e4f700c50a85fe215f3d",
+    "dist/2023-04-20/cargo-beta-i686-unknown-linux-gnu.tar.xz": "375e787c939c71c15c7286997d2845a3cdf38b614bac9b872886a6b3e92ee64a",
+    "dist/2023-04-20/cargo-beta-mips-unknown-linux-gnu.tar.gz": "c5808c561f5519ff33666dd9457185b3617641e17ade91e6b88b577e2c95f004",
+    "dist/2023-04-20/cargo-beta-mips-unknown-linux-gnu.tar.xz": "24dffb76be37cdd51f69ae8509a7d0acfefce7de46bd1536fe45e7807567dd90",
+    "dist/2023-04-20/cargo-beta-mips64-unknown-linux-gnuabi64.tar.gz": "b5fc64052bcd93154a1da5908a65922ed106b443a8633d8b888b7c5c20bf1469",
+    "dist/2023-04-20/cargo-beta-mips64-unknown-linux-gnuabi64.tar.xz": "813ba9323a1fb70bc04260eb74fece4efb7de88755a1c77dbc9cfda0c9f81f86",
+    "dist/2023-04-20/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "fc67b687248225694f07e4e18716231899cbfdaa2cd74a58460129eb55b47e22",
+    "dist/2023-04-20/cargo-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "7f1375c416058e8ac3261d205f2f979986b11cfd020cd5df9ea42c67013a890a",
+    "dist/2023-04-20/cargo-beta-mipsel-unknown-linux-gnu.tar.gz": "6296f405cdcef28e877d878ba0e1b9a8555d4a067148b7fc5d8409e39b59b41c",
+    "dist/2023-04-20/cargo-beta-mipsel-unknown-linux-gnu.tar.xz": "c22cb99cc2afac88cba85cab7a177361eb98119c3d7748d511112f4ae464c98b",
+    "dist/2023-04-20/cargo-beta-powerpc-unknown-linux-gnu.tar.gz": "e30746ab117d9c59a5e36486794394c9279ac4078cd63441efe1bc4843b2e44b",
+    "dist/2023-04-20/cargo-beta-powerpc-unknown-linux-gnu.tar.xz": "267f3889a4bfb5caf22132fc6e04ca143240a44a1e8549782e02b287940bab9e",
+    "dist/2023-04-20/cargo-beta-powerpc64-unknown-linux-gnu.tar.gz": "c6114d5a546c5462fbbfebb092b2b532f3e94a36b1edaa038246f08bc4c05693",
+    "dist/2023-04-20/cargo-beta-powerpc64-unknown-linux-gnu.tar.xz": "18ef9c3cdbce1e8fbfd50fc41b4b3e45419dfa5bd4f888e64036ca3639c184f8",
+    "dist/2023-04-20/cargo-beta-powerpc64le-unknown-linux-gnu.tar.gz": "c7a511ad37e6bad90b9ecc51cdd74f8c63fca89f0d7c7d639b8770de86cebef7",
+    "dist/2023-04-20/cargo-beta-powerpc64le-unknown-linux-gnu.tar.xz": "45a7b42f9444f3c03b9743d19dfdd3faac55574fd7100372fb9237e2702cb19f",
+    "dist/2023-04-20/cargo-beta-riscv64gc-unknown-linux-gnu.tar.gz": "3e792e4198ea979f3cd572a5d86079594d45e66a40e76a40498a90d3507a4cd0",
+    "dist/2023-04-20/cargo-beta-riscv64gc-unknown-linux-gnu.tar.xz": "6417f9dee2f0f8a96eaac09420eb8906d6d94678404e47f4c5881fc69c43fa00",
+    "dist/2023-04-20/cargo-beta-s390x-unknown-linux-gnu.tar.gz": "95b3116b14643dd7d400a5719865c6b272c84d992e1ab59e292460d82d0466a6",
+    "dist/2023-04-20/cargo-beta-s390x-unknown-linux-gnu.tar.xz": "5d7507e287dfc78b6c526b02a8b2dda940c6953a01dfe0a19c18ce3d1caa0a73",
+    "dist/2023-04-20/cargo-beta-x86_64-apple-darwin.tar.gz": "8b2075a2021b3779b373bb7c0f4243a4830e0d177c486849791aacf96c7c3046",
+    "dist/2023-04-20/cargo-beta-x86_64-apple-darwin.tar.xz": "84da8de65979a9a292bbae1e46478be56fb65b7f85e7e6a7da1a1392494b3f83",
+    "dist/2023-04-20/cargo-beta-x86_64-pc-windows-gnu.tar.gz": "2d8d7c4d7265e1a0b7d845b0d03d73391be2a7bc4ccb00d618a19b86bd7d3d86",
+    "dist/2023-04-20/cargo-beta-x86_64-pc-windows-gnu.tar.xz": "eceeecbaab98ad656d4bd81d770a930d62bcfa800ea8b2272026422433a5791d",
+    "dist/2023-04-20/cargo-beta-x86_64-pc-windows-msvc.tar.gz": "1e00d745fc4c45bc1859527636073b064f66d8050b2d4e740ea3fc0c0ebbd366",
+    "dist/2023-04-20/cargo-beta-x86_64-pc-windows-msvc.tar.xz": "07ae876661f9d58c333ad8bf0d6c93a76a3386c38fa864550afed9fe60f904b2",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-freebsd.tar.gz": "cad8be555d550b9295b7440ab3cc088c7ad41bc7fe01845bf9daf8362c59861b",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-freebsd.tar.xz": "b8cf24eeef7d19a26f525bd9fdfc9425524e916aea96f009dc5a885c13789cd8",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-illumos.tar.gz": "7f58eaaca7b157c82c3631ea15c8cc06bcf273b36acdaf5fcb9099bb88f3050a",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-illumos.tar.xz": "ba28a88433b3f1a5ad306191960fa1f9a886fb13382b9aaa631c3738958573cd",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-linux-gnu.tar.gz": "1a86221d09e8ef97b3f78c6742159184e5a08420b46729cbaed037ffa999c4be",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-linux-gnu.tar.xz": "9e4e0a0839a87303fca33e245fd4962f4c7ac76e91fafcfc6e918f29f230f277",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-linux-musl.tar.gz": "e6030829304e60f198647403d00d72402302fd09742dbe75e666d2e3ea4475ed",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-linux-musl.tar.xz": "f3a8860dd293fbfffe317964df25421b5de2b43db9c69c831084d6d25a4432a5",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-netbsd.tar.gz": "5bc329ca4bbcd1dff623999177d6bc68043eb9320358da59e935ea6c4bd5eb44",
+    "dist/2023-04-20/cargo-beta-x86_64-unknown-netbsd.tar.xz": "8666cff4e8c4c1b54ad93e202421c008caa33bbc72ef3f9d8e8c4c9d11a495ec",
+    "dist/2023-04-20/rust-std-beta-aarch64-apple-darwin.tar.gz": "d033c430d3af35801bf2ba9ad67e302b71108d5b4a4e5a5f8e55e929451ea65b",
+    "dist/2023-04-20/rust-std-beta-aarch64-apple-darwin.tar.xz": "72d78202353bcaec8ea63c3c41da85a787630d42f1ee1f60df859d08cffe58a1",
+    "dist/2023-04-20/rust-std-beta-aarch64-apple-ios-sim.tar.gz": "338045ac14fb4bd3315075552a0d3ce1ebded292a7601e115ac6b329a36181a9",
+    "dist/2023-04-20/rust-std-beta-aarch64-apple-ios-sim.tar.xz": "59ce7292af43c8af70a4264a76e4429ca07c276a59863902d13c47265defc796",
+    "dist/2023-04-20/rust-std-beta-aarch64-apple-ios.tar.gz": "9cf19d3ce1d48fd59e060c1fdc483ef98d03b34ff81cbe95abb89e6a89db281e",
+    "dist/2023-04-20/rust-std-beta-aarch64-apple-ios.tar.xz": "de6e3ec39eef54f87853609fb747634c3d5e7916274d8f08610d1da318ecbc37",
+    "dist/2023-04-20/rust-std-beta-aarch64-linux-android.tar.gz": "e5385590450562a6057004f36d8b5b2b3e2fa7a04006de54dfbf8247adf12b7e",
+    "dist/2023-04-20/rust-std-beta-aarch64-linux-android.tar.xz": "0e5f65414953dcb7be3dbf556a8da44e0915d33a93c5d62c6f1c8d7e0c32f6bb",
+    "dist/2023-04-20/rust-std-beta-aarch64-pc-windows-msvc.tar.gz": "63431ed5bd5037df838f7d7f46118cefebef16393fea2adac7f697775845d4b5",
+    "dist/2023-04-20/rust-std-beta-aarch64-pc-windows-msvc.tar.xz": "481bfcb150bee2638336f281cdedcf023a7e65a6f4b8c39255237636afb7d51a",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-fuchsia.tar.gz": "16180718b23f1301b45a799e7c7c9e1a0ff83b8a63142d32eb3c07798038ec2e",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-fuchsia.tar.xz": "3b0dcc2ea10e8482f49afb0188887b5f17f4404d4f182f8b9e2f852aad220d70",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-linux-gnu.tar.gz": "ed6117f7d0e7bcf9e7ef7a67b2a552ef616cb16843ff44d6d4cb9de2b0145a78",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-linux-gnu.tar.xz": "449daea8f5466e760ddb5b45526486b6386ddd6a546b5d2d589a38d96b2373fe",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-linux-musl.tar.gz": "2719afaa0560f3974a56eebe24b783b45a0b6022c1830336d96ce9979d58995e",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-linux-musl.tar.xz": "6eadf7df3987c9a56023303d950779ca24648a7b3408ddd8e492d74210c95914",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-none-softfloat.tar.gz": "a2428f7ceae916c49f54891f85a8db5f7d48748afd9cc121f1bcd58041afc0b6",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-none-softfloat.tar.xz": "72b84200dec649a417317c78f05162ebb8a3325b9c3a582085b0a2bc0de34741",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-none.tar.gz": "de5a37cd7aa2b97f693364b3202eb1ef3af57efe510626df536a8e21589ed2f0",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-none.tar.xz": "e95b5428f7347ce021d509d64c414705f82800d979dc9e0937f3f7318da1e8f1",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-uefi.tar.gz": "869534cf8258feffab97417db638f8e18fc8980fc7f5f47f347fddb1190e3575",
+    "dist/2023-04-20/rust-std-beta-aarch64-unknown-uefi.tar.xz": "9697f68c98a764c7105fefadb35a911e9aeca6cb094134033abcae429fe1acff",
+    "dist/2023-04-20/rust-std-beta-arm-linux-androideabi.tar.gz": "bcaf8f9e3099e77a3389b32f016af7d9faaeb661976707df02d5fc43ba9c1809",
+    "dist/2023-04-20/rust-std-beta-arm-linux-androideabi.tar.xz": "a9553688137f7b345f13fb3fb3a7b57370a6856b513be52752336a8b33da4329",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-gnueabi.tar.gz": "55bb0e601d0b60f3c6ce434ad527a2fa4eae1c1749c63958ebee60a3b75a78ab",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-gnueabi.tar.xz": "0e54d080e47693d6de6ad9b3a25a3667754346e3c699017adee94095f31130a9",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-gnueabihf.tar.gz": "6724ca816dbbcb6020ae413de2ff7b6dea7d976eb36e92916700a4e3c9284dbe",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-gnueabihf.tar.xz": "b39ea928a753ee8a66bed531900b2f5526c30c6a959b17aab72580e22027c5e7",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-musleabi.tar.gz": "3165943ddcdd9a308e2bb5437b09aacd4e164a345495439d0edab26b497ddf2c",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-musleabi.tar.xz": "3e6f52a2e03d4fe56ba0fd7fa4db7ee95c115c678ebd71baeeddb0ad6e08ec36",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-musleabihf.tar.gz": "8228dbc77321a471bb4760e245d4658459bc89590ec49e459b158d99bc3a043a",
+    "dist/2023-04-20/rust-std-beta-arm-unknown-linux-musleabihf.tar.xz": "a1699ee7bb2d84a2dfb25b66b8fb926874839c7c5b171dffa5acbdcb611c4cd7",
+    "dist/2023-04-20/rust-std-beta-armebv7r-none-eabi.tar.gz": "a9217cb08456e3bc8806ee7be3ec02c3de9ded69562c65762e574d54322ef9a2",
+    "dist/2023-04-20/rust-std-beta-armebv7r-none-eabi.tar.xz": "08b8ac8409b38da84a56b3f8eb662c805e279d8526b6e5b38205f9e6cd0b93bd",
+    "dist/2023-04-20/rust-std-beta-armebv7r-none-eabihf.tar.gz": "673f4d0984a8f18c921bbad319afc6ec3b8e25e3bdb0c38480cbfcccc1e6c130",
+    "dist/2023-04-20/rust-std-beta-armebv7r-none-eabihf.tar.xz": "0f47b88fa6ac741ce7175357f8e92c7e9b5a1d4a41d364c7ad6c4a0bca18f8c2",
+    "dist/2023-04-20/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.gz": "b6574d3da501f73de2837997621772522b175c7bae99d2e8e23353a889889db5",
+    "dist/2023-04-20/rust-std-beta-armv5te-unknown-linux-gnueabi.tar.xz": "95e2ce2cfdfaa802acd84dbf8a5bc897fa632b18138c3826357ff84fd3f11f51",
+    "dist/2023-04-20/rust-std-beta-armv5te-unknown-linux-musleabi.tar.gz": "dd61c1c8e55f54d92307444d5db0e092de545046b66cc7205ec93c4e6852700b",
+    "dist/2023-04-20/rust-std-beta-armv5te-unknown-linux-musleabi.tar.xz": "0728bec4717ff37f52736cee33fff9196654b0c496b27078e74eeba2634045bd",
+    "dist/2023-04-20/rust-std-beta-armv7-linux-androideabi.tar.gz": "588af191bbff71616dc2d7fddf3415321114f44d0a8e3fe8a6c522a334010b34",
+    "dist/2023-04-20/rust-std-beta-armv7-linux-androideabi.tar.xz": "29f75c5799f79d7a8d589c069c9897817861388d74e3e4cc02cde8c458b59c70",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-gnueabi.tar.gz": "252e0e1fb1f91449224ac4fa73eb5b13aa204c1cdf9b275abb05105b289936f4",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-gnueabi.tar.xz": "e0211b866c7136823b5ab2ab0514411e50666cfa898afa2fc4927c870382bd33",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.gz": "7c68de890cc95eec9a42a4669972f214a5fa2f6cba552c584015ad1f7b89d5e8",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-gnueabihf.tar.xz": "3875fd0963af34cc7deb643e7b82a854de819aa58b521eb151ae8036967af74b",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-musleabi.tar.gz": "be5937a48d7dcacb0c25e733bb83bfe93cdf7acb10fd22f679580a0519f426df",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-musleabi.tar.xz": "2c34b67a2dc81af1ccbc582d57aa29eb3372f637093a2c782f82ed89ef52010b",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-musleabihf.tar.gz": "98cc474e0fb49435fe1650f410b39484e02daf10a82fcbe947112496c30ccdbb",
+    "dist/2023-04-20/rust-std-beta-armv7-unknown-linux-musleabihf.tar.xz": "cf1231ff373492437353ff3e465174524661776ec0bc39c5e7bf6ccafed3cba0",
+    "dist/2023-04-20/rust-std-beta-armv7a-none-eabi.tar.gz": "4ab6cc13a0a902dcc95e590edbff7b6839ae7f115683766a8e1b7f0b20120b0b",
+    "dist/2023-04-20/rust-std-beta-armv7a-none-eabi.tar.xz": "bf39cb32d900a6d5856094ee1f972b560256beb80ba7e5a9b6ca8a0e3c34b319",
+    "dist/2023-04-20/rust-std-beta-armv7r-none-eabi.tar.gz": "ad57ceb9ecd6ea1d0691fda8637a4d756576b6695f4c3c07fde74800bca7e857",
+    "dist/2023-04-20/rust-std-beta-armv7r-none-eabi.tar.xz": "163967e6d9361208efc60931db53a7db5ae10a0ddaf6b27e7d3144d9d0d1b4bf",
+    "dist/2023-04-20/rust-std-beta-armv7r-none-eabihf.tar.gz": "d54a199ff6e803adb28dceb196ff90fb6018f817eb6bda2dc69ad0d14dd6e271",
+    "dist/2023-04-20/rust-std-beta-armv7r-none-eabihf.tar.xz": "252ab39a5c07ea74a4c517318b4ca70f946fd3aff6c379d1f9eae801829d1500",
+    "dist/2023-04-20/rust-std-beta-asmjs-unknown-emscripten.tar.gz": "5d55a83f821547e691f4796761faa19b5d4a20b13de6328f461de92169ade335",
+    "dist/2023-04-20/rust-std-beta-asmjs-unknown-emscripten.tar.xz": "1862d1b76a2ae8684994fe8b9718c96aac9936ea11d9c41f520e24d3e01b718d",
+    "dist/2023-04-20/rust-std-beta-i586-pc-windows-msvc.tar.gz": "545d56bbc00df1a535dd6274bb3e0a1bec1bae5c19632fb685d43dd7f877e014",
+    "dist/2023-04-20/rust-std-beta-i586-pc-windows-msvc.tar.xz": "f239658a666a99838b9dc85732fc94b6ae641df07566c0790ba2876495106b54",
+    "dist/2023-04-20/rust-std-beta-i586-unknown-linux-gnu.tar.gz": "3b439a90c15f0382939c350fc0358e71d68ae49a1c56569d0a2954b6148d6044",
+    "dist/2023-04-20/rust-std-beta-i586-unknown-linux-gnu.tar.xz": "c9bb0f39e3d6178b675ae1b73dc366e7a15bc625384453e796fc1b2fc62d58fe",
+    "dist/2023-04-20/rust-std-beta-i586-unknown-linux-musl.tar.gz": "6016b8ea6bb6b056fb01cef60ce26aaa9155c121dde32815ce5cb6bb3314c9ba",
+    "dist/2023-04-20/rust-std-beta-i586-unknown-linux-musl.tar.xz": "b2cd62404bde5d4c745d31d89c6ac3ddc88aac420bb7625dba4ad6cd91ff6551",
+    "dist/2023-04-20/rust-std-beta-i686-linux-android.tar.gz": "8e078415c424d7462814e338b426d77d3351efa702c74d28444f4cfe27c012ee",
+    "dist/2023-04-20/rust-std-beta-i686-linux-android.tar.xz": "c6844efceabff4f5753648a578aed0feffc946819b1c06c2b9119d208876cabe",
+    "dist/2023-04-20/rust-std-beta-i686-pc-windows-gnu.tar.gz": "ebc118086fd129cda6f7fd830547d6bf6d25c7099130c0a9d97ddd60b7fb4d2e",
+    "dist/2023-04-20/rust-std-beta-i686-pc-windows-gnu.tar.xz": "87571ee1fbeae08b184ae8b3ab7c5c9c3a1678479b878bb007810d2755d67a29",
+    "dist/2023-04-20/rust-std-beta-i686-pc-windows-msvc.tar.gz": "0ab9eb41374b2907a1d7912b427861ce47c977ac9c7a9246d0d2025e907ae055",
+    "dist/2023-04-20/rust-std-beta-i686-pc-windows-msvc.tar.xz": "086b03ce92cfa352855fb73ee19ec6ba2f87508fb48a83a87ba8b4e1c1ac685f",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-freebsd.tar.gz": "562a6b5ac2d177628ff6e6440954bcb9306ece91dd0e18fd9802a60c5a49c9a5",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-freebsd.tar.xz": "d258389bdc1300da58edc6c40904b6e63bef3c0ae0d2b86b115c97d66573cdcd",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-linux-gnu.tar.gz": "35df2bb07444d663b42950316d0257098c7afc2f3ed38586a49b977acfc11002",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-linux-gnu.tar.xz": "10b50981e0a1cd66c45da4c565336d89ff9221c0389edbea8fcf09bbae0ec2af",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-linux-musl.tar.gz": "8ab88821e6431c42e5a2c185ee645f4eeb6bc68c5ed0e6ab958bf08e72c1f400",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-linux-musl.tar.xz": "1bb1b2eb46f93792dabc08a5494de4cb30bcee598ef6e20dd93140e2c23e67fb",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-uefi.tar.gz": "01de016073f34946b0250b99e69c800eb7618c3062e3ce7cf2020725598b42ff",
+    "dist/2023-04-20/rust-std-beta-i686-unknown-uefi.tar.xz": "ab8981777cf708f9ca36123a827eccec73791ac55ec9b66ee1ff760c13794090",
+    "dist/2023-04-20/rust-std-beta-mips-unknown-linux-gnu.tar.gz": "81e08c858cc7ff3d16030673b274ae469e04e225898249dae9f77c9013ad0f89",
+    "dist/2023-04-20/rust-std-beta-mips-unknown-linux-gnu.tar.xz": "e5d1867128653a60659844dc8730e34dc110a0f6d69847a8ea6e2d919567bbbe",
+    "dist/2023-04-20/rust-std-beta-mips-unknown-linux-musl.tar.gz": "b8a3b04ffb88b374d1d4ba4a2314b288c5668794b4901bc7086c7fde30f2f901",
+    "dist/2023-04-20/rust-std-beta-mips-unknown-linux-musl.tar.xz": "fab6780f39862274350244a1abc7f1966c3da3c8fa0690a05db31406ad4cc30d",
+    "dist/2023-04-20/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.gz": "970f3eae77c78d27f7ba14c31a594151a95e88cad72af5e0cf9d94d350ba3118",
+    "dist/2023-04-20/rust-std-beta-mips64-unknown-linux-gnuabi64.tar.xz": "bedcd164f715442282d353ea083dcd34ce7c872475c6cd134bb572a69886ac9e",
+    "dist/2023-04-20/rust-std-beta-mips64-unknown-linux-muslabi64.tar.gz": "67ca11faca21ddd40e4d3734c8b1cbd53eb614c1904662e45ded35e204f14bde",
+    "dist/2023-04-20/rust-std-beta-mips64-unknown-linux-muslabi64.tar.xz": "e338d2024f636dbaf1b6d9eed1e35f2ae63fdaee0e0e6c6cc8c4bf1f90d0f322",
+    "dist/2023-04-20/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "265c2c2575147d0afa844cd480224e2f2ebeb12290b2895ac996aa5fc849731b",
+    "dist/2023-04-20/rust-std-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "6a08c02546b350c0b38cc8190cc29abf520990178017ff2cfabf502be9af30ea",
+    "dist/2023-04-20/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.gz": "a39233f78f76691f102a88a76608015c9223cabcac455763239d572dc4a7004b",
+    "dist/2023-04-20/rust-std-beta-mips64el-unknown-linux-muslabi64.tar.xz": "cdaf45841f2465b7827bb86e493d8e471199f431b1b7ab8afdadabf9ccbabbb9",
+    "dist/2023-04-20/rust-std-beta-mipsel-unknown-linux-gnu.tar.gz": "2f126f585de6ebd896ff9eee00441a79398ef194a6ff676be6d0f8050510932d",
+    "dist/2023-04-20/rust-std-beta-mipsel-unknown-linux-gnu.tar.xz": "8b42ae4a31f68f864938365055e110c7665e47efd0c98a60f50e77b7e27e156d",
+    "dist/2023-04-20/rust-std-beta-mipsel-unknown-linux-musl.tar.gz": "03332ca367b11151fa3dd17df697134bac23f46b79cdf43c86ad17cef0df06dd",
+    "dist/2023-04-20/rust-std-beta-mipsel-unknown-linux-musl.tar.xz": "54e0094bd9000029e9349ce7797921703452ea3d110470ee9a493e4e0127708d",
+    "dist/2023-04-20/rust-std-beta-nvptx64-nvidia-cuda.tar.gz": "c51a75587b5c864cf2c6b07f41924ad7bf984e00734c9f94cea978ca21ca1c3c",
+    "dist/2023-04-20/rust-std-beta-nvptx64-nvidia-cuda.tar.xz": "13074f9149b35e9f88e869f6ae85f27a65c66ec144755f786bfcccb802fa497a",
+    "dist/2023-04-20/rust-std-beta-powerpc-unknown-linux-gnu.tar.gz": "078fb778f57d80bd115fb765bc36206776d5d2f121d10e4b62ef0cfed787cb6d",
+    "dist/2023-04-20/rust-std-beta-powerpc-unknown-linux-gnu.tar.xz": "d1e29ab981fa5d18607bc9bb65661676f296133593d133fb175feeaa4f5374a4",
+    "dist/2023-04-20/rust-std-beta-powerpc64-unknown-linux-gnu.tar.gz": "138f93d88c5cf8fe4e67383c0a4b8c3cd1d51e76a30a668439691ec61943f2dd",
+    "dist/2023-04-20/rust-std-beta-powerpc64-unknown-linux-gnu.tar.xz": "7fef6c1d757716aa08213ab034ef77b7d3ea2b749b37608342c4809c972057bc",
+    "dist/2023-04-20/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.gz": "a1c9ebd4322d9215e0391d5c30d3e634e05d23c6689980e7576c591342da0e03",
+    "dist/2023-04-20/rust-std-beta-powerpc64le-unknown-linux-gnu.tar.xz": "9d21462bbbd99fd57f236ca82b14656a1429301fc81ee152f9e4029b9749245d",
+    "dist/2023-04-20/rust-std-beta-riscv32i-unknown-none-elf.tar.gz": "a332218306e37bd6140f8725b1c377af43f39693c7b1443b247107fcfa4a1a21",
+    "dist/2023-04-20/rust-std-beta-riscv32i-unknown-none-elf.tar.xz": "79b4eef0907b0ec275e5b287a97f1fd27407c1906243913963171ae584fec222",
+    "dist/2023-04-20/rust-std-beta-riscv32imac-unknown-none-elf.tar.gz": "5ea2e0d35c18a7c95c9c070286edfe064d73e5a7ef7c17aa1b08d098518d10bc",
+    "dist/2023-04-20/rust-std-beta-riscv32imac-unknown-none-elf.tar.xz": "12c91e2f5c04ef34a9da4a1ed25c5e4cc4f324f95a27efe832b2e29255b3bc1a",
+    "dist/2023-04-20/rust-std-beta-riscv32imc-unknown-none-elf.tar.gz": "8cdd8a51216adca6122e684eeb8bd98aefb70315295eccf2f1e5ec2ea3bf7630",
+    "dist/2023-04-20/rust-std-beta-riscv32imc-unknown-none-elf.tar.xz": "83fda212d6c189cd2ad9a21e442e1d48656d30165c6de941d4f46b6fef9db187",
+    "dist/2023-04-20/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.gz": "4e01f5d02fe6a23c0440e2d59fc16a590ed9e514e933622cb836858b3faa9a5d",
+    "dist/2023-04-20/rust-std-beta-riscv64gc-unknown-linux-gnu.tar.xz": "a89a4c5ae01ad7d26df5153fc2919815709a63a17e7fd771a3678912e15865d9",
+    "dist/2023-04-20/rust-std-beta-riscv64gc-unknown-none-elf.tar.gz": "339f71343320dde6a38a270ad26439f66cbc4da4afc3a72c3133c533dd47f75d",
+    "dist/2023-04-20/rust-std-beta-riscv64gc-unknown-none-elf.tar.xz": "24d2a176029a4894c1474a099fefd27d1e86af70c2cb35ecee29e6e1c0482d87",
+    "dist/2023-04-20/rust-std-beta-riscv64imac-unknown-none-elf.tar.gz": "7eb3384ed0a63f2b1566e5f7e87100ba790de784ef5237d3272f9c94db88212c",
+    "dist/2023-04-20/rust-std-beta-riscv64imac-unknown-none-elf.tar.xz": "6524d41fcc8ebf0e2e7ad4c4c0add45b39467aac153448786b1458f2c56d18a8",
+    "dist/2023-04-20/rust-std-beta-s390x-unknown-linux-gnu.tar.gz": "a9cd65f1796163a681c1946782627a1c1f4ecf28df7fbcee56cbbcf6d5b28f15",
+    "dist/2023-04-20/rust-std-beta-s390x-unknown-linux-gnu.tar.xz": "d03ccbfc381e6ec9458b6e5a2a6d7638b01b2164e43e50403b89ee9f7d10bab1",
+    "dist/2023-04-20/rust-std-beta-sparc64-unknown-linux-gnu.tar.gz": "ccf9e75be80ab8a64b13d57483c58eb09c16001a6a44ffa275a0e00c830d8707",
+    "dist/2023-04-20/rust-std-beta-sparc64-unknown-linux-gnu.tar.xz": "9cfb6b4604433f52dd8f0d1a08e86a000795fed9095148c51b1f81287ffb12db",
+    "dist/2023-04-20/rust-std-beta-sparcv9-sun-solaris.tar.gz": "18cf1837ba56256716f79fd5d53b45a50ecc0c2caa368ab162589904a51e7e31",
+    "dist/2023-04-20/rust-std-beta-sparcv9-sun-solaris.tar.xz": "188b3a51ca73a38e9aeba7adf88b9bd7954e8b479c570d4f6844c43e1aac6a57",
+    "dist/2023-04-20/rust-std-beta-thumbv6m-none-eabi.tar.gz": "826e0eea9d14a3f5b9b1b831e1644f5dd8129480683e1dd934772c860394f691",
+    "dist/2023-04-20/rust-std-beta-thumbv6m-none-eabi.tar.xz": "0fd19cc21dc6efce2caa2244fa39f5562fdfebef5f423b4e58d790c1f66de44d",
+    "dist/2023-04-20/rust-std-beta-thumbv7em-none-eabi.tar.gz": "8498c8ace2c28dd06d0c3528759549f3075cb8b6f2e846db479eb96b43a21b32",
+    "dist/2023-04-20/rust-std-beta-thumbv7em-none-eabi.tar.xz": "259b5f0cf679561cf81ef801815ae89c2848232336d6bc5bc8ea06f9ea8d13e2",
+    "dist/2023-04-20/rust-std-beta-thumbv7em-none-eabihf.tar.gz": "6521e7eb5dd003862685dcd19bd6b8aac3ebca54e945846bb061916cb5a8c100",
+    "dist/2023-04-20/rust-std-beta-thumbv7em-none-eabihf.tar.xz": "c2c7102b9135cf63e988401740dd9f0e47d0f6bafa866475ad65d8c2e3a5a6e4",
+    "dist/2023-04-20/rust-std-beta-thumbv7m-none-eabi.tar.gz": "c0cf188a9830d7992796f5b5f5d15d6baa0b94da8575f9992464e8d8811e7d4e",
+    "dist/2023-04-20/rust-std-beta-thumbv7m-none-eabi.tar.xz": "ee37f54d02e22c238d21454ee678b5d349b6b86160a97ab4ba9e348822878b8d",
+    "dist/2023-04-20/rust-std-beta-thumbv7neon-linux-androideabi.tar.gz": "88d087e15f8a9aff522fa30a7b461bfdcc8a14a1ad22d874727823e8f1dbcc1d",
+    "dist/2023-04-20/rust-std-beta-thumbv7neon-linux-androideabi.tar.xz": "90f370a2d93866c4a465ad4f7363c46b71f0e7eceb538be0761548447e46b143",
+    "dist/2023-04-20/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.gz": "032fe22201db120cb3f95e4f4ff96fdc09fe72b3c023dad19161c94b1bf49b4e",
+    "dist/2023-04-20/rust-std-beta-thumbv7neon-unknown-linux-gnueabihf.tar.xz": "a2f661de0a9287bd5fbd8a9bbc2fe971d6d0f3e0e33d367339231e788779edd5",
+    "dist/2023-04-20/rust-std-beta-thumbv8m.base-none-eabi.tar.gz": "fc8fe009d76071b5a567a5dd6a2efd3daace2acc3cf358242e24c30aeba8e8b2",
+    "dist/2023-04-20/rust-std-beta-thumbv8m.base-none-eabi.tar.xz": "6220037537a32841f3ff5ac551b28d85eed3ec2d4a8e9e6d833dca6493b33fbe",
+    "dist/2023-04-20/rust-std-beta-thumbv8m.main-none-eabi.tar.gz": "e0f3ae6ea1bf62a5c875ed3d7d0146ae5d7d56826ac1e447a19ec90e564827a5",
+    "dist/2023-04-20/rust-std-beta-thumbv8m.main-none-eabi.tar.xz": "796f4b094c1c8df7189584a92158ca8ffc05e4a1a0d3a4d0f8a216bb99bc1665",
+    "dist/2023-04-20/rust-std-beta-thumbv8m.main-none-eabihf.tar.gz": "65a74d18cc2597e012fbc7800f2b75e16082afb197c680e89f1007257fd114fc",
+    "dist/2023-04-20/rust-std-beta-thumbv8m.main-none-eabihf.tar.xz": "c6480f3d6cdd2d2ef43d27e103cb894843239f9c2570f9b73afa0d75536dc4af",
+    "dist/2023-04-20/rust-std-beta-wasm32-unknown-emscripten.tar.gz": "bedd0f7d8bd141dc9239484f9fbc2898863097802683652bcb7c59ff812fde9c",
+    "dist/2023-04-20/rust-std-beta-wasm32-unknown-emscripten.tar.xz": "af3121db2d2d98da862e923ccd315af5e4c72f5fcb42b7ece712db8ead615be5",
+    "dist/2023-04-20/rust-std-beta-wasm32-unknown-unknown.tar.gz": "fb9b55a54528fc8894a915578a6e5c3f17e5253355154af48543488da16ac407",
+    "dist/2023-04-20/rust-std-beta-wasm32-unknown-unknown.tar.xz": "0b28eceb3dc40e9de08a9ee6ba781a052b0785ac42b3e6583a6a084332d8993f",
+    "dist/2023-04-20/rust-std-beta-wasm32-wasi.tar.gz": "b801aff4b972011b14b08952f2ea9cb2e12262f50c7c916dbf0a20744b7d3f19",
+    "dist/2023-04-20/rust-std-beta-wasm32-wasi.tar.xz": "26f49c2b5f77404881b9ac6514b9c0a9a49b35515a841c203387cd5e007fda2a",
+    "dist/2023-04-20/rust-std-beta-x86_64-apple-darwin.tar.gz": "23788d725fbeb6055ae38389b7c8c81461fab9f11ac64b39383d2c358ecb83a5",
+    "dist/2023-04-20/rust-std-beta-x86_64-apple-darwin.tar.xz": "d6299ca57f4e2fdef065724507a22ba63bee76fd4fd1c475bf66be2efe396912",
+    "dist/2023-04-20/rust-std-beta-x86_64-apple-ios.tar.gz": "3e1d7c5e728c306d7697564d512577d7f2b0868c3bf4cddca206948b9ef676ee",
+    "dist/2023-04-20/rust-std-beta-x86_64-apple-ios.tar.xz": "a34a5a4a8fc36501a3511a34721c68659098d985e7516e1fb30e2ae9ebb13697",
+    "dist/2023-04-20/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.gz": "fe046c71f7a09a0a4eb4b023756c6b751afea7092e7f4b53b6321c593dbf6e34",
+    "dist/2023-04-20/rust-std-beta-x86_64-fortanix-unknown-sgx.tar.xz": "b4f482c9cf11bb1ae253cee16ec90748d2327733b6b9a0b32d68a16cea99974e",
+    "dist/2023-04-20/rust-std-beta-x86_64-linux-android.tar.gz": "ca160d9645ebcaed94e742bc4d2a70c026c5cc505c00ed0feae406ab5eb2ea68",
+    "dist/2023-04-20/rust-std-beta-x86_64-linux-android.tar.xz": "764c2cc73a77c754c84752cc3ff9f6369c7ff2af0bc8c3840aab20bbabae7d79",
+    "dist/2023-04-20/rust-std-beta-x86_64-pc-solaris.tar.gz": "bc3159503789a508943b5e5a1fd4199fec023b448da52ddba517a9c748d9fdb8",
+    "dist/2023-04-20/rust-std-beta-x86_64-pc-solaris.tar.xz": "2d43fcb2748fbec913001f880e1b279a3d854b6203694acf513bde0a3c172fc1",
+    "dist/2023-04-20/rust-std-beta-x86_64-pc-windows-gnu.tar.gz": "1385f3a1468a4d30a7b4d58d4bd683656bc1191ba7371ea4172a868a15af9343",
+    "dist/2023-04-20/rust-std-beta-x86_64-pc-windows-gnu.tar.xz": "d7e4dded34cd043c411dc6d78463442ee02545610fb34b050afd4b453f8d3328",
+    "dist/2023-04-20/rust-std-beta-x86_64-pc-windows-msvc.tar.gz": "eb9181a4bc3d7e02aa4fb959446894ba8a3efe4e71dfbc3e7b1ede6cb52ae87c",
+    "dist/2023-04-20/rust-std-beta-x86_64-pc-windows-msvc.tar.xz": "1b23632345f55cccb9fbc47efdb8f8c9fd4bd0172fa21dc813832a9bcf58f75c",
+    "dist/2023-04-20/rust-std-beta-x86_64-sun-solaris.tar.gz": "8edcf15812bb2726d5a0efce4e8e49d442c91c26fc35a26a76993aedb7a514dc",
+    "dist/2023-04-20/rust-std-beta-x86_64-sun-solaris.tar.xz": "8050ae692ee600cd5beedcabb2088e7c1f7f222c85abda5af289861a550c1a21",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-freebsd.tar.gz": "7f820b5362c8ab6d52a3d54689383cad76db2bad351fdbc703c0ac25f2fb2f41",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-freebsd.tar.xz": "d22641d071a0d07206300cbdd0024ca49b4fa95635c6b5477114119421cacef6",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-fuchsia.tar.gz": "f27dd55f65b30f5528d1ecd53209435501747a6dc95940dcd193b0887befb635",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-fuchsia.tar.xz": "5298fcba18a6a74f39ea5ef356e2b7af6a605c1bc988bf3808f188ac331231f5",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-illumos.tar.gz": "74e6f11ae802eacd6ceec24c349167919fdcdc12645b0884acd3a97f8dda29bd",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-illumos.tar.xz": "28aadd9024dd2caad14bcbe18a917d72bc5c6336e3498c2622c361086ae4f357",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz": "050e31339de130c68c1f20403a95140aa438f1254c56aae5f3525ce6b610fbcd",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz": "f68ffe728f8317f19ea1431542803c2800272174c003b6a8c2f3d2f12494c20d",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-linux-gnux32.tar.gz": "1355d05d311e6380bc1d40b23c3f4d8cdfe5b41f900ca1025b7bfce309cee2f0",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-linux-gnux32.tar.xz": "f6441f808026691def0f4909dd1df9ead77d2698ec44fa2627110aab271ba44c",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-linux-musl.tar.gz": "c11b544ad540c7d0ef1fc4b09bfa7219d738b214baad0de961ddda011ea88a6d",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-linux-musl.tar.xz": "9fdaf1c1f1fc26bede80b9dbd3c86bb5e9d528a9b94ae9185bad6bb9b56bc7ab",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-netbsd.tar.gz": "809a1a05f2367286e5bc22c2b963cb0c6216af552f7f16ff460776fc87b64147",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-netbsd.tar.xz": "ead16d54ad9b75957396b9294c11289d2580c48e3a270ab45bd7ed4462065767",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-none.tar.gz": "b5791dd97106c645c4d36255fecfcf917c80ecb59d12c06e74f89cd7cdd81ae8",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-none.tar.xz": "15eb3115d973d298a2994bc9ea2c9c34dcc8c220152adc85618a4ef8892db427",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-redox.tar.gz": "afb13c0ed02115605d4f5ffc303365604463ff1a6e63c4f1a8b7c5d7975db2b0",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-redox.tar.xz": "f8b8d606122dbaded0219c332b2c8f440356af559738bfe98072f5cc6460d057",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-uefi.tar.gz": "591a861e52f362b5ccda9cf4bb658cf9731bf03e992de3a7a176ac0d282bcfd5",
+    "dist/2023-04-20/rust-std-beta-x86_64-unknown-uefi.tar.xz": "8017eb935b1fa3fc84bd0f02b30076f4c8317d5a0249461f095336139457a03e",
+    "dist/2023-04-20/rustc-beta-aarch64-apple-darwin.tar.gz": "df30a906559e5fe0ffe481e6c53048e11cded36299dd5e208cf43ca10ccb0c89",
+    "dist/2023-04-20/rustc-beta-aarch64-apple-darwin.tar.xz": "2d5310cff690739cb0ca63b1f8ee91f7cac09a3f3459bc877660b1f29821d4c2",
+    "dist/2023-04-20/rustc-beta-aarch64-pc-windows-msvc.tar.gz": "12cfd51bf114a9d1fda6a4b9853bb77412c55a75b98212758bee39dad0426ea0",
+    "dist/2023-04-20/rustc-beta-aarch64-pc-windows-msvc.tar.xz": "bb638a2efd4a2069d692986a4d5664f9aff3e1b446691b4b119517d339d98145",
+    "dist/2023-04-20/rustc-beta-aarch64-unknown-linux-gnu.tar.gz": "b3f9a0f6ddff10cf023b7ef8cab23663199e0714b9315e339f73a3de7f3064a3",
+    "dist/2023-04-20/rustc-beta-aarch64-unknown-linux-gnu.tar.xz": "f6daeb04ca076a552a7b985f87cf82a85d41c1e293d05d3991987df1924f748a",
+    "dist/2023-04-20/rustc-beta-aarch64-unknown-linux-musl.tar.gz": "4415af9650a37c4f88430679f8647b94bfa731b71355a8bf1144a15c5b0b0944",
+    "dist/2023-04-20/rustc-beta-aarch64-unknown-linux-musl.tar.xz": "2022d75946b1799bd62b17dfe216aca86eaa28528ddc226fcb4e88d82d443ec4",
+    "dist/2023-04-20/rustc-beta-arm-unknown-linux-gnueabi.tar.gz": "7a94b768ecc665c3d9c4d093ed3b8d7912e38246646540ea57b9ef7b013fad92",
+    "dist/2023-04-20/rustc-beta-arm-unknown-linux-gnueabi.tar.xz": "e5ca6d324efc9b1eedb307d3e425c4811d62d46102ea8ddd72c39bf2f3c789ab",
+    "dist/2023-04-20/rustc-beta-arm-unknown-linux-gnueabihf.tar.gz": "94d1602c630a92ffee62e7ab6acc3a3bd9475e90482658e97bbc6e1072f60a87",
+    "dist/2023-04-20/rustc-beta-arm-unknown-linux-gnueabihf.tar.xz": "50c3bd42c30c5d3eb7a79ec0c977736391803a2ca3f00bacf9593899b1dca9fd",
+    "dist/2023-04-20/rustc-beta-armv7-unknown-linux-gnueabihf.tar.gz": "c60a9bcdaabb7c7420740a1e4480c4927277498bed34ffa5578c85bd5158eaab",
+    "dist/2023-04-20/rustc-beta-armv7-unknown-linux-gnueabihf.tar.xz": "a837407a2338986e23479caa752056746f5b6cca4c90f08c0f31eb8aaf8a4c45",
+    "dist/2023-04-20/rustc-beta-i686-pc-windows-gnu.tar.gz": "46eb4e2a617ba1cdb7964a1b5678d977d486883deb13801c7114359c5c73c8db",
+    "dist/2023-04-20/rustc-beta-i686-pc-windows-gnu.tar.xz": "c6f2e7912736e467c99c0a96041c77db1bcbd22b370861dfc599c37a04606456",
+    "dist/2023-04-20/rustc-beta-i686-pc-windows-msvc.tar.gz": "58487cd26b0bd63ff5a55aeafa5263dc9973267a9a1bec0d3d75da5dab83e34d",
+    "dist/2023-04-20/rustc-beta-i686-pc-windows-msvc.tar.xz": "700dacd476ad96ff0d4e3d95700d309eec8d4d6f25fcaa75c096d31890a86f4c",
+    "dist/2023-04-20/rustc-beta-i686-unknown-linux-gnu.tar.gz": "5b1c00b59e65da0d1ef324d8cb7ac2b4d2467d48747aa20013ea32385ae7b110",
+    "dist/2023-04-20/rustc-beta-i686-unknown-linux-gnu.tar.xz": "b9f08288717c10a199847fa8a8881db6150f4bd041b6fe5fc3522bfcce66994b",
+    "dist/2023-04-20/rustc-beta-mips-unknown-linux-gnu.tar.gz": "77c6117d251e2ae8ce7490c2883ce70f93bc82422c727c0440e0a95e1567d1b2",
+    "dist/2023-04-20/rustc-beta-mips-unknown-linux-gnu.tar.xz": "b6e6e946e1e0c23c40f36fb290be44417e6d20cef97b5b52093a127ed4bfdfd9",
+    "dist/2023-04-20/rustc-beta-mips64-unknown-linux-gnuabi64.tar.gz": "808f0678511d2b0028e563d13370978538fa5017886f7f7a6f4aab3cf980cce3",
+    "dist/2023-04-20/rustc-beta-mips64-unknown-linux-gnuabi64.tar.xz": "f57673de409033817dd28ad563ae55af7605ffd6764e08b8ad7edc3ae2a4371a",
+    "dist/2023-04-20/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.gz": "9466f0b8816eb4579186f4bf0dc16c97171767df42779ce227df115ce6dc9555",
+    "dist/2023-04-20/rustc-beta-mips64el-unknown-linux-gnuabi64.tar.xz": "06b768bf4c0c359a10ee937943587a5a37c32335fee3d4276114c4e3f6828ecc",
+    "dist/2023-04-20/rustc-beta-mipsel-unknown-linux-gnu.tar.gz": "f4ff7fc2dadaa65b8777e147e46d176f1b8e1612f060ae5c9547f3ccb3515391",
+    "dist/2023-04-20/rustc-beta-mipsel-unknown-linux-gnu.tar.xz": "21f6553daee7f77d50d70a8b5950de0a4c7c06152637db5eaf42217260f2d79b",
+    "dist/2023-04-20/rustc-beta-powerpc-unknown-linux-gnu.tar.gz": "e8e5a6f5c9ec807f2f4e4c0944244c81896793180614cfd6bb1181d50a70fb3e",
+    "dist/2023-04-20/rustc-beta-powerpc-unknown-linux-gnu.tar.xz": "5de90f98ee29edd5d1d7a2de216571c23ada154d913dd03f218caf8bb23682f9",
+    "dist/2023-04-20/rustc-beta-powerpc64-unknown-linux-gnu.tar.gz": "e91270ea9b83946e7f4d267f8bcff0a3670d070bc87abb1e27c161db832f1965",
+    "dist/2023-04-20/rustc-beta-powerpc64-unknown-linux-gnu.tar.xz": "0ebf2ce2ec6c892be3b010d3d09a46fc0d7a23a77485aa8ab468444fcfc7bb08",
+    "dist/2023-04-20/rustc-beta-powerpc64le-unknown-linux-gnu.tar.gz": "7a40bba3c68766a184507c9a378a1e4ace9745f065d0409519e9fbad57dd48ee",
+    "dist/2023-04-20/rustc-beta-powerpc64le-unknown-linux-gnu.tar.xz": "8b1187e4a089b66e9487b791b4a60850eb57c6c452b8a0c745d24715ac44956e",
+    "dist/2023-04-20/rustc-beta-riscv64gc-unknown-linux-gnu.tar.gz": "550fbced66a230358f8d55b9b204e737bb3bed4bb8ddff844adf598a6b2bc54b",
+    "dist/2023-04-20/rustc-beta-riscv64gc-unknown-linux-gnu.tar.xz": "ba68303e8f056b800884b50f477544ba15374defa88d174174f1a8a8a14a589a",
+    "dist/2023-04-20/rustc-beta-s390x-unknown-linux-gnu.tar.gz": "d734fb85d633662a554bd2c72b7adb36d904951fa9bb48194a092b35b5d36ef7",
+    "dist/2023-04-20/rustc-beta-s390x-unknown-linux-gnu.tar.xz": "ab189b6ac12fde284b4c0357b864dc4846c805a39c9d5a4049799d08323a6820",
+    "dist/2023-04-20/rustc-beta-x86_64-apple-darwin.tar.gz": "b3f56d905276e934772709e270ebbb13faa8301cc92207e061adff917310a370",
+    "dist/2023-04-20/rustc-beta-x86_64-apple-darwin.tar.xz": "190e0e338dd39326ff7835dfd13bf2b53355c5a71f0b63df0e2e822997f7ef6d",
+    "dist/2023-04-20/rustc-beta-x86_64-pc-windows-gnu.tar.gz": "68e286df51faf067bba9c4c10dc6ccd4e6b81d7c2bb1487960f57d9ff18c1e73",
+    "dist/2023-04-20/rustc-beta-x86_64-pc-windows-gnu.tar.xz": "28fd89783bd2023bd4ef052d7ac541772ed39b51f87838806b80ec493f35da10",
+    "dist/2023-04-20/rustc-beta-x86_64-pc-windows-msvc.tar.gz": "0072d99adc95ccb1922137a6060b1aae74142e0a8343fdd459a772502e0a34a7",
+    "dist/2023-04-20/rustc-beta-x86_64-pc-windows-msvc.tar.xz": "32839a7cc46f066681bfa5c8609ddfb473813e7771b363f194d061d8d886c5ba",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-freebsd.tar.gz": "b3b10e6eb7c7ed578418f42058e1d5b287477a1a95a3d1263976c8512ed93ab0",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-freebsd.tar.xz": "6f65d34f49d87a59c82464d6c045f346a6797e2795fb9e31223b09fe64f60c9c",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-illumos.tar.gz": "83a97feaab58ec2997a96f902ac45cb8a0d8d307bc8e3c7a7d2e7a6cbe0df1cb",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-illumos.tar.xz": "18b0611345a6ff33a36d1f19f175dc9b7a8e2fafd9e84ef95fd9978b74e14bb7",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-linux-gnu.tar.gz": "c64fc2556a68c3a775d844478e8ab7f46ada112474d965ebb917ed033cffe48b",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-linux-gnu.tar.xz": "cd24c2150f618aeff6287d99cd8623f55f766db0d7b929b9263666c86a71d2bc",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-linux-musl.tar.gz": "208dec1e29ceea4bd35d54476f9c57228598eaf98bfec823e19386ae476f231d",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-linux-musl.tar.xz": "a205bd7ac479b549c23dc6d50e49c603c93289d8987c2c87fa46a430b7392dd4",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-netbsd.tar.gz": "b55315862eea659a2c4b1c1a832bee5e56ab789ac62618e746a2ba3ddeb13023",
+    "dist/2023-04-20/rustc-beta-x86_64-unknown-netbsd.tar.xz": "f67e17d9d9b98ed126a6b4b3c2dc86048fc96187fd26cb9f1fc5fb5269bdea05",
+    "dist/2023-04-21/rustc-nightly-aarch64-apple-darwin.tar.gz": "b14dc1f1473ea109907787a1886b4c0f89359957dbca6accb3ab6ee1cf1aa64c",
+    "dist/2023-04-21/rustc-nightly-aarch64-apple-darwin.tar.xz": "cd8a5b832c0a54d23f82dcc556bdcb387ea0f761deb2502e7b952923bc0f05fe",
+    "dist/2023-04-21/rustc-nightly-aarch64-pc-windows-msvc.tar.gz": "8b1ac2260179d455896659e04bd282a57db1e43638ea7d305ebdca8007b9a89e",
+    "dist/2023-04-21/rustc-nightly-aarch64-pc-windows-msvc.tar.xz": "748af05581d719e3aab0f0a75391979c9f15f7c0ee37bd8244051b5d00632d32",
+    "dist/2023-04-21/rustc-nightly-aarch64-unknown-linux-gnu.tar.gz": "c60938505082ca3d0d581b2749aa53792b63e9061ae80be0addbdc2367ee07e9",
+    "dist/2023-04-21/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz": "9f0f3f4d332b5d106b4fb45060fe71f9cec973cfed8169d6279644ab5d37cdb7",
+    "dist/2023-04-21/rustc-nightly-aarch64-unknown-linux-musl.tar.gz": "f211b27640ab0b9a2aa6275d3dc4f11749beee4f48ada3df723c27214d0048a0",
+    "dist/2023-04-21/rustc-nightly-aarch64-unknown-linux-musl.tar.xz": "2a4355f91f3a5ee31e41905740541504149ec4045a7b806017d869cf00453d0c",
+    "dist/2023-04-21/rustc-nightly-arm-unknown-linux-gnueabi.tar.gz": "adc2537aeb691226d10d1b306805fe6e9b96461df33854917f33018569968af1",
+    "dist/2023-04-21/rustc-nightly-arm-unknown-linux-gnueabi.tar.xz": "1bac0bfdaf8f538099b7551225ab18754a5457cd89d1805368b3bbb583cbd9f2",
+    "dist/2023-04-21/rustc-nightly-arm-unknown-linux-gnueabihf.tar.gz": "e98227f4396417d72889d1ef9d073cd81668539e24691b2803f877227341a7ee",
+    "dist/2023-04-21/rustc-nightly-arm-unknown-linux-gnueabihf.tar.xz": "e9d6b6e35164da9b2c7adf474178e5263e79acd65a9f020cc3be16d55f5eb511",
+    "dist/2023-04-21/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "4a5917e4bd3eb6210903edbd5551426911141768b6979d59eef53b36c125ad3a",
+    "dist/2023-04-21/rustc-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "dcc87e08210dfaa4629bef68f71464b8b81bbf9e7180d9d385a2c15b06b7f18d",
+    "dist/2023-04-21/rustc-nightly-i686-pc-windows-gnu.tar.gz": "4252bf99e0738dac18e51f0c7f4c3628ead5909222d18b3b7b780b90062aea7b",
+    "dist/2023-04-21/rustc-nightly-i686-pc-windows-gnu.tar.xz": "150824f08e818b6b1485823217056a2d568c803e63c9c753fb11cf93b4de6cf1",
+    "dist/2023-04-21/rustc-nightly-i686-pc-windows-msvc.tar.gz": "73de440b9916a3ce442501dd15239184a11f47e17fb2d7e3943af2c0ccbf9f1f",
+    "dist/2023-04-21/rustc-nightly-i686-pc-windows-msvc.tar.xz": "8fea649215bfffa876143c91ff4fcddfd6c5305bb05d4f8656766fc63c1a19bb",
+    "dist/2023-04-21/rustc-nightly-i686-unknown-linux-gnu.tar.gz": "07484b9e5c9bd6fedf24999fa3350f3efa3e04da99a4bb7d6e51e27b296a1833",
+    "dist/2023-04-21/rustc-nightly-i686-unknown-linux-gnu.tar.xz": "2440021d923189b5bfa789d0714e974707750deedc9dac79da7c41896ceb210c",
+    "dist/2023-04-21/rustc-nightly-mips-unknown-linux-gnu.tar.gz": "2d0b23098bc0cfa680234fb3440908f88a075d91da8a489b8da043dcfdb8d361",
+    "dist/2023-04-21/rustc-nightly-mips-unknown-linux-gnu.tar.xz": "39b47607fc849cbbf80ca89881e7440e00ec2b0af83ec6274dd0d4723f960dad",
+    "dist/2023-04-21/rustc-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "bf7a8a1f9a712604072baea92f8637fc44b8b33796d187a9ef9477d142f0c2a6",
+    "dist/2023-04-21/rustc-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "df760912c668f6b3b23607e97f6dfbeab9d29357293d31becd41d842debe866a",
+    "dist/2023-04-21/rustc-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "4438e9f19f8dccda2be4911e20a99cc4fcd3555282ea40f363d75ac96133b9cf",
+    "dist/2023-04-21/rustc-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "e9085975facdc36f0a133d6e9a6726a4322848b833a72a5bcf54e438685d0a50",
+    "dist/2023-04-21/rustc-nightly-mipsel-unknown-linux-gnu.tar.gz": "8e4ae9bf1ee6743b8783c5412843b587bab9b9bd67d02b2f919e6dcab770e221",
+    "dist/2023-04-21/rustc-nightly-mipsel-unknown-linux-gnu.tar.xz": "af6a21afd7ef9d9735c58bf797a3bd2c6eae41741c37395a81b9238a1f37c1d9",
+    "dist/2023-04-21/rustc-nightly-powerpc-unknown-linux-gnu.tar.gz": "e9ceb40b6d389526b72ca08dbdc035603e307b18b41e070564ee20ae15105cab",
+    "dist/2023-04-21/rustc-nightly-powerpc-unknown-linux-gnu.tar.xz": "7f30002cbd5c81ccebad47cd8129df88391c12a19f44626a0776f8093f420a24",
+    "dist/2023-04-21/rustc-nightly-powerpc64-unknown-linux-gnu.tar.gz": "e710bde14522bd4a24e90e6d274d7293fcf47e29d432910f206bbf024652d073",
+    "dist/2023-04-21/rustc-nightly-powerpc64-unknown-linux-gnu.tar.xz": "47730b4838b7c6e28436174bc5835d966af0a3a9f4f1180e160ca030cd8009d4",
+    "dist/2023-04-21/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "b6c969e1b6393a0749de17b930313df76f64024a5ff68e4a5d7ab182a2c39fd5",
+    "dist/2023-04-21/rustc-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "1530809f81bf2805415980148678a12f680909d439ac440157c6ba5df64e0d7c",
+    "dist/2023-04-21/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "690a283c9a3db2b3234aa5fc7828df2ce2901fdd72db10b35e8234c3df8520f8",
+    "dist/2023-04-21/rustc-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "531f4ba41edd1de2b27ee8798a5e8f5e3b5fc1488d743e5020d29834cccae273",
+    "dist/2023-04-21/rustc-nightly-s390x-unknown-linux-gnu.tar.gz": "ad454aa9437687fae9617f84d921489ce2ea8e61e5c2e50b3ec13ca026c0d515",
+    "dist/2023-04-21/rustc-nightly-s390x-unknown-linux-gnu.tar.xz": "9cc9a96848519c8c80cd44d14760e49b0b92cfaa851db55c5b1c7f7bf9fd95d5",
+    "dist/2023-04-21/rustc-nightly-x86_64-apple-darwin.tar.gz": "1c4ed2e08ee181cd9d28fbd0cc4b5c0c73d8e6a377c5ab6b4849e0ad8182a729",
+    "dist/2023-04-21/rustc-nightly-x86_64-apple-darwin.tar.xz": "25efab0032ce61d70abeb9f3053a089f827ba693c0502df2225939e8f77184a2",
+    "dist/2023-04-21/rustc-nightly-x86_64-pc-windows-gnu.tar.gz": "bec16f18e79a32f304c17811baf64ac1a8149a15504c7bb5f3d198cfe09db6bc",
+    "dist/2023-04-21/rustc-nightly-x86_64-pc-windows-gnu.tar.xz": "709fce3891b9688a05d7e7dfbb9cfef15ad6461ce54923e06b2dbbcf87ab9b57",
+    "dist/2023-04-21/rustc-nightly-x86_64-pc-windows-msvc.tar.gz": "15704e62bad40fcec9a14bda6f6d11419970f1d050aedbf4157f1f26cbec45cc",
+    "dist/2023-04-21/rustc-nightly-x86_64-pc-windows-msvc.tar.xz": "7f5f8fd10c2068a7d1bff3ee9bef92dbe9a11638b7546ebb8864058b7d1efdaa",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-freebsd.tar.gz": "1302219d277d6625b0bde7768e78f2dd285d47a8de928eb2c767b4b9e20f11ed",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-freebsd.tar.xz": "51311fc67fd86ca7baa0601ac2f1d53a4dc4671132c190dd305f96d6bec47a40",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-illumos.tar.gz": "2409082de839f235c9dc1b8366b1060356f708be2476e72aa3a911abd9b46542",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-illumos.tar.xz": "98c6da8aa7783d3b078240133d0446b99277a5721ef8ec94bb56735fc444eba1",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-linux-gnu.tar.gz": "7703bfcbaa7dbd99175101fc5a9c99556fdd556b77f107c3c0e89aa5c78e2479",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "30704ed5b752bf574e3b149056f033ff2bf96f6841810c2adebc5c5e52593002",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-linux-musl.tar.gz": "d46394234d911737ff913dddc4697d352e291dd8f9b9e39a1ff92e0a6292a0cc",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-linux-musl.tar.xz": "d6a8a6bbdd8fc0e97f455bd7df71c1bc5ea0230b7894af5beff2e76880fef1bb",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-netbsd.tar.gz": "701fd848e1529d39bd2d0b0aab40b20d2259e9f57dc40f4bf77c1d45bd894d25",
+    "dist/2023-04-21/rustc-nightly-x86_64-unknown-netbsd.tar.xz": "ec6bea58a1b0788391ea57107d3c78734328c47f5b91edb92996d64a8b5f8bc8",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-apple-darwin.tar.gz": "66dd75310abe0112d3ef75345a0f3054ff936ea7098a040d20cb8968b7d1b2dc",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-apple-darwin.tar.xz": "705d9dc8548dc84ba9c69bf5935860658ae501cf577584610974b4448ba7588f",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-pc-windows-msvc.tar.gz": "b4d2541fbc41a5b9fbfb6bbe8a869eb8794d658ad100fe402c4c3ceea12cc824",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-pc-windows-msvc.tar.xz": "d16338308c83de20b9f86e56c83f9601fb3ce3b7f9be26d9210f401319786ee2",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz": "b8300c62cbf2136b86fab4ba1357ede3b4be997262844bae7cf1694b250a75f5",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz": "6979a86d568e58fa1295fefe71007d374a2975ab10773af7a2f2876ad2f2773b",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-unknown-linux-musl.tar.gz": "74ef4daacace0d036148f5dad87e759441925b1882da2bd6fa2f8628a290edc3",
+    "dist/2023-04-21/rustfmt-nightly-aarch64-unknown-linux-musl.tar.xz": "6a35624795fc157d7587bf4606698c471ce82c2f12269741cf5d414e91ee4b6e",
+    "dist/2023-04-21/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.gz": "7d4914fffa7ceb97c8e16969c9f2072decadaedea658bd51d6590a6caf2b53c2",
+    "dist/2023-04-21/rustfmt-nightly-arm-unknown-linux-gnueabi.tar.xz": "5df0c332bd3760c4da08d4cd330e3f2fc865f9f0b11b54fd7c7c41fc56f582ce",
+    "dist/2023-04-21/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.gz": "2ab4f71ff23e68923e24ce906f387bc1b6c00f07e1ed13492516c14b652936f2",
+    "dist/2023-04-21/rustfmt-nightly-arm-unknown-linux-gnueabihf.tar.xz": "bef7cb9b4dd0bdfbba20afe603d60aa37df77ba6aa8e179a27a0a46ce9febe9c",
+    "dist/2023-04-21/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.gz": "adbf12810a829d35e85811d5fb715012434d99d42f88340ae61a9141bec9ba95",
+    "dist/2023-04-21/rustfmt-nightly-armv7-unknown-linux-gnueabihf.tar.xz": "242205fe65d10548b69a7520b33ab6584248817454f19c3da1328044c43c2260",
+    "dist/2023-04-21/rustfmt-nightly-i686-pc-windows-gnu.tar.gz": "2e720a30089b192f4bad517600544c9085a5b8ff0a3afcf7d1b1a8149eba5af1",
+    "dist/2023-04-21/rustfmt-nightly-i686-pc-windows-gnu.tar.xz": "7a2c5a01cb6a47d86ef02d3bbbc2b7d5b1f2eef68cd4aee00f3566accfc429e2",
+    "dist/2023-04-21/rustfmt-nightly-i686-pc-windows-msvc.tar.gz": "f7e1d6cbf83508a0e3c06090fe80ab314299d2ac24be0f8e3e5658177e270a0d",
+    "dist/2023-04-21/rustfmt-nightly-i686-pc-windows-msvc.tar.xz": "630bbe6d526774effd0602ec17eac0d4b5d00e67402fb189f282416dc614a3a2",
+    "dist/2023-04-21/rustfmt-nightly-i686-unknown-linux-gnu.tar.gz": "47e2b997cd75a8e1efd67bed1f0a3e3255cedffb542bc8eb3da695cc819d5684",
+    "dist/2023-04-21/rustfmt-nightly-i686-unknown-linux-gnu.tar.xz": "71c07ca9546a8e404da5e2024374876e3f282aac54f04076c26dd4f3f53d79e8",
+    "dist/2023-04-21/rustfmt-nightly-mips-unknown-linux-gnu.tar.gz": "2131b14553e7f3cc276410a6e3e3fe309a12a65ce8dc287b2bc543d1c1769122",
+    "dist/2023-04-21/rustfmt-nightly-mips-unknown-linux-gnu.tar.xz": "8ad25a066126b1b0485cbae336f0350c6b46e4463fbc9593916c495875b5f3e9",
+    "dist/2023-04-21/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.gz": "a5231553b80b57703988099f4c466a60e4b8d13cae9e8e25a3acfb5c59e3d493",
+    "dist/2023-04-21/rustfmt-nightly-mips64-unknown-linux-gnuabi64.tar.xz": "7da93b04275989b6917e5538d0f2591ecce0c87bf78c4fa79ec24b262fcede12",
+    "dist/2023-04-21/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.gz": "ff173fb7a5b2884963890c4a5728c3766d89d6d68e823d9d0f026e4b47c04adb",
+    "dist/2023-04-21/rustfmt-nightly-mips64el-unknown-linux-gnuabi64.tar.xz": "23f0af9943a0d5f97e61258e5f75b6a0542a9c6ccc9919f083e3d331c154b55e",
+    "dist/2023-04-21/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.gz": "b6610919e1f96cd101d1170541b9ffec0a5e617760cd1ff221e1aa163bbe96d3",
+    "dist/2023-04-21/rustfmt-nightly-mipsel-unknown-linux-gnu.tar.xz": "6f17563141a1153b5b2e489925336ef2d52fb3db66a081f818e475ce03a8fbce",
+    "dist/2023-04-21/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.gz": "9596395db964723ad81b790b6ab8cde64584dc6fc672bea5a0f77388457d385c",
+    "dist/2023-04-21/rustfmt-nightly-powerpc-unknown-linux-gnu.tar.xz": "eb0175964c23b792a20e4d7e086d97a857842982a41f9500462851203c9ce54e",
+    "dist/2023-04-21/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.gz": "5681022c372dd95afe8751b0eb1a4085d2b47163c4858744f80381d47ee113fb",
+    "dist/2023-04-21/rustfmt-nightly-powerpc64-unknown-linux-gnu.tar.xz": "cd3b6d0d9510eb99e7cbaeb8e947ead7f1a8456dae4e7b727c08b3b4510bda4c",
+    "dist/2023-04-21/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.gz": "8e6329116e796f8f26921ced59ff28040f23773b0b9db8b2ac8519c779703c23",
+    "dist/2023-04-21/rustfmt-nightly-powerpc64le-unknown-linux-gnu.tar.xz": "7850600a2ef836e47b0a3fdc33e8d6f804a522db01dc5c40d5c1f59198065d07",
+    "dist/2023-04-21/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.gz": "f8b54967642fbb715160497e7ea7dd5ecdb0d4f8583011ddb590e39ea96ef0df",
+    "dist/2023-04-21/rustfmt-nightly-riscv64gc-unknown-linux-gnu.tar.xz": "f47b04ad9fc80f29100b56906754a17f1d6afa97942cdfb764269ea68e437592",
+    "dist/2023-04-21/rustfmt-nightly-s390x-unknown-linux-gnu.tar.gz": "5233106943cfc8f6665f800cf947415a429154ac8a3f5833cacb83b052cc9888",
+    "dist/2023-04-21/rustfmt-nightly-s390x-unknown-linux-gnu.tar.xz": "bc3a67a351897778a97eaa513b4dea9644ddee0bf76925c95fd9bbc3f3da368b",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-apple-darwin.tar.gz": "b8ddbb26d9422d65bdd5e81dae4b2fda27c3f47b12d6bf87e37bc2a5fd3d35e0",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-apple-darwin.tar.xz": "ded34445ffe8efb8255b61bca618a8a09db5ed95e54e02267796e41b221914bc",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-pc-windows-gnu.tar.gz": "7c37ca08a4cf3495d0850acaaa69c79064501fe5e626c909cdb0cb936bc5f84f",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-pc-windows-gnu.tar.xz": "fe2cbdf088b2738bacf75ccaaf9761b85f633c8fe56823bd05fd0e53570a58e9",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-pc-windows-msvc.tar.gz": "cc1a68fb4322cd1336349abb5d1528dcf5c8e0113895f5fa6467d8f9c040c58f",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-pc-windows-msvc.tar.xz": "e21f7c6f3bf939e066b8c2bae6eb8a26cfe124422e895b54d051e3013d8a1b89",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-freebsd.tar.gz": "638cd63bbec1312df98ce8e5b375b0ff1cf3256b8ef085e169639706f75f7f72",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-freebsd.tar.xz": "b615bcb14ba429fbb38cbe09f62bdad058dfb783055f067ceee58dd0799252aa",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-illumos.tar.gz": "1797efad43a1a4bd63885e8b3a3e713ab7f971d8146f80a9b5ee72314e2c7fee",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-illumos.tar.xz": "873cc18bb54a7db47763b88b91715360febf419302fd29fca2294073b09ae29f",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.gz": "3087b49def00930fcc4abea6391d4ded3e6fac8e66ac5275d58a3717bcbccc29",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz": "4a71c0720700ac94e1e7ec40ed0eb27cba60bab6f13b7b28bfdd15935c0bf639",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-linux-musl.tar.gz": "eef5d412db6fd9535a109ad9575bb6d1428cf4bb56130d6c97332d5a56f9b504",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-linux-musl.tar.xz": "453a0dcaf90ffb33af0e7994d317932e897980307897794d1143078c208dd42b",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-netbsd.tar.gz": "383a6196c67352f5fd6efad5dcd41cc325cef547baa2bf1376138cd628e1f16f",
+    "dist/2023-04-21/rustfmt-nightly-x86_64-unknown-netbsd.tar.xz": "1c33e794c88b4740ddb5c7a1354f19471fe719b21402e67ca205cfbad6aa9f6f"
   }
 }
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index 7166d99d792..9059a145b43 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -422,19 +422,11 @@ pub struct TargetCfgs {
 
 impl TargetCfgs {
     fn new(config: &Config) -> TargetCfgs {
-        let targets: HashMap<String, TargetCfg> = if config.stage_id.starts_with("stage0-")
-            || (config.suite == "ui-fulldeps" && config.stage_id.starts_with("stage1-"))
-        {
-            // #[cfg(bootstrap)]
-            // Needed only for one cycle, remove during the bootstrap bump.
-            Self::collect_all_slow(config)
-        } else {
-            serde_json::from_str(&rustc_output(
-                config,
-                &["--print=all-target-specs-json", "-Zunstable-options"],
-            ))
-            .unwrap()
-        };
+        let targets: HashMap<String, TargetCfg> = serde_json::from_str(&rustc_output(
+            config,
+            &["--print=all-target-specs-json", "-Zunstable-options"],
+        ))
+        .unwrap();
 
         let mut current = None;
         let mut all_targets = HashSet::new();
@@ -475,25 +467,6 @@ impl TargetCfgs {
             all_pointer_widths,
         }
     }
-
-    // #[cfg(bootstrap)]
-    // Needed only for one cycle, remove during the bootstrap bump.
-    fn collect_all_slow(config: &Config) -> HashMap<String, TargetCfg> {
-        let mut result = HashMap::new();
-        for target in rustc_output(config, &["--print=target-list"]).trim().lines() {
-            let json = rustc_output(
-                config,
-                &["--print=target-spec-json", "-Zunstable-options", "--target", target],
-            );
-            match serde_json::from_str(&json) {
-                Ok(res) => {
-                    result.insert(target.into(), res);
-                }
-                Err(err) => panic!("failed to parse target spec for {target}: {err}"),
-            }
-        }
-        result
-    }
 }
 
 #[derive(Clone, Debug, serde::Deserialize)]
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index ccce62bd5b0..8cc935e54d1 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -90,6 +90,9 @@ pub struct TestProps {
     pub unset_rustc_env: Vec<String>,
     // Environment settings to use during execution
     pub exec_env: Vec<(String, String)>,
+    // Environment variables to unset prior to execution.
+    // Variables are unset before applying 'exec_env'
+    pub unset_exec_env: Vec<String>,
     // Build documentation for all specified aux-builds as well
     pub build_aux_docs: bool,
     // Flag to force a crate to be built with the host architecture
@@ -198,6 +201,7 @@ mod directives {
     pub const AUX_CRATE: &'static str = "aux-crate";
     pub const EXEC_ENV: &'static str = "exec-env";
     pub const RUSTC_ENV: &'static str = "rustc-env";
+    pub const UNSET_EXEC_ENV: &'static str = "unset-exec-env";
     pub const UNSET_RUSTC_ENV: &'static str = "unset-rustc-env";
     pub const FORBID_OUTPUT: &'static str = "forbid-output";
     pub const CHECK_TEST_LINE_NUMBERS_MATCH: &'static str = "check-test-line-numbers-match";
@@ -231,6 +235,7 @@ impl TestProps {
             rustc_env: vec![],
             unset_rustc_env: vec![],
             exec_env: vec![],
+            unset_exec_env: vec![],
             build_aux_docs: false,
             force_host: false,
             check_stdout: false,
@@ -384,6 +389,12 @@ impl TestProps {
                 );
                 config.push_name_value_directive(
                     ln,
+                    UNSET_EXEC_ENV,
+                    &mut self.unset_exec_env,
+                    |r| r,
+                );
+                config.push_name_value_directive(
+                    ln,
                     RUSTC_ENV,
                     &mut self.rustc_env,
                     Config::parse_env,
@@ -943,15 +954,10 @@ pub fn make_test_description<R: Read>(
         name,
         ignore,
         ignore_message,
-        #[cfg(not(bootstrap))]
         source_file: "",
-        #[cfg(not(bootstrap))]
         start_line: 0,
-        #[cfg(not(bootstrap))]
         start_col: 0,
-        #[cfg(not(bootstrap))]
         end_line: 0,
-        #[cfg(not(bootstrap))]
         end_col: 0,
         should_panic,
         compile_fail: false,
diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs
index a9694d4d52c..86a749b935d 100644
--- a/src/tools/compiletest/src/header/cfg.rs
+++ b/src/tools/compiletest/src/header/cfg.rs
@@ -165,11 +165,15 @@ pub(super) fn parse_cfg_name_directive<'a>(
         message: "when the architecture is part of the Thumb family"
     }
 
+    // Technically the locally built compiler uses the "dev" channel rather than the "nightly"
+    // channel, even though most people don't know or won't care about it. To avoid confusion, we
+    // treat the "dev" channel as the "nightly" channel when processing the directive.
     condition! {
-        name: &config.channel,
+        name: if config.channel == "dev" { "nightly" } else { &config.channel },
         allowed_names: &["stable", "beta", "nightly"],
         message: "when the release channel is {name}",
     }
+
     condition! {
         name: "cross-compile",
         condition: config.target != config.host,
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index f6597c72938..0fd9f3ae3f4 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -224,6 +224,7 @@ enum Emit {
     Metadata,
     LlvmIr,
     Asm,
+    LinkArgsAsm,
 }
 
 impl<'test> TestCx<'test> {
@@ -1613,8 +1614,13 @@ impl<'test> TestCx<'test> {
                 test_client
                     .args(&["run", &support_libs.len().to_string(), &prog])
                     .args(support_libs)
-                    .args(args)
-                    .envs(env.clone());
+                    .args(args);
+
+                for key in &self.props.unset_exec_env {
+                    test_client.env_remove(key);
+                }
+                test_client.envs(env.clone());
+
                 self.compose_and_run(
                     test_client,
                     self.config.run_lib_path.to_str().unwrap(),
@@ -1626,7 +1632,13 @@ impl<'test> TestCx<'test> {
                 let aux_dir = self.aux_output_dir_name();
                 let ProcArgs { prog, args } = self.make_run_args();
                 let mut wr_run = Command::new("wr-run");
-                wr_run.args(&[&prog]).args(args).envs(env.clone());
+                wr_run.args(&[&prog]).args(args);
+
+                for key in &self.props.unset_exec_env {
+                    wr_run.env_remove(key);
+                }
+                wr_run.envs(env.clone());
+
                 self.compose_and_run(
                     wr_run,
                     self.config.run_lib_path.to_str().unwrap(),
@@ -1638,7 +1650,13 @@ impl<'test> TestCx<'test> {
                 let aux_dir = self.aux_output_dir_name();
                 let ProcArgs { prog, args } = self.make_run_args();
                 let mut program = Command::new(&prog);
-                program.args(args).current_dir(&self.output_base_dir()).envs(env.clone());
+                program.args(args).current_dir(&self.output_base_dir());
+
+                for key in &self.props.unset_exec_env {
+                    program.env_remove(key);
+                }
+                program.envs(env.clone());
+
                 self.compose_and_run(
                     program,
                     self.config.run_lib_path.to_str().unwrap(),
@@ -2035,6 +2053,9 @@ impl<'test> TestCx<'test> {
             Emit::Asm => {
                 rustc.args(&["--emit", "asm"]);
             }
+            Emit::LinkArgsAsm => {
+                rustc.args(&["-Clink-args=--emit=asm"]);
+            }
         }
 
         if !is_rustdoc {
@@ -2328,11 +2349,15 @@ impl<'test> TestCx<'test> {
                 emit = Emit::Asm;
             }
 
+            Some("bpf-linker") => {
+                emit = Emit::LinkArgsAsm;
+            }
+
             Some("ptx-linker") => {
                 // No extra flags needed.
             }
 
-            Some(_) => self.fatal("unknown 'assembly-output' header"),
+            Some(header) => self.fatal(&format!("unknown 'assembly-output' header: {header}")),
             None => self.fatal("missing 'assembly-output' header"),
         }
 
diff --git a/src/tools/miri/src/operator.rs b/src/tools/miri/src/operator.rs
index 79d5dfb5551..368aa2bacdc 100644
--- a/src/tools/miri/src/operator.rs
+++ b/src/tools/miri/src/operator.rs
@@ -53,17 +53,6 @@ impl<'mir, 'tcx> EvalContextExt<'tcx> for super::MiriInterpCx<'mir, 'tcx> {
                 (Scalar::from_bool(res), false, self.tcx.types.bool)
             }
 
-            Offset => {
-                assert!(left.layout.ty.is_unsafe_ptr());
-                let ptr = left.to_scalar().to_pointer(self)?;
-                let offset = right.to_scalar().to_target_isize(self)?;
-
-                let pointee_ty =
-                    left.layout.ty.builtin_deref(true).expect("Offset called on non-ptr type").ty;
-                let ptr = self.ptr_offset_inbounds(ptr, pointee_ty, offset)?;
-                (Scalar::from_maybe_pointer(ptr, self), false, left.layout.ty)
-            }
-
             // Some more operations are possible with atomics.
             // The return value always has the provenance of the *left* operand.
             Add | Sub | BitOr | BitAnd | BitXor => {
diff --git a/src/tools/miri/tests/fail/panic/double_panic.stderr b/src/tools/miri/tests/fail/panic/double_panic.stderr
index 6bf13f21601..f04dfab36ca 100644
--- a/src/tools/miri/tests/fail/panic/double_panic.stderr
+++ b/src/tools/miri/tests/fail/panic/double_panic.stderr
@@ -12,57 +12,59 @@ stack backtrace:
  at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
    4: <std::sys_common::backtrace::_print::DisplayBacktrace as std::fmt::Display>::fmt
  at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
-   5: std::fmt::write
+   5: core::fmt::rt::Argument::fmt
+ at RUSTLIB/core/src/fmt/rt.rs:LL:CC
+   6: std::fmt::write
  at RUSTLIB/core/src/fmt/mod.rs:LL:CC
-   6: <std::sys::PLATFORM::stdio::Stderr as std::io::Write>::write_fmt
+   7: <std::sys::PLATFORM::stdio::Stderr as std::io::Write>::write_fmt
  at RUSTLIB/std/src/io/mod.rs:LL:CC
-   7: std::sys_common::backtrace::_print
+   8: std::sys_common::backtrace::_print
  at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
-   8: std::sys_common::backtrace::print
+   9: std::sys_common::backtrace::print
  at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
-   9: std::panicking::default_hook::{closure#1}
+  10: std::panicking::default_hook::{closure#1}
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  10: std::panicking::default_hook
+  11: std::panicking::default_hook
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  11: std::panicking::rust_panic_with_hook
+  12: std::panicking::rust_panic_with_hook
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  12: std::rt::begin_panic::{closure#0}
+  13: std::rt::begin_panic::{closure#0}
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  13: std::sys_common::backtrace::__rust_end_short_backtrace
+  14: std::sys_common::backtrace::__rust_end_short_backtrace
  at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
-  14: std::rt::begin_panic
+  15: std::rt::begin_panic
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  15: <Foo as std::ops::Drop>::drop
+  16: <Foo as std::ops::Drop>::drop
  at $DIR/double_panic.rs:LL:CC
-  16: std::ptr::drop_in_place - shim(Some(Foo))
+  17: std::ptr::drop_in_place - shim(Some(Foo))
  at RUSTLIB/core/src/ptr/mod.rs:LL:CC
-  17: main
+  18: main
  at $DIR/double_panic.rs:LL:CC
-  18: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
+  19: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
  at RUSTLIB/core/src/ops/function.rs:LL:CC
-  19: std::sys_common::backtrace::__rust_begin_short_backtrace
+  20: std::sys_common::backtrace::__rust_begin_short_backtrace
  at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
-  20: std::rt::lang_start::{closure#0}
+  21: std::rt::lang_start::{closure#0}
  at RUSTLIB/std/src/rt.rs:LL:CC
-  21: std::ops::function::impls::call_once
+  22: std::ops::function::impls::call_once
  at RUSTLIB/core/src/ops/function.rs:LL:CC
-  22: std::panicking::r#try::do_call
+  23: std::panicking::r#try::do_call
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  23: std::panicking::r#try
+  24: std::panicking::r#try
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  24: std::panic::catch_unwind
+  25: std::panic::catch_unwind
  at RUSTLIB/std/src/panic.rs:LL:CC
-  25: std::rt::lang_start_internal::{closure#2}
+  26: std::rt::lang_start_internal::{closure#2}
  at RUSTLIB/std/src/rt.rs:LL:CC
-  26: std::panicking::r#try::do_call
+  27: std::panicking::r#try::do_call
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  27: std::panicking::r#try
+  28: std::panicking::r#try
  at RUSTLIB/std/src/panicking.rs:LL:CC
-  28: std::panic::catch_unwind
+  29: std::panic::catch_unwind
  at RUSTLIB/std/src/panic.rs:LL:CC
-  29: std::rt::lang_start_internal
+  30: std::rt::lang_start_internal
  at RUSTLIB/std/src/rt.rs:LL:CC
-  30: std::rt::lang_start
+  31: std::rt::lang_start
  at RUSTLIB/std/src/rt.rs:LL:CC
 thread panicked while panicking. aborting.
 error: abnormal termination: the program aborted execution
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs b/src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs
index 0b72ca1eec1..5fbd1789b3a 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs
@@ -201,7 +201,7 @@ macro_rules! format_args {
 }
 
 fn main() {
-    $crate::fmt::Arguments::new_v1(&[], &[$crate::fmt::ArgumentV1::new(&(arg1(a, b, c)), $crate::fmt::Display::fmt), $crate::fmt::ArgumentV1::new(&(arg2), $crate::fmt::Display::fmt), ]);
+    $crate::fmt::Arguments::new_v1(&[], &[$crate::fmt::Argument::new(&(arg1(a, b, c)), $crate::fmt::Display::fmt), $crate::fmt::Argument::new(&(arg2), $crate::fmt::Display::fmt), ]);
 }
 "#]],
     );
@@ -229,7 +229,7 @@ macro_rules! format_args {
 }
 
 fn main() {
-    $crate::fmt::Arguments::new_v1(&[], &[$crate::fmt::ArgumentV1::new(&(a::<A, B>()), $crate::fmt::Display::fmt), $crate::fmt::ArgumentV1::new(&(b), $crate::fmt::Display::fmt), ]);
+    $crate::fmt::Arguments::new_v1(&[], &[$crate::fmt::Argument::new(&(a::<A, B>()), $crate::fmt::Display::fmt), $crate::fmt::Argument::new(&(b), $crate::fmt::Display::fmt), ]);
 }
 "#]],
     );
@@ -260,7 +260,7 @@ macro_rules! format_args {
 fn main() {
     let _ =
         /* parse error: expected field name or number */
-$crate::fmt::Arguments::new_v1(&[], &[$crate::fmt::ArgumentV1::new(&(a.), $crate::fmt::Display::fmt), ]);
+$crate::fmt::Arguments::new_v1(&[], &[$crate::fmt::Argument::new(&(a.), $crate::fmt::Display::fmt), ]);
 }
 "#]],
     );
diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/builtin_fn_macro.rs b/src/tools/rust-analyzer/crates/hir-expand/src/builtin_fn_macro.rs
index 44510f2b7ff..a9c5e1488aa 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/src/builtin_fn_macro.rs
+++ b/src/tools/rust-analyzer/crates/hir-expand/src/builtin_fn_macro.rs
@@ -241,8 +241,8 @@ fn format_args_expand(
     // We expand `format_args!("", a1, a2)` to
     // ```
     // $crate::fmt::Arguments::new_v1(&[], &[
-    //   $crate::fmt::ArgumentV1::new(&arg1,$crate::fmt::Display::fmt),
-    //   $crate::fmt::ArgumentV1::new(&arg2,$crate::fmt::Display::fmt),
+    //   $crate::fmt::Argument::new(&arg1,$crate::fmt::Display::fmt),
+    //   $crate::fmt::Argument::new(&arg2,$crate::fmt::Display::fmt),
     // ])
     // ```,
     // which is still not really correct, but close enough for now
@@ -267,7 +267,7 @@ fn format_args_expand(
     }
     let _format_string = args.remove(0);
     let arg_tts = args.into_iter().flat_map(|arg| {
-        quote! { #DOLLAR_CRATE::fmt::ArgumentV1::new(&(#arg), #DOLLAR_CRATE::fmt::Display::fmt), }
+        quote! { #DOLLAR_CRATE::fmt::Argument::new(&(#arg), #DOLLAR_CRATE::fmt::Display::fmt), }
     }.token_trees);
     let expanded = quote! {
         #DOLLAR_CRATE::fmt::Arguments::new_v1(&[], &[##arg_tts])
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index 411cbc760e0..baef4bb0140 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -283,7 +283,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
 const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[
     "ahash",
     "anyhow",
-    "arrayvec",
     "autocfg",
     "bumpalo",
     "bitflags",
@@ -303,7 +302,6 @@ const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[
     "crc32fast",
     "fallible-iterator",
     "fxhash",
-    "getrandom",
     "gimli",
     "hashbrown",
     "indexmap",
@@ -321,19 +319,11 @@ const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[
     "stable_deref_trait",
     "target-lexicon",
     "version_check",
-    "wasi",
     "wasmtime-jit-icache-coherence",
     "winapi",
     "winapi-i686-pc-windows-gnu",
     "winapi-x86_64-pc-windows-gnu",
     "windows-sys",
-    "windows_aarch64_gnullvm",
-    "windows_aarch64_msvc",
-    "windows_i686_gnu",
-    "windows_i686_msvc",
-    "windows_x86_64_gnu",
-    "windows_x86_64_gnullvm",
-    "windows_x86_64_msvc",
 ];
 
 /// Dependency checks.
diff --git a/tests/codegen/intrinsics/offset.rs b/tests/codegen/intrinsics/offset.rs
new file mode 100644
index 00000000000..7fc4f4498d6
--- /dev/null
+++ b/tests/codegen/intrinsics/offset.rs
@@ -0,0 +1,34 @@
+// compile-flags: -O -C no-prepopulate-passes
+// min-llvm-version: 15.0 (because we're using opaque pointers)
+
+#![crate_type = "lib"]
+#![feature(core_intrinsics)]
+
+use std::intrinsics::offset;
+
+// CHECK-LABEL: ptr @offset_zst
+// CHECK-SAME: (ptr noundef %p, [[SIZE:i[0-9]+]] noundef %d)
+#[no_mangle]
+pub unsafe fn offset_zst(p: *const (), d: usize) -> *const () {
+    // CHECK-NOT: getelementptr
+    // CHECK: ret ptr %p
+    offset(p, d)
+}
+
+// CHECK-LABEL: ptr @offset_isize
+// CHECK-SAME: (ptr noundef %p, [[SIZE]] noundef %d)
+#[no_mangle]
+pub unsafe fn offset_isize(p: *const u32, d: isize) -> *const u32 {
+    // CHECK: %[[R:.*]] = getelementptr inbounds i32, ptr %p, [[SIZE]] %d
+    // CHECK-NEXT: ret ptr %[[R]]
+    offset(p, d)
+}
+
+// CHECK-LABEL: ptr @offset_usize
+// CHECK-SAME: (ptr noundef %p, [[SIZE]] noundef %d)
+#[no_mangle]
+pub unsafe fn offset_usize(p: *const u64, d: usize) -> *const u64 {
+    // CHECK: %[[R:.*]] = getelementptr inbounds i64, ptr %p, [[SIZE]] %d
+    // CHECK-NEXT: ret ptr %[[R]]
+    offset(p, d)
+}
diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs
index f19d7031bb3..da64692d27d 100644
--- a/tests/codegen/issues/issue-103840.rs
+++ b/tests/codegen/issues/issue-103840.rs
@@ -1,4 +1,5 @@
 // compile-flags: -O
+// min-llvm-version: 16.0
 #![crate_type = "lib"]
 
 pub fn foo(t: &mut Vec<usize>) {
diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
index d54ac9e33bc..2ee4d7cca0e 100644
--- a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
+++ b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
@@ -19,4 +19,5 @@ pub fn outer_function(x: S, y: S) -> usize {
 // CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"[closure@{{.*.rs}}:9:23: 9:25]", ptr [[spill]]
 // CHECK-NOT: [[load:%.*]] = load ptr, ptr
 // CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]])
-// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[spill]], ptr {{align .*}} %x
+// CHECK: [[inner:%.*]] = getelementptr inbounds %"{{.*}}", ptr [[spill]]
+// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[inner]], ptr {{align .*}} %x
diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs
index 9ccbcb24f56..c0be7fab2f3 100644
--- a/tests/codegen/issues/issue-86106.rs
+++ b/tests/codegen/issues/issue-86106.rs
@@ -1,4 +1,5 @@
 // min-llvm-version: 15.0
+// only-64bit llvm appears to use stores instead of memset on 32bit
 // compile-flags: -C opt-level=3 -Z merge-functions=disabled
 
 // The below two functions ensure that both `String::new()` and `"".to_string()`
@@ -9,12 +10,9 @@
 // CHECK-LABEL: define void @string_new
 #[no_mangle]
 pub fn string_new() -> String {
-    // CHECK-NOT: load i8
-    // CHECK: store i{{32|64}}
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     String::new()
 }
@@ -22,12 +20,9 @@ pub fn string_new() -> String {
 // CHECK-LABEL: define void @empty_to_string
 #[no_mangle]
 pub fn empty_to_string() -> String {
-    // CHECK-NOT: load i8
-    // CHECK: store i{{32|64}}
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     "".to_string()
 }
@@ -38,12 +33,9 @@ pub fn empty_to_string() -> String {
 // CHECK-LABEL: @empty_vec
 #[no_mangle]
 pub fn empty_vec() -> Vec<u8> {
-    // CHECK: store i{{32|64}}
-    // CHECK-NOT: load i8
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     vec![]
 }
@@ -51,12 +43,9 @@ pub fn empty_vec() -> Vec<u8> {
 // CHECK-LABEL: @empty_vec_clone
 #[no_mangle]
 pub fn empty_vec_clone() -> Vec<u8> {
-    // CHECK: store i{{32|64}}
-    // CHECK-NOT: load i8
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     vec![].clone()
 }
diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs
index 388d50c5cdc..e7e83c7aacd 100644
--- a/tests/debuginfo/thread.rs
+++ b/tests/debuginfo/thread.rs
@@ -1,4 +1,4 @@
-// Testing the the display of JoinHandle and Thread in cdb.
+// Testing the display of JoinHandle and Thread in cdb.
 
 // cdb-only
 // min-cdb-version: 10.0.18317.1001
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
index 7cce3415fa1..9bced25a595 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
@@ -12,7 +12,7 @@
         _1: GeneratorSavedTy {
             ty: impl std::future::Future<Output = ()>,
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:16:8: 16:14 (#11),
+                span: $DIR/async_await.rs:16:8: 16:14 (#10),
                 scope: scope[0],
             },
             ignore_for_traits: false,
diff --git a/tests/mir-opt/issue_41888.main.ElaborateDrops.diff b/tests/mir-opt/issue_41888.main.ElaborateDrops.diff
index d98f75e7502..46b450a4e47 100644
--- a/tests/mir-opt/issue_41888.main.ElaborateDrops.diff
+++ b/tests/mir-opt/issue_41888.main.ElaborateDrops.diff
@@ -22,9 +22,9 @@
       }
   
       bb0: {
-+         _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
 +         _7 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
 +         _8 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
++         _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
           StorageLive(_1);                 // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
           StorageLive(_2);                 // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
           _2 = cond() -> [return: bb1, unwind: bb11]; // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
index cc5079af7f4..93863fca344 100644
--- a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
+++ b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
@@ -24,7 +24,7 @@
           _4 = &raw const (*_1);           // scope 1 at $DIR/lower_intrinsics.rs:+2:55: +2:56
 -         _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
 -                                          // mir::Constant
--                                          // + span: $DIR/lower_intrinsics.rs:133:18: 133:54
+-                                          // + span: $DIR/lower_intrinsics.rs:132:18: 132:54
 -                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Option<usize>) -> *const usize {option_payload_ptr::<usize>}, val: Value(<ZST>) }
 +         _3 = &raw const (((*_4) as Some).0: usize); // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
 +         goto -> bb1;                     // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
@@ -37,7 +37,7 @@
           _6 = &raw const (*_2);           // scope 2 at $DIR/lower_intrinsics.rs:+3:55: +3:56
 -         _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable]; // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
 -                                          // mir::Constant
--                                          // + span: $DIR/lower_intrinsics.rs:134:18: 134:54
+-                                          // + span: $DIR/lower_intrinsics.rs:133:18: 133:54
 -                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Option<String>) -> *const String {option_payload_ptr::<String>}, val: Value(<ZST>) }
 +         _5 = &raw const (((*_6) as Some).0: std::string::String); // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
 +         goto -> bb2;                     // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
diff --git a/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
index f342bf30d02..37f1995a53a 100644
--- a/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
+++ b/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
@@ -13,10 +13,10 @@
           _3 = _1;                         // scope 0 at $DIR/lower_intrinsics.rs:+1:30: +1:31
           StorageLive(_4);                 // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
           _4 = _2;                         // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
--         _0 = offset::<i32>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
+-         _0 = offset::<*const i32, isize>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
 -                                          // mir::Constant
--                                          // + span: $DIR/lower_intrinsics.rs:140:5: 140:29
--                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, isize) -> *const i32 {offset::<i32>}, val: Value(<ZST>) }
+-                                          // + span: $DIR/lower_intrinsics.rs:139:5: 139:29
+-                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, isize) -> *const i32 {offset::<*const i32, isize>}, val: Value(<ZST>) }
 +         _0 = Offset(move _3, move _4);   // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
 +         goto -> bb1;                     // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
       }
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index ad690f803c4..2b1e67be2a9 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -127,7 +127,6 @@ pub fn read_via_copy_uninhabited(r: &Never) -> Never {
 pub enum Never {}
 
 // EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
-#[cfg(not(bootstrap))]
 pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
     unsafe {
         let _x = core::intrinsics::option_payload_ptr(o);
diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs
new file mode 100644
index 00000000000..44b45627607
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.rs
@@ -0,0 +1,27 @@
+// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
+// only-64bit
+// ignore-debug
+
+#![crate_type = "lib"]
+
+use std::ops::Range;
+
+// EMIT_MIR slice_index.slice_index_usize.PreCodegen.after.mir
+pub fn slice_index_usize(slice: &[u32], index: usize) -> u32 {
+    slice[index]
+}
+
+// EMIT_MIR slice_index.slice_get_mut_usize.PreCodegen.after.mir
+pub fn slice_get_mut_usize(slice: &mut [u32], index: usize) -> Option<&mut u32> {
+    slice.get_mut(index)
+}
+
+// EMIT_MIR slice_index.slice_index_range.PreCodegen.after.mir
+pub fn slice_index_range(slice: &[u32], index: Range<usize>) -> &[u32] {
+    &slice[index]
+}
+
+// EMIT_MIR slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir
+pub unsafe fn slice_get_unchecked_mut_range(slice: &mut [u32], index: Range<usize>) -> &mut [u32] {
+    slice.get_unchecked_mut(index)
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir
new file mode 100644
index 00000000000..715a1e3fcd4
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir
@@ -0,0 +1,105 @@
+// MIR for `slice_get_mut_usize` after PreCodegen
+
+fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:28: +0:33
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:47: +0:52
+    let mut _0: std::option::Option<&mut u32>; // return place in scope 0 at $DIR/slice_index.rs:+0:64: +0:80
+    scope 1 (inlined core::slice::<impl [u32]>::get_mut::<usize>) { // at $DIR/slice_index.rs:16:11: 16:25
+        debug self => _1;                // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        debug index => _2;               // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        scope 2 (inlined <usize as SliceIndex<[u32]>>::get_mut) { // at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+            debug self => _2;            // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            debug slice => _1;           // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _3: bool;            // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _4: usize;           // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _5: &[u32];          // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _6: &mut u32;        // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _7: *mut u32;        // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _8: *mut [u32];      // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            scope 3 {
+                scope 4 (inlined <usize as SliceIndex<[u32]>>::get_unchecked_mut) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    debug self => _2;    // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    debug slice => _8;   // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    let mut _9: *mut u32; // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    let mut _10: usize;  // in scope 4 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                    let mut _11: *mut [u32]; // in scope 4 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                    scope 5 {
+                        debug this => _2; // in scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                        scope 6 {
+                            scope 7 (inlined <usize as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                                debug this => _10; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                                debug slice => _11; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                                scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                    debug self => _11; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    let mut _12: *const [u32]; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    scope 9 (inlined std::ptr::metadata::<[u32]>) { // at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                        debug ptr => _12; // in scope 9 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                        scope 10 {
+                                        }
+                                    }
+                                }
+                            }
+                            scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _8; // in scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                            }
+                            scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _9; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                debug count => _2; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                scope 13 {
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    bb0: {
+        StorageLive(_6);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _5 = &(*_1);                     // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _4 = Len((*_5));                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _3 = Lt(_2, move _4);            // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        switchInt(move _3) -> [0: bb2, otherwise: bb1]; // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb1: {
+        StorageLive(_7);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_8);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _8 = &raw mut (*_1);             // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_10);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_11);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_12);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _9 = _8 as *mut u32 (PtrToPtr);  // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        _7 = Offset(_9, _2);             // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageDead(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_12);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_11);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_10);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_8);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _6 = &mut (*_7);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _0 = Option::<&mut u32>::Some(_6); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_7);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        goto -> bb3;                     // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb2: {
+        _0 = const Option::<&mut u32>::None; // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // mir::Constant
+                                         // + span: no-location
+                                         // + literal: Const { ty: Option<&mut u32>, val: Value(Scalar(0x0000000000000000)) }
+        goto -> bb3;                     // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb3: {
+        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_6);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir
new file mode 100644
index 00000000000..ea0a44cf3bf
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir
@@ -0,0 +1,134 @@
+// MIR for `slice_get_unchecked_mut_range` after PreCodegen
+
+fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) -> &mut [u32] {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:45: +0:50
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:64: +0:69
+    let mut _0: &mut [u32];              // return place in scope 0 at $DIR/slice_index.rs:+1:5: +1:35
+    scope 1 (inlined core::slice::<impl [u32]>::get_unchecked_mut::<std::ops::Range<usize>>) { // at $DIR/slice_index.rs:26:11: 26:35
+        debug self => _1;                // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        debug index => _2;               // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        let mut _3: *mut [u32];          // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        let mut _4: *mut [u32];          // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        scope 2 {
+            scope 3 (inlined <std::ops::Range<usize> as SliceIndex<[u32]>>::get_unchecked_mut) { // at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+                debug self => _2;        // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                debug slice => _4;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let _5: std::ops::Range<usize>; // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _7: usize;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _8: usize;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _9: *mut u32;    // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _10: *mut u32;   // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _11: usize;      // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _12: usize;      // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _13: std::ops::Range<usize>; // in scope 3 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                let mut _14: *mut [u32]; // in scope 3 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                scope 4 {
+                    debug this => _5;    // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    scope 5 {
+                        let _6: usize;   // in scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                        scope 6 {
+                            debug new_len => _6; // in scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                            scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _4; // in scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                            }
+                            scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _10; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                debug count => _11; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                scope 13 {
+                                }
+                            }
+                            scope 14 (inlined slice_from_raw_parts_mut::<u32>) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug data => _9; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                debug len => _12; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                let mut _16: *mut (); // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                scope 15 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                    debug self => _9; // in scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                }
+                                scope 16 (inlined std::ptr::from_raw_parts_mut::<[u32]>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                    debug data_address => _16; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    debug metadata => _12; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _17: std::ptr::metadata::PtrRepr<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _18: std::ptr::metadata::PtrComponents<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _19: *const (); // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    scope 17 {
+                                    }
+                                }
+                            }
+                        }
+                        scope 7 (inlined <std::ops::Range<usize> as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            debug this => _13; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            debug slice => _14; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _14; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                let mut _15: *const [u32]; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                scope 9 (inlined std::ptr::metadata::<[u32]>) { // at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    debug ptr => _15; // in scope 9 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    scope 10 {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    bb0: {
+        StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        _4 = &raw mut (*_1);             // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_13);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_14);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_15);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_6);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_7);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _7 = (_2.1: usize);              // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_8);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _8 = (_2.0: usize);              // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _6 = unchecked_sub::<usize>(move _7, move _8) -> [return: bb1, unwind unreachable]; // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // mir::Constant
+                                         // + span: $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(usize, usize) -> usize {unchecked_sub::<usize>}, val: Value(<ZST>) }
+    }
+
+    bb1: {
+        StorageDead(_8);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_7);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_10);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _10 = _4 as *mut u32 (PtrToPtr); // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageLive(_11);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _11 = (_2.0: usize);             // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _9 = Offset(_10, _11);           // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageDead(_11);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_10);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_12);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _12 = _6;                        // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_16);                // scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+        _16 = _9 as *mut () (PtrToPtr);  // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageLive(_17);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageLive(_18);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageLive(_19);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _19 = _16 as *const () (Pointer(MutToConstPointer)); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _18 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _19, metadata: _12 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_19);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _17 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _18 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_18);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _3 = (_17.1: *mut [u32]);        // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_17);                // scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_16);                // scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+        StorageDead(_12);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_6);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_15);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_14);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_13);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        _0 = &mut (*_3);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_3);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir
new file mode 100644
index 00000000000..35dd973b55f
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir
@@ -0,0 +1,26 @@
+// MIR for `slice_index_range` after PreCodegen
+
+fn slice_index_range(_1: &[u32], _2: std::ops::Range<usize>) -> &[u32] {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:26: +0:31
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:41: +0:46
+    let mut _0: &[u32];                  // return place in scope 0 at $DIR/slice_index.rs:+1:5: +1:18
+    let _3: &[u32];                      // in scope 0 at $DIR/slice_index.rs:+1:6: +1:18
+    scope 1 (inlined #[track_caller] core::slice::index::<impl Index<std::ops::Range<usize>> for [u32]>::index) { // at $DIR/slice_index.rs:21:6: 21:18
+        debug self => _1;                // in scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        debug index => _2;               // in scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb0: {
+        StorageLive(_3);                 // scope 0 at $DIR/slice_index.rs:+1:6: +1:18
+        _3 = <std::ops::Range<usize> as SliceIndex<[u32]>>::index(move _2, _1) -> bb1; // scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // mir::Constant
+                                         // + span: $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // + literal: Const { ty: for<'a> fn(std::ops::Range<usize>, &'a [u32]) -> &'a <std::ops::Range<usize> as SliceIndex<[u32]>>::Output {<std::ops::Range<usize> as SliceIndex<[u32]>>::index}, val: Value(<ZST>) }
+    }
+
+    bb1: {
+        _0 = _3;                         // scope 0 at $DIR/slice_index.rs:+1:5: +1:18
+        StorageDead(_3);                 // scope 0 at $DIR/slice_index.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir
new file mode 100644
index 00000000000..6cc0ee0570b
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir
@@ -0,0 +1,20 @@
+// MIR for `slice_index_usize` after PreCodegen
+
+fn slice_index_usize(_1: &[u32], _2: usize) -> u32 {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:26: +0:31
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:41: +0:46
+    let mut _0: u32;                     // return place in scope 0 at $DIR/slice_index.rs:+0:58: +0:61
+    let mut _3: usize;                   // in scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+    let mut _4: bool;                    // in scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+
+    bb0: {
+        _3 = Len((*_1));                 // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+        _4 = Lt(_2, _3);                 // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+        assert(move _4, "index out of bounds: the length is {} but the index is {}", move _3, _2) -> bb1; // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+    }
+
+    bb1: {
+        _0 = (*_1)[_2];                  // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff b/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff
index 579587a430b..9bda5f575c9 100644
--- a/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff
+++ b/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff
@@ -15,14 +15,14 @@
       let mut _13: &[&str; 3];             // in scope 0 at $DIR/lifetimes.rs:+10:19: +10:28
       let _14: &[&str; 3];                 // in scope 0 at $DIR/lifetimes.rs:+10:19: +10:28
       let _15: [&str; 3];                  // in scope 0 at $DIR/lifetimes.rs:+10:19: +10:28
-      let mut _16: &[core::fmt::ArgumentV1<'_>]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let mut _17: &[core::fmt::ArgumentV1<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let _18: &[core::fmt::ArgumentV1<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let _19: [core::fmt::ArgumentV1<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let mut _20: core::fmt::ArgumentV1<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
+      let mut _16: &[core::fmt::rt::Argument<'_>]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let mut _17: &[core::fmt::rt::Argument<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let _18: &[core::fmt::rt::Argument<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let _19: [core::fmt::rt::Argument<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let mut _20: core::fmt::rt::Argument<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
       let mut _21: &std::boxed::Box<dyn std::fmt::Display>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
       let _22: &std::boxed::Box<dyn std::fmt::Display>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
-      let mut _23: core::fmt::ArgumentV1<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
+      let mut _23: core::fmt::rt::Argument<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
       let mut _24: &u32;                   // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
       let _25: &u32;                       // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
       let mut _27: bool;                   // in scope 0 at $DIR/lifetimes.rs:+12:1: +12:2
@@ -113,11 +113,11 @@
           StorageLive(_22);                // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
           _22 = &_8;                       // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
           _21 = &(*_22);                   // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
-          _20 = core::fmt::ArgumentV1::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _21) -> [return: bb3, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
+          _20 = core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _21) -> [return: bb3, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
                                            // mir::Constant
                                            // + span: $DIR/lifetimes.rs:27:20: 27:23
                                            // + user_ty: UserType(4)
-                                           // + literal: Const { ty: for<'b> fn(&'b Box<dyn std::fmt::Display>) -> core::fmt::ArgumentV1<'b> {core::fmt::ArgumentV1::<'_>::new_display::<Box<dyn std::fmt::Display>>}, val: Value(<ZST>) }
+                                           // + literal: Const { ty: for<'b> fn(&'b Box<dyn std::fmt::Display>) -> core::fmt::rt::Argument<'b> {core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>}, val: Value(<ZST>) }
       }
   
       bb3: {
@@ -127,11 +127,11 @@
           StorageLive(_25);                // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
           _25 = &_6;                       // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
           _24 = &(*_25);                   // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
-          _23 = core::fmt::ArgumentV1::<'_>::new_display::<u32>(move _24) -> [return: bb4, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
+          _23 = core::fmt::rt::Argument::<'_>::new_display::<u32>(move _24) -> [return: bb4, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
                                            // mir::Constant
                                            // + span: $DIR/lifetimes.rs:27:24: 27:27
                                            // + user_ty: UserType(5)
-                                           // + literal: Const { ty: for<'b> fn(&'b u32) -> core::fmt::ArgumentV1<'b> {core::fmt::ArgumentV1::<'_>::new_display::<u32>}, val: Value(<ZST>) }
+                                           // + literal: Const { ty: for<'b> fn(&'b u32) -> core::fmt::rt::Argument<'b> {core::fmt::rt::Argument::<'_>::new_display::<u32>}, val: Value(<ZST>) }
       }
   
       bb4: {
@@ -141,13 +141,13 @@
           StorageDead(_20);                // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           _18 = &_19;                      // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           _17 = &(*_18);                   // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
-          _16 = move _17 as &[core::fmt::ArgumentV1<'_>] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
+          _16 = move _17 as &[core::fmt::rt::Argument<'_>] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           StorageDead(_17);                // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           _11 = Arguments::<'_>::new_v1(move _12, move _16) -> [return: bb5, unwind unreachable]; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
                                            // mir::Constant
                                            // + span: $SRC_DIR/std/src/macros.rs:LL:COL
                                            // + user_ty: UserType(3)
-                                           // + literal: Const { ty: fn(&[&'static str], &[core::fmt::ArgumentV1<'_>]) -> Arguments<'_> {Arguments::<'_>::new_v1}, val: Value(<ZST>) }
+                                           // + literal: Const { ty: fn(&[&'static str], &[core::fmt::rt::Argument<'_>]) -> Arguments<'_> {Arguments::<'_>::new_v1}, val: Value(<ZST>) }
       }
   
       bb5: {
diff --git a/tests/run-make/core-no-oom-handling/Makefile b/tests/run-make/core-no-oom-handling/Makefile
new file mode 100644
index 00000000000..28c5261ff85
--- /dev/null
+++ b/tests/run-make/core-no-oom-handling/Makefile
@@ -0,0 +1,6 @@
+include ../tools.mk
+
+FAKEROOT=$(TMPDIR)/fakeroot
+
+all:
+	$(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../library/core/src/lib.rs --sysroot=$(FAKEROOT) --cfg no_global_oom_handling
diff --git a/tests/run-make/inaccessible-temp-dir/Makefile b/tests/run-make/inaccessible-temp-dir/Makefile
new file mode 100644
index 00000000000..abdba4eb861
--- /dev/null
+++ b/tests/run-make/inaccessible-temp-dir/Makefile
@@ -0,0 +1,32 @@
+# only-linux
+# ignore-arm - linker error on `armhf-gnu`
+
+include ../tools.mk
+
+# Issue #66530: We would ICE if someone compiled with `-o /dev/null`,
+# because we would try to generate auxiliary files in `/dev/` (which
+# at least the OS X file system rejects).
+#
+# An attempt to `-Ztemps-dir` into a directory we cannot write into should
+# indeed be an error; but not an ICE.
+#
+# However, some folks run tests as root, which can write `/dev/` and end
+# up clobbering `/dev/null`. Instead we'll use an inaccessible path, which
+# also used to ICE, but even root can't magically write there.
+#
+# Note that `-Ztemps-dir` uses `create_dir_all` so it is not sufficient to
+# use a directory with non-existing parent like `/does-not-exist/output`.
+
+all:
+	# Create an inaccessible directory
+	mkdir $(TMPDIR)/inaccessible
+	chmod 000 $(TMPDIR)/inaccessible
+
+	# Run rustc with `-Ztemps-dir` set to a directory 
+	# *inside* the inaccessible one, so that it can't create it
+	$(RUSTC) program.rs -Ztemps-dir=$(TMPDIR)/inaccessible/tmp 2>&1 \
+		| $(CGREP) 'failed to find or create the directory specified by `--temps-dir`'
+
+	# Make the inaccessible directory accessible,
+	# so that compiletest can delete the temp dir
+	chmod +rw $(TMPDIR)/inaccessible
diff --git a/tests/run-make/inaccessible-temp-dir/program.rs b/tests/run-make/inaccessible-temp-dir/program.rs
new file mode 100644
index 00000000000..f328e4d9d04
--- /dev/null
+++ b/tests/run-make/inaccessible-temp-dir/program.rs
@@ -0,0 +1 @@
+fn main() {}
diff --git a/tests/rustdoc-ui/check-cfg-test.stderr b/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr
index 9770be2f191..9770be2f191 100644
--- a/tests/rustdoc-ui/check-cfg-test.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr
diff --git a/tests/rustdoc-ui/check-cfg-unstable.rs b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
index 5c500ce6ce0..5c500ce6ce0 100644
--- a/tests/rustdoc-ui/check-cfg-unstable.rs
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
diff --git a/tests/rustdoc-ui/check-cfg-unstable.stderr b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr
index 9b27c2bc058..9b27c2bc058 100644
--- a/tests/rustdoc-ui/check-cfg-unstable.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr
diff --git a/tests/rustdoc-ui/check-cfg.rs b/tests/rustdoc-ui/check-cfg/check-cfg.rs
index fa8789ad3ed..fa8789ad3ed 100644
--- a/tests/rustdoc-ui/check-cfg.rs
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.rs
diff --git a/tests/rustdoc-ui/check-cfg.stderr b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
index 1db8e1d91c2..1db8e1d91c2 100644
--- a/tests/rustdoc-ui/check-cfg.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
diff --git a/tests/rustdoc-ui/auxiliary/extern_macros.rs b/tests/rustdoc-ui/doctest/auxiliary/extern_macros.rs
index ee1fec4c5c2..ee1fec4c5c2 100644
--- a/tests/rustdoc-ui/auxiliary/extern_macros.rs
+++ b/tests/rustdoc-ui/doctest/auxiliary/extern_macros.rs
diff --git a/tests/rustdoc-ui/block-doc-comment.rs b/tests/rustdoc-ui/doctest/block-doc-comment.rs
index ce529916e5e..ce529916e5e 100644
--- a/tests/rustdoc-ui/block-doc-comment.rs
+++ b/tests/rustdoc-ui/doctest/block-doc-comment.rs
diff --git a/tests/rustdoc-ui/block-doc-comment.stdout b/tests/rustdoc-ui/doctest/block-doc-comment.stdout
index 7326c0a25a0..7326c0a25a0 100644
--- a/tests/rustdoc-ui/block-doc-comment.stdout
+++ b/tests/rustdoc-ui/doctest/block-doc-comment.stdout
diff --git a/tests/rustdoc-ui/cfg-test.rs b/tests/rustdoc-ui/doctest/cfg-test.rs
index d40b9283735..a263baa9738 100644
--- a/tests/rustdoc-ui/cfg-test.rs
+++ b/tests/rustdoc-ui/doctest/cfg-test.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test --test-args --test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 // Crates like core have doctests gated on `cfg(not(test))` so we need to make
diff --git a/tests/rustdoc-ui/cfg-test.stdout b/tests/rustdoc-ui/doctest/cfg-test.stdout
index 2960ff8d3b4..2960ff8d3b4 100644
--- a/tests/rustdoc-ui/cfg-test.stdout
+++ b/tests/rustdoc-ui/doctest/cfg-test.stdout
diff --git a/tests/rustdoc-ui/check-attr-test.rs b/tests/rustdoc-ui/doctest/check-attr-test.rs
index e955470148a..e955470148a 100644
--- a/tests/rustdoc-ui/check-attr-test.rs
+++ b/tests/rustdoc-ui/doctest/check-attr-test.rs
diff --git a/tests/rustdoc-ui/check-attr-test.stderr b/tests/rustdoc-ui/doctest/check-attr-test.stderr
index 01beba1ffc4..01beba1ffc4 100644
--- a/tests/rustdoc-ui/check-attr-test.stderr
+++ b/tests/rustdoc-ui/doctest/check-attr-test.stderr
diff --git a/tests/rustdoc-ui/check-cfg-test.rs b/tests/rustdoc-ui/doctest/check-cfg-test.rs
index 920432276cb..49a801c3fb3 100644
--- a/tests/rustdoc-ui/check-cfg-test.rs
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.rs
@@ -1,7 +1,7 @@
 // check-pass
 // compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
-// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// The doctest will produce a warning because feature invalid is unexpected
diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.stderr b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
new file mode 100644
index 00000000000..9770be2f191
--- /dev/null
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
@@ -0,0 +1,11 @@
+warning: unexpected `cfg` condition value
+  --> $DIR/check-cfg-test.rs:9:7
+   |
+LL | #[cfg(feature = "invalid")]
+   |       ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: test
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/rustdoc-ui/check-cfg-test.stdout b/tests/rustdoc-ui/doctest/check-cfg-test.stdout
index b7db49bcfa8..b7db49bcfa8 100644
--- a/tests/rustdoc-ui/check-cfg-test.stdout
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.stdout
diff --git a/tests/rustdoc-ui/display-output.rs b/tests/rustdoc-ui/doctest/display-output.rs
index 23bc54e3cde..7a26dbff986 100644
--- a/tests/rustdoc-ui/display-output.rs
+++ b/tests/rustdoc-ui/doctest/display-output.rs
@@ -3,7 +3,7 @@
 // check-pass
 // edition:2018
 // compile-flags:--test --test-args=--show-output
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/display-output.stdout b/tests/rustdoc-ui/doctest/display-output.stdout
index ad25d1ce541..ad25d1ce541 100644
--- a/tests/rustdoc-ui/display-output.stdout
+++ b/tests/rustdoc-ui/doctest/display-output.stdout
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs
index db674e229fc..75508f435b3 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-attr.rs
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs
@@ -1,6 +1,6 @@
 // Regression test for #97440: Multiline inner attribute triggers ICE during doctest
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-attr.stdout b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.stdout
index e47edbd2a81..e47edbd2a81 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-attr.stdout
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.stdout
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs
index 6ce3cb9fc07..3b0b27edb7d 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.stdout
index bf3521e4f91..bf3521e4f91 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.stdout
diff --git a/tests/rustdoc-ui/doc-test-attr-pass.rs b/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs
index 12608f24450..12608f24450 100644
--- a/tests/rustdoc-ui/doc-test-attr-pass.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs
diff --git a/tests/rustdoc-ui/doc-test-attr.rs b/tests/rustdoc-ui/doctest/doc-test-attr.rs
index 46178ad865a..46178ad865a 100644
--- a/tests/rustdoc-ui/doc-test-attr.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-attr.rs
diff --git a/tests/rustdoc-ui/doc-test-attr.stderr b/tests/rustdoc-ui/doctest/doc-test-attr.stderr
index 5e6014954a4..5e6014954a4 100644
--- a/tests/rustdoc-ui/doc-test-attr.stderr
+++ b/tests/rustdoc-ui/doctest/doc-test-attr.stderr
diff --git a/tests/rustdoc-ui/doc-test-doctest-feature.rs b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs
index 88cf44e643b..9c1f4936eab 100644
--- a/tests/rustdoc-ui/doc-test-doctest-feature.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 // Make sure `cfg(doctest)` is set when finding doctests but not inside
diff --git a/tests/rustdoc-ui/doc-test-doctest-feature.stdout b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.stdout
index d7de1f10522..d7de1f10522 100644
--- a/tests/rustdoc-ui/doc-test-doctest-feature.stdout
+++ b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.stdout
diff --git a/tests/rustdoc-ui/doc-test-rustdoc-feature.rs b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs
index dc72a485764..1f90d13af84 100644
--- a/tests/rustdoc-ui/doc-test-rustdoc-feature.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 #![feature(doc_cfg)]
diff --git a/tests/rustdoc-ui/doc-test-rustdoc-feature.stdout b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.stdout
index 5b07fc4c87a..5b07fc4c87a 100644
--- a/tests/rustdoc-ui/doc-test-rustdoc-feature.stdout
+++ b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.stdout
diff --git a/tests/rustdoc-ui/doctest-edition.rs b/tests/rustdoc-ui/doctest/doctest-edition.rs
index b0787be972f..b0787be972f 100644
--- a/tests/rustdoc-ui/doctest-edition.rs
+++ b/tests/rustdoc-ui/doctest/doctest-edition.rs
diff --git a/tests/rustdoc-ui/doctest-edition.stderr b/tests/rustdoc-ui/doctest/doctest-edition.stderr
index 8a3329aa3ed..8a3329aa3ed 100644
--- a/tests/rustdoc-ui/doctest-edition.stderr
+++ b/tests/rustdoc-ui/doctest/doctest-edition.stderr
diff --git a/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs
index 260f5a7a64f..a3bde6cb941 100644
--- a/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs
+++ b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test --test-args=--test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doctest-multiline-crate-attribute.stdout b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.stdout
index 07a4f657dea..07a4f657dea 100644
--- a/tests/rustdoc-ui/doctest-multiline-crate-attribute.stdout
+++ b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.stdout
diff --git a/tests/rustdoc-ui/doctest-output.rs b/tests/rustdoc-ui/doctest/doctest-output.rs
index 303f7689698..26754b73f0b 100644
--- a/tests/rustdoc-ui/doctest-output.rs
+++ b/tests/rustdoc-ui/doctest/doctest-output.rs
@@ -1,7 +1,7 @@
 // edition:2018
 // aux-build:extern_macros.rs
 // compile-flags:--test --test-args=--test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doctest-output.stdout b/tests/rustdoc-ui/doctest/doctest-output.stdout
index 35b0e366fb5..35b0e366fb5 100644
--- a/tests/rustdoc-ui/doctest-output.stdout
+++ b/tests/rustdoc-ui/doctest/doctest-output.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-compile-fail.rs b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs
index 4dfca600f16..53b3857dfde 100644
--- a/tests/rustdoc-ui/failed-doctest-compile-fail.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-compile-fail.stdout b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.stdout
index af3a90a7410..af3a90a7410 100644
--- a/tests/rustdoc-ui/failed-doctest-compile-fail.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs
index 03a5b9d5d84..84e4d61603a 100644
--- a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
index 61468b6c745..61468b6c745 100644
--- a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-missing-codes.rs b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs
index 66a229a0c75..4e3b848fc02 100644
--- a/tests/rustdoc-ui/failed-doctest-missing-codes.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-missing-codes.stdout b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
index bacbb47b5f9..bacbb47b5f9 100644
--- a/tests/rustdoc-ui/failed-doctest-missing-codes.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-output-windows.rs b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs
index 456a9e68f20..6bc6c33c76e 100644
--- a/tests/rustdoc-ui/failed-doctest-output-windows.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs
@@ -7,7 +7,7 @@
 
 // compile-flags:--test --test-args --test-threads=1
 // rustc-env:RUST_BACKTRACE=0
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-output-windows.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
index 6c147054da3..6c147054da3 100644
--- a/tests/rustdoc-ui/failed-doctest-output-windows.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-output.rs b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
index 77647f8eca9..3e1312382ee 100644
--- a/tests/rustdoc-ui/failed-doctest-output.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
@@ -7,7 +7,7 @@
 
 // compile-flags:--test --test-args --test-threads=1
 // rustc-env:RUST_BACKTRACE=0
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-output.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
index 630198a561a..630198a561a 100644
--- a/tests/rustdoc-ui/failed-doctest-output.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-should-panic.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
index c134f80064d..36284e814f3 100644
--- a/tests/rustdoc-ui/failed-doctest-should-panic.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-should-panic.stdout b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
index 57a20092a5d..57a20092a5d 100644
--- a/tests/rustdoc-ui/failed-doctest-should-panic.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
diff --git a/tests/rustdoc-ui/no-run-flag-error.rs b/tests/rustdoc-ui/doctest/no-run-flag-error.rs
index 4ead621482b..4ead621482b 100644
--- a/tests/rustdoc-ui/no-run-flag-error.rs
+++ b/tests/rustdoc-ui/doctest/no-run-flag-error.rs
diff --git a/tests/rustdoc-ui/no-run-flag-error.stderr b/tests/rustdoc-ui/doctest/no-run-flag-error.stderr
index d032646c365..d032646c365 100644
--- a/tests/rustdoc-ui/no-run-flag-error.stderr
+++ b/tests/rustdoc-ui/doctest/no-run-flag-error.stderr
diff --git a/tests/rustdoc-ui/no-run-flag.rs b/tests/rustdoc-ui/doctest/no-run-flag.rs
index 181730eb416..1cf3b7c4bb3 100644
--- a/tests/rustdoc-ui/no-run-flag.rs
+++ b/tests/rustdoc-ui/doctest/no-run-flag.rs
@@ -2,7 +2,7 @@
 
 // check-pass
 // compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/no-run-flag.stdout b/tests/rustdoc-ui/doctest/no-run-flag.stdout
index 02f28aaf60d..02f28aaf60d 100644
--- a/tests/rustdoc-ui/no-run-flag.stdout
+++ b/tests/rustdoc-ui/doctest/no-run-flag.stdout
diff --git a/tests/rustdoc-ui/nocapture-fail.rs b/tests/rustdoc-ui/doctest/nocapture-fail.rs
index 9a3fb592c63..ce487a43db4 100644
--- a/tests/rustdoc-ui/nocapture-fail.rs
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.rs
@@ -1,7 +1,7 @@
 // check-pass
 // compile-flags:--test -Zunstable-options --nocapture
-// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```compile_fail
diff --git a/tests/rustdoc-ui/nocapture-fail.stderr b/tests/rustdoc-ui/doctest/nocapture-fail.stderr
index b65b622c1ed..b65b622c1ed 100644
--- a/tests/rustdoc-ui/nocapture-fail.stderr
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.stderr
diff --git a/tests/rustdoc-ui/nocapture-fail.stdout b/tests/rustdoc-ui/doctest/nocapture-fail.stdout
index 754f77db53c..754f77db53c 100644
--- a/tests/rustdoc-ui/nocapture-fail.stdout
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.stdout
diff --git a/tests/rustdoc-ui/nocapture.rs b/tests/rustdoc-ui/doctest/nocapture.rs
index 3eb38f2fb3b..25fbcf857e2 100644
--- a/tests/rustdoc-ui/nocapture.rs
+++ b/tests/rustdoc-ui/doctest/nocapture.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test -Zunstable-options --nocapture
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/nocapture.stderr b/tests/rustdoc-ui/doctest/nocapture.stderr
index af6415db3c7..af6415db3c7 100644
--- a/tests/rustdoc-ui/nocapture.stderr
+++ b/tests/rustdoc-ui/doctest/nocapture.stderr
diff --git a/tests/rustdoc-ui/nocapture.stdout b/tests/rustdoc-ui/doctest/nocapture.stdout
index 4880e75da70..4880e75da70 100644
--- a/tests/rustdoc-ui/nocapture.stdout
+++ b/tests/rustdoc-ui/doctest/nocapture.stdout
diff --git a/tests/rustdoc-ui/private-doc-test.rs b/tests/rustdoc-ui/doctest/private-doc-test.rs
index a1f9f8dca08..a1f9f8dca08 100644
--- a/tests/rustdoc-ui/private-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/private-doc-test.rs
diff --git a/tests/rustdoc-ui/private-item-doc-test.rs b/tests/rustdoc-ui/doctest/private-item-doc-test.rs
index 1a3d6cc636d..1a3d6cc636d 100644
--- a/tests/rustdoc-ui/private-item-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/private-item-doc-test.rs
diff --git a/tests/rustdoc-ui/private-item-doc-test.stderr b/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
index 5df6132987c..5df6132987c 100644
--- a/tests/rustdoc-ui/private-item-doc-test.stderr
+++ b/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
diff --git a/tests/rustdoc-ui/private-public-item-doc-test.rs b/tests/rustdoc-ui/doctest/private-public-item-doc-test.rs
index 7cc62b38cc2..7cc62b38cc2 100644
--- a/tests/rustdoc-ui/private-public-item-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/private-public-item-doc-test.rs
diff --git a/tests/rustdoc-ui/private-public-item-doc-test.stderr b/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
index f50dbd1844e..f50dbd1844e 100644
--- a/tests/rustdoc-ui/private-public-item-doc-test.stderr
+++ b/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
diff --git a/tests/rustdoc-ui/public-reexported-item-doc-test.rs b/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs
index b86a53305a1..b86a53305a1 100644
--- a/tests/rustdoc-ui/public-reexported-item-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs
diff --git a/tests/rustdoc-ui/run-directory.correct.stdout b/tests/rustdoc-ui/doctest/run-directory.correct.stdout
index e9b2754794a..e9b2754794a 100644
--- a/tests/rustdoc-ui/run-directory.correct.stdout
+++ b/tests/rustdoc-ui/doctest/run-directory.correct.stdout
diff --git a/tests/rustdoc-ui/run-directory.incorrect.stdout b/tests/rustdoc-ui/doctest/run-directory.incorrect.stdout
index 97a5dbc5c0c..97a5dbc5c0c 100644
--- a/tests/rustdoc-ui/run-directory.incorrect.stdout
+++ b/tests/rustdoc-ui/doctest/run-directory.incorrect.stdout
diff --git a/tests/rustdoc-ui/run-directory.rs b/tests/rustdoc-ui/doctest/run-directory.rs
index b8d0647f08d..1ff0af2d17c 100644
--- a/tests/rustdoc-ui/run-directory.rs
+++ b/tests/rustdoc-ui/doctest/run-directory.rs
@@ -4,12 +4,12 @@
 // check-pass
 // [correct]compile-flags:--test --test-run-directory={{src-base}}
 // [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
 /// assert_eq!(
-///     std::fs::read_to_string("run-directory.rs").unwrap(),
+///     std::fs::read_to_string("doctest/run-directory.rs").unwrap(),
 ///     include_str!("run-directory.rs"),
 /// );
 /// ```
@@ -17,7 +17,7 @@
 pub fn foo() {}
 
 /// ```
-/// assert!(std::fs::read_to_string("run-directory.rs").is_err());
+/// assert!(std::fs::read_to_string("doctest/run-directory.rs").is_err());
 /// ```
 #[cfg(incorrect)]
 pub fn foo() {}
diff --git a/tests/rustdoc-ui/test-compile-fail1.rs b/tests/rustdoc-ui/doctest/test-compile-fail1.rs
index a0539023878..a0539023878 100644
--- a/tests/rustdoc-ui/test-compile-fail1.rs
+++ b/tests/rustdoc-ui/doctest/test-compile-fail1.rs
diff --git a/tests/rustdoc-ui/test-compile-fail1.stderr b/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
index 72915e46bec..72915e46bec 100644
--- a/tests/rustdoc-ui/test-compile-fail1.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
diff --git a/tests/rustdoc-ui/test-compile-fail2.rs b/tests/rustdoc-ui/doctest/test-compile-fail2.rs
index 651ded0a047..651ded0a047 100644
--- a/tests/rustdoc-ui/test-compile-fail2.rs
+++ b/tests/rustdoc-ui/doctest/test-compile-fail2.rs
diff --git a/tests/rustdoc-ui/test-compile-fail2.stderr b/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
index cee5b63cf50..cee5b63cf50 100644
--- a/tests/rustdoc-ui/test-compile-fail2.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
diff --git a/tests/rustdoc-ui/test-compile-fail3.rs b/tests/rustdoc-ui/doctest/test-compile-fail3.rs
index faa30ad8367..faa30ad8367 100644
--- a/tests/rustdoc-ui/test-compile-fail3.rs
+++ b/tests/rustdoc-ui/doctest/test-compile-fail3.rs
diff --git a/tests/rustdoc-ui/test-compile-fail3.stderr b/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
index fab801b3bea..fab801b3bea 100644
--- a/tests/rustdoc-ui/test-compile-fail3.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
diff --git a/tests/rustdoc-ui/test-no_std.rs b/tests/rustdoc-ui/doctest/test-no_std.rs
index 51abf1c7217..fd651d1a344 100644
--- a/tests/rustdoc-ui/test-no_std.rs
+++ b/tests/rustdoc-ui/doctest/test-no_std.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/test-no_std.stdout b/tests/rustdoc-ui/doctest/test-no_std.stdout
index 8d5a30804c1..8d5a30804c1 100644
--- a/tests/rustdoc-ui/test-no_std.stdout
+++ b/tests/rustdoc-ui/doctest/test-no_std.stdout
diff --git a/tests/rustdoc-ui/test-type.rs b/tests/rustdoc-ui/doctest/test-type.rs
index 7f5a8f3fc41..036d37f9db2 100644
--- a/tests/rustdoc-ui/test-type.rs
+++ b/tests/rustdoc-ui/doctest/test-type.rs
@@ -1,6 +1,6 @@
 // compile-flags: --test --test-args=--test-threads=1
 // check-pass
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/test-type.stdout b/tests/rustdoc-ui/doctest/test-type.stdout
index a66fd240d34..a66fd240d34 100644
--- a/tests/rustdoc-ui/test-type.stdout
+++ b/tests/rustdoc-ui/doctest/test-type.stdout
diff --git a/tests/rustdoc-ui/unparseable-doc-test.rs b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs
index f0a56a91bf5..fd8b2094d02 100644
--- a/tests/rustdoc-ui/unparseable-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs
@@ -1,5 +1,5 @@
 // compile-flags: --test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 // rustc-env: RUST_BACKTRACE=0
diff --git a/tests/rustdoc-ui/unparseable-doc-test.stdout b/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
index 2641c66f25e..2641c66f25e 100644
--- a/tests/rustdoc-ui/unparseable-doc-test.stdout
+++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs
index 87620d74ee6..87620d74ee6 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.rs
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.stderr
index a8ddf91bcbf..a8ddf91bcbf 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.stderr
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs
index 8f4f561b44d..8f4f561b44d 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt.rs
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt.stderr b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.stderr
index 4c8c607e7da..4c8c607e7da 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt.stderr
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.stderr
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt2.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs
index da5142087dd..da5142087dd 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt2.rs
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt2.stderr b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.stderr
index 4c8c607e7da..4c8c607e7da 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt2.stderr
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.stderr
diff --git a/tests/rustdoc-ui/assoc-item-not-in-scope.rs b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs
index 0976515f4a4..0976515f4a4 100644
--- a/tests/rustdoc-ui/assoc-item-not-in-scope.rs
+++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs
diff --git a/tests/rustdoc-ui/assoc-item-not-in-scope.stderr b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
index 04594ad4142..04594ad4142 100644
--- a/tests/rustdoc-ui/assoc-item-not-in-scope.stderr
+++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
diff --git a/tests/rustdoc-ui/deny-intra-link-resolution-failure.rs b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.rs
index 09da124b162..09da124b162 100644
--- a/tests/rustdoc-ui/deny-intra-link-resolution-failure.rs
+++ b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.rs
diff --git a/tests/rustdoc-ui/deny-intra-link-resolution-failure.stderr b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
index 3e08354a61d..3e08354a61d 100644
--- a/tests/rustdoc-ui/deny-intra-link-resolution-failure.stderr
+++ b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
diff --git a/tests/rustdoc-ui/pub-export-lint.rs b/tests/rustdoc-ui/intra-doc/pub-export-lint.rs
index f2e66b77bf3..f2e66b77bf3 100644
--- a/tests/rustdoc-ui/pub-export-lint.rs
+++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.rs
diff --git a/tests/rustdoc-ui/pub-export-lint.stderr b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
index 81ef799617c..81ef799617c 100644
--- a/tests/rustdoc-ui/pub-export-lint.stderr
+++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
diff --git a/tests/rustdoc-ui/reference-link-reports-error-once.rs b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs
index 71bd2c522ff..71bd2c522ff 100644
--- a/tests/rustdoc-ui/reference-link-reports-error-once.rs
+++ b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs
diff --git a/tests/rustdoc-ui/reference-link-reports-error-once.stderr b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr
index 2ab67090f66..2ab67090f66 100644
--- a/tests/rustdoc-ui/reference-link-reports-error-once.stderr
+++ b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr
diff --git a/tests/rustdoc-ui/reference-links.rs b/tests/rustdoc-ui/intra-doc/reference-links.rs
index e81e034465d..e81e034465d 100644
--- a/tests/rustdoc-ui/reference-links.rs
+++ b/tests/rustdoc-ui/intra-doc/reference-links.rs
diff --git a/tests/rustdoc-ui/reference-links.stderr b/tests/rustdoc-ui/intra-doc/reference-links.stderr
index c98a2fd7ce6..c98a2fd7ce6 100644
--- a/tests/rustdoc-ui/reference-links.stderr
+++ b/tests/rustdoc-ui/intra-doc/reference-links.stderr
diff --git a/tests/rustdoc-ui/auxiliary/empty-fn.rs b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs
index 877810f15d7..877810f15d7 100644
--- a/tests/rustdoc-ui/auxiliary/empty-fn.rs
+++ b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs
diff --git a/tests/rustdoc-ui/auxiliary/issue-61592.rs b/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs
index 57a365b3f38..57a365b3f38 100644
--- a/tests/rustdoc-ui/auxiliary/issue-61592.rs
+++ b/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs
diff --git a/tests/rustdoc-ui/auxiliary/panic-handler.rs b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs
index 0aaaeee1051..0aaaeee1051 100644
--- a/tests/rustdoc-ui/auxiliary/panic-handler.rs
+++ b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs
diff --git a/tests/rustdoc-ui/issue-101076.rs b/tests/rustdoc-ui/issues/issue-101076.rs
index 648f9902908..648f9902908 100644
--- a/tests/rustdoc-ui/issue-101076.rs
+++ b/tests/rustdoc-ui/issues/issue-101076.rs
diff --git a/tests/rustdoc-ui/issue-102986.rs b/tests/rustdoc-ui/issues/issue-102986.rs
index 001784ac285..001784ac285 100644
--- a/tests/rustdoc-ui/issue-102986.rs
+++ b/tests/rustdoc-ui/issues/issue-102986.rs
diff --git a/tests/rustdoc-ui/issue-102986.stderr b/tests/rustdoc-ui/issues/issue-102986.stderr
index 3a573726c97..3a573726c97 100644
--- a/tests/rustdoc-ui/issue-102986.stderr
+++ b/tests/rustdoc-ui/issues/issue-102986.stderr
diff --git a/tests/rustdoc-ui/issue-103997.rs b/tests/rustdoc-ui/issues/issue-103997.rs
index 36f42fb15f7..36f42fb15f7 100644
--- a/tests/rustdoc-ui/issue-103997.rs
+++ b/tests/rustdoc-ui/issues/issue-103997.rs
diff --git a/tests/rustdoc-ui/issue-103997.stderr b/tests/rustdoc-ui/issues/issue-103997.stderr
index c06db91496f..c06db91496f 100644
--- a/tests/rustdoc-ui/issue-103997.stderr
+++ b/tests/rustdoc-ui/issues/issue-103997.stderr
diff --git a/tests/rustdoc-ui/issue-105334.rs b/tests/rustdoc-ui/issues/issue-105334.rs
index ee1adc6a029..ee1adc6a029 100644
--- a/tests/rustdoc-ui/issue-105334.rs
+++ b/tests/rustdoc-ui/issues/issue-105334.rs
diff --git a/tests/rustdoc-ui/issue-105334.stderr b/tests/rustdoc-ui/issues/issue-105334.stderr
index e163bb4db9e..e163bb4db9e 100644
--- a/tests/rustdoc-ui/issue-105334.stderr
+++ b/tests/rustdoc-ui/issues/issue-105334.stderr
diff --git a/tests/rustdoc-ui/issue-105737.rs b/tests/rustdoc-ui/issues/issue-105737.rs
index 154f069d8ff..154f069d8ff 100644
--- a/tests/rustdoc-ui/issue-105737.rs
+++ b/tests/rustdoc-ui/issues/issue-105737.rs
diff --git a/tests/rustdoc-ui/issue-105737.stderr b/tests/rustdoc-ui/issues/issue-105737.stderr
index 2dd9beb17da..2dd9beb17da 100644
--- a/tests/rustdoc-ui/issue-105737.stderr
+++ b/tests/rustdoc-ui/issues/issue-105737.stderr
diff --git a/tests/rustdoc-ui/issue-105742.rs b/tests/rustdoc-ui/issues/issue-105742.rs
index 8f4172c0cbb..8f4172c0cbb 100644
--- a/tests/rustdoc-ui/issue-105742.rs
+++ b/tests/rustdoc-ui/issues/issue-105742.rs
diff --git a/tests/rustdoc-ui/issue-105742.stderr b/tests/rustdoc-ui/issues/issue-105742.stderr
index cd53762ef9b..cd53762ef9b 100644
--- a/tests/rustdoc-ui/issue-105742.stderr
+++ b/tests/rustdoc-ui/issues/issue-105742.stderr
diff --git a/tests/rustdoc-ui/issue-106213.rs b/tests/rustdoc-ui/issues/issue-106213.rs
index 6d51846b7d0..6d51846b7d0 100644
--- a/tests/rustdoc-ui/issue-106213.rs
+++ b/tests/rustdoc-ui/issues/issue-106213.rs
diff --git a/tests/rustdoc-ui/issue-106213.stderr b/tests/rustdoc-ui/issues/issue-106213.stderr
index 0a4ff69bafb..0a4ff69bafb 100644
--- a/tests/rustdoc-ui/issue-106213.stderr
+++ b/tests/rustdoc-ui/issues/issue-106213.stderr
diff --git a/tests/rustdoc-ui/issue-106226.rs b/tests/rustdoc-ui/issues/issue-106226.rs
index 71b497a9adc..71b497a9adc 100644
--- a/tests/rustdoc-ui/issue-106226.rs
+++ b/tests/rustdoc-ui/issues/issue-106226.rs
diff --git a/tests/rustdoc-ui/issue-106226.stderr b/tests/rustdoc-ui/issues/issue-106226.stderr
index 1c973dab61d..1c973dab61d 100644
--- a/tests/rustdoc-ui/issue-106226.stderr
+++ b/tests/rustdoc-ui/issues/issue-106226.stderr
diff --git a/tests/rustdoc-ui/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs
index 13788df0fc9..13788df0fc9 100644
--- a/tests/rustdoc-ui/issue-107918.rs
+++ b/tests/rustdoc-ui/issues/issue-107918.rs
diff --git a/tests/rustdoc-ui/issue-109282-import-inline-merge.rs b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs
index 0ec8523222f..0ec8523222f 100644
--- a/tests/rustdoc-ui/issue-109282-import-inline-merge.rs
+++ b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs
diff --git a/tests/rustdoc-ui/issues/issue-110900.rs b/tests/rustdoc-ui/issues/issue-110900.rs
new file mode 100644
index 00000000000..e3154baf860
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-110900.rs
@@ -0,0 +1,28 @@
+// check-pass
+
+#![crate_type="lib"]
+#![feature(associated_type_bounds)]
+
+trait A<'a> {}
+trait B<'b> {}
+
+trait C<'c>: for<'a> A<'a> + for<'b> B<'b> {
+    type As;
+}
+
+trait E<'e> {
+    type As;
+}
+trait F<'f>: for<'a> A<'a> + for<'e> E<'e> {}
+struct G<T>
+where
+    T: for<'l, 'i> H<'l, 'i, As: for<'a> A<'a> + 'i>
+{
+    t: std::marker::PhantomData<T>,
+}
+
+trait I<'a, 'b, 'c> {
+    type As;
+}
+
+trait H<'d, 'e>: for<'f> I<'d, 'f, 'e> + 'd {}
diff --git a/tests/rustdoc-ui/issue-58473-2.rs b/tests/rustdoc-ui/issues/issue-58473-2.rs
index 000b6a329c1..000b6a329c1 100644
--- a/tests/rustdoc-ui/issue-58473-2.rs
+++ b/tests/rustdoc-ui/issues/issue-58473-2.rs
diff --git a/tests/rustdoc-ui/issue-58473.rs b/tests/rustdoc-ui/issues/issue-58473.rs
index 44e1f58d0a0..44e1f58d0a0 100644
--- a/tests/rustdoc-ui/issue-58473.rs
+++ b/tests/rustdoc-ui/issues/issue-58473.rs
diff --git a/tests/rustdoc-ui/issue-61592-2.rs b/tests/rustdoc-ui/issues/issue-61592-2.rs
index 5b4fc5ee700..5b4fc5ee700 100644
--- a/tests/rustdoc-ui/issue-61592-2.rs
+++ b/tests/rustdoc-ui/issues/issue-61592-2.rs
diff --git a/tests/rustdoc-ui/issue-61592-2.stderr b/tests/rustdoc-ui/issues/issue-61592-2.stderr
index 1b7f8bb552c..1b7f8bb552c 100644
--- a/tests/rustdoc-ui/issue-61592-2.stderr
+++ b/tests/rustdoc-ui/issues/issue-61592-2.stderr
diff --git a/tests/rustdoc-ui/issue-61592.rs b/tests/rustdoc-ui/issues/issue-61592.rs
index 66772557f2c..66772557f2c 100644
--- a/tests/rustdoc-ui/issue-61592.rs
+++ b/tests/rustdoc-ui/issues/issue-61592.rs
diff --git a/tests/rustdoc-ui/issue-61592.stderr b/tests/rustdoc-ui/issues/issue-61592.stderr
index 9c9c9106f8a..9c9c9106f8a 100644
--- a/tests/rustdoc-ui/issue-61592.stderr
+++ b/tests/rustdoc-ui/issues/issue-61592.stderr
diff --git a/tests/rustdoc-ui/issue-61732.rs b/tests/rustdoc-ui/issues/issue-61732.rs
index 4bd8efeaa3b..4bd8efeaa3b 100644
--- a/tests/rustdoc-ui/issue-61732.rs
+++ b/tests/rustdoc-ui/issues/issue-61732.rs
diff --git a/tests/rustdoc-ui/issue-61732.stderr b/tests/rustdoc-ui/issues/issue-61732.stderr
index d16ec6a853a..d16ec6a853a 100644
--- a/tests/rustdoc-ui/issue-61732.stderr
+++ b/tests/rustdoc-ui/issues/issue-61732.stderr
diff --git a/tests/rustdoc-ui/issue-74134.private.stderr b/tests/rustdoc-ui/issues/issue-74134.private.stderr
index 44c88b6183a..44c88b6183a 100644
--- a/tests/rustdoc-ui/issue-74134.private.stderr
+++ b/tests/rustdoc-ui/issues/issue-74134.private.stderr
diff --git a/tests/rustdoc-ui/issue-74134.public.stderr b/tests/rustdoc-ui/issues/issue-74134.public.stderr
index 5b1887b8310..5b1887b8310 100644
--- a/tests/rustdoc-ui/issue-74134.public.stderr
+++ b/tests/rustdoc-ui/issues/issue-74134.public.stderr
diff --git a/tests/rustdoc-ui/issue-74134.rs b/tests/rustdoc-ui/issues/issue-74134.rs
index b1be9123aaf..b1be9123aaf 100644
--- a/tests/rustdoc-ui/issue-74134.rs
+++ b/tests/rustdoc-ui/issues/issue-74134.rs
diff --git a/tests/rustdoc-ui/issue-79465.rs b/tests/rustdoc-ui/issues/issue-79465.rs
index e50f3995b83..e50f3995b83 100644
--- a/tests/rustdoc-ui/issue-79465.rs
+++ b/tests/rustdoc-ui/issues/issue-79465.rs
diff --git a/tests/rustdoc-ui/issue-79465.stderr b/tests/rustdoc-ui/issues/issue-79465.stderr
index d187a2e664a..d187a2e664a 100644
--- a/tests/rustdoc-ui/issue-79465.stderr
+++ b/tests/rustdoc-ui/issues/issue-79465.stderr
diff --git a/tests/rustdoc-ui/issue-79467.rs b/tests/rustdoc-ui/issues/issue-79467.rs
index eb0b9b38071..eb0b9b38071 100644
--- a/tests/rustdoc-ui/issue-79467.rs
+++ b/tests/rustdoc-ui/issues/issue-79467.rs
diff --git a/tests/rustdoc-ui/issue-79467.stderr b/tests/rustdoc-ui/issues/issue-79467.stderr
index 561513a432b..561513a432b 100644
--- a/tests/rustdoc-ui/issue-79467.stderr
+++ b/tests/rustdoc-ui/issues/issue-79467.stderr
diff --git a/tests/rustdoc-ui/issue-79494.rs b/tests/rustdoc-ui/issues/issue-79494.rs
index fc39424b793..fc39424b793 100644
--- a/tests/rustdoc-ui/issue-79494.rs
+++ b/tests/rustdoc-ui/issues/issue-79494.rs
diff --git a/tests/rustdoc-ui/issue-79494.stderr b/tests/rustdoc-ui/issues/issue-79494.stderr
index 7ed5ed38247..7ed5ed38247 100644
--- a/tests/rustdoc-ui/issue-79494.stderr
+++ b/tests/rustdoc-ui/issues/issue-79494.stderr
diff --git a/tests/rustdoc-ui/issue-80992.rs b/tests/rustdoc-ui/issues/issue-80992.rs
index 80ff225b879..f5ae16981ca 100644
--- a/tests/rustdoc-ui/issue-80992.rs
+++ b/tests/rustdoc-ui/issues/issue-80992.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 pub fn test() -> Result<(), ()> {
diff --git a/tests/rustdoc-ui/issue-80992.stdout b/tests/rustdoc-ui/issues/issue-80992.stdout
index d2b1cd1d550..d2b1cd1d550 100644
--- a/tests/rustdoc-ui/issue-80992.stdout
+++ b/tests/rustdoc-ui/issues/issue-80992.stdout
diff --git a/tests/rustdoc-ui/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
index 8a90813b31d..0240d217bee 100644
--- a/tests/rustdoc-ui/issue-81662-shortness.rs
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test --error-format=short
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/issue-81662-shortness.stdout b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
index 748113be3a2..748113be3a2 100644
--- a/tests/rustdoc-ui/issue-81662-shortness.stdout
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
diff --git a/tests/rustdoc-ui/issue-83883-describe-lints.rs b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs
index 0474d6c143e..0474d6c143e 100644
--- a/tests/rustdoc-ui/issue-83883-describe-lints.rs
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs
diff --git a/tests/rustdoc-ui/issue-83883-describe-lints.stdout b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
index bbf66a31583..bbf66a31583 100644
--- a/tests/rustdoc-ui/issue-83883-describe-lints.stdout
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
diff --git a/tests/rustdoc-ui/issue-91134.rs b/tests/rustdoc-ui/issues/issue-91134.rs
index 42703ee4d79..85362f186cc 100644
--- a/tests/rustdoc-ui/issue-91134.rs
+++ b/tests/rustdoc-ui/issues/issue-91134.rs
@@ -1,7 +1,7 @@
 // compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
 // aux-build:empty-fn.rs
 // check-pass
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // edition:2021
 
diff --git a/tests/rustdoc-ui/issue-91134.stdout b/tests/rustdoc-ui/issues/issue-91134.stdout
index 084062743da..084062743da 100644
--- a/tests/rustdoc-ui/issue-91134.stdout
+++ b/tests/rustdoc-ui/issues/issue-91134.stdout
diff --git a/tests/rustdoc-ui/issue-91713.rs b/tests/rustdoc-ui/issues/issue-91713.rs
index 610bbf11d9c..610bbf11d9c 100644
--- a/tests/rustdoc-ui/issue-91713.rs
+++ b/tests/rustdoc-ui/issues/issue-91713.rs
diff --git a/tests/rustdoc-ui/issue-91713.stderr b/tests/rustdoc-ui/issues/issue-91713.stderr
index 44ead7a1de2..44ead7a1de2 100644
--- a/tests/rustdoc-ui/issue-91713.stderr
+++ b/tests/rustdoc-ui/issues/issue-91713.stderr
diff --git a/tests/rustdoc-ui/issue-91713.stdout b/tests/rustdoc-ui/issues/issue-91713.stdout
index 16783524363..16783524363 100644
--- a/tests/rustdoc-ui/issue-91713.stdout
+++ b/tests/rustdoc-ui/issues/issue-91713.stdout
diff --git a/tests/rustdoc-ui/issue-96287.rs b/tests/rustdoc-ui/issues/issue-96287.rs
index 08cc7ef4c90..08cc7ef4c90 100644
--- a/tests/rustdoc-ui/issue-96287.rs
+++ b/tests/rustdoc-ui/issues/issue-96287.rs
diff --git a/tests/rustdoc-ui/issue-96287.stderr b/tests/rustdoc-ui/issues/issue-96287.stderr
index 7722eb96028..7722eb96028 100644
--- a/tests/rustdoc-ui/issue-96287.stderr
+++ b/tests/rustdoc-ui/issues/issue-96287.stderr
diff --git a/tests/rustdoc-ui/issue-98690.rs b/tests/rustdoc-ui/issues/issue-98690.rs
index fe9bd87ab28..fe9bd87ab28 100644
--- a/tests/rustdoc-ui/issue-98690.rs
+++ b/tests/rustdoc-ui/issues/issue-98690.rs
diff --git a/tests/rustdoc-ui/issue-98690.stderr b/tests/rustdoc-ui/issues/issue-98690.stderr
index 47d94f99a45..47d94f99a45 100644
--- a/tests/rustdoc-ui/issue-98690.stderr
+++ b/tests/rustdoc-ui/issues/issue-98690.stderr
diff --git a/tests/rustdoc-ui/bare-urls.fixed b/tests/rustdoc-ui/lints/bare-urls.fixed
index 23aa5c44c21..23aa5c44c21 100644
--- a/tests/rustdoc-ui/bare-urls.fixed
+++ b/tests/rustdoc-ui/lints/bare-urls.fixed
diff --git a/tests/rustdoc-ui/bare-urls.rs b/tests/rustdoc-ui/lints/bare-urls.rs
index 592f57343bc..592f57343bc 100644
--- a/tests/rustdoc-ui/bare-urls.rs
+++ b/tests/rustdoc-ui/lints/bare-urls.rs
diff --git a/tests/rustdoc-ui/bare-urls.stderr b/tests/rustdoc-ui/lints/bare-urls.stderr
index ccf52cd0b93..ccf52cd0b93 100644
--- a/tests/rustdoc-ui/bare-urls.stderr
+++ b/tests/rustdoc-ui/lints/bare-urls.stderr
diff --git a/tests/rustdoc-ui/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs
index 0b3f7bedda5..0b3f7bedda5 100644
--- a/tests/rustdoc-ui/check-attr.rs
+++ b/tests/rustdoc-ui/lints/check-attr.rs
diff --git a/tests/rustdoc-ui/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr
index f66e63ab727..f66e63ab727 100644
--- a/tests/rustdoc-ui/check-attr.stderr
+++ b/tests/rustdoc-ui/lints/check-attr.stderr
diff --git a/tests/rustdoc-ui/check-fail.rs b/tests/rustdoc-ui/lints/check-fail.rs
index 02632b4ce7d..02632b4ce7d 100644
--- a/tests/rustdoc-ui/check-fail.rs
+++ b/tests/rustdoc-ui/lints/check-fail.rs
diff --git a/tests/rustdoc-ui/check-fail.stderr b/tests/rustdoc-ui/lints/check-fail.stderr
index f05e457af64..f05e457af64 100644
--- a/tests/rustdoc-ui/check-fail.stderr
+++ b/tests/rustdoc-ui/lints/check-fail.stderr
diff --git a/tests/rustdoc-ui/check.rs b/tests/rustdoc-ui/lints/check.rs
index e389a81bb33..e389a81bb33 100644
--- a/tests/rustdoc-ui/check.rs
+++ b/tests/rustdoc-ui/lints/check.rs
diff --git a/tests/rustdoc-ui/check.stderr b/tests/rustdoc-ui/lints/check.stderr
index c5ed5d0c3ef..c5ed5d0c3ef 100644
--- a/tests/rustdoc-ui/check.stderr
+++ b/tests/rustdoc-ui/lints/check.stderr
diff --git a/tests/rustdoc-ui/deny-missing-docs-crate.rs b/tests/rustdoc-ui/lints/deny-missing-docs-crate.rs
index b74eba3f66b..b74eba3f66b 100644
--- a/tests/rustdoc-ui/deny-missing-docs-crate.rs
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-crate.rs
diff --git a/tests/rustdoc-ui/deny-missing-docs-crate.stderr b/tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr
index 5025b0b0ca8..5025b0b0ca8 100644
--- a/tests/rustdoc-ui/deny-missing-docs-crate.stderr
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr
diff --git a/tests/rustdoc-ui/deny-missing-docs-macro.rs b/tests/rustdoc-ui/lints/deny-missing-docs-macro.rs
index b1c1253176b..b1c1253176b 100644
--- a/tests/rustdoc-ui/deny-missing-docs-macro.rs
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-macro.rs
diff --git a/tests/rustdoc-ui/deny-missing-docs-macro.stderr b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
index 0867b08183e..0867b08183e 100644
--- a/tests/rustdoc-ui/deny-missing-docs-macro.stderr
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
diff --git a/tests/rustdoc-ui/doc-attr.rs b/tests/rustdoc-ui/lints/doc-attr.rs
index 980d1c0e207..980d1c0e207 100644
--- a/tests/rustdoc-ui/doc-attr.rs
+++ b/tests/rustdoc-ui/lints/doc-attr.rs
diff --git a/tests/rustdoc-ui/doc-attr.stderr b/tests/rustdoc-ui/lints/doc-attr.stderr
index 68df2771fd7..68df2771fd7 100644
--- a/tests/rustdoc-ui/doc-attr.stderr
+++ b/tests/rustdoc-ui/lints/doc-attr.stderr
diff --git a/tests/rustdoc-ui/doc-spotlight.fixed b/tests/rustdoc-ui/lints/doc-spotlight.fixed
index 4b58778eacd..4b58778eacd 100644
--- a/tests/rustdoc-ui/doc-spotlight.fixed
+++ b/tests/rustdoc-ui/lints/doc-spotlight.fixed
diff --git a/tests/rustdoc-ui/doc-spotlight.rs b/tests/rustdoc-ui/lints/doc-spotlight.rs
index 16e38724580..16e38724580 100644
--- a/tests/rustdoc-ui/doc-spotlight.rs
+++ b/tests/rustdoc-ui/lints/doc-spotlight.rs
diff --git a/tests/rustdoc-ui/doc-spotlight.stderr b/tests/rustdoc-ui/lints/doc-spotlight.stderr
index 58612327ff9..58612327ff9 100644
--- a/tests/rustdoc-ui/doc-spotlight.stderr
+++ b/tests/rustdoc-ui/lints/doc-spotlight.stderr
diff --git a/tests/rustdoc-ui/doc-without-codeblock.rs b/tests/rustdoc-ui/lints/doc-without-codeblock.rs
index 86d7c83d335..86d7c83d335 100644
--- a/tests/rustdoc-ui/doc-without-codeblock.rs
+++ b/tests/rustdoc-ui/lints/doc-without-codeblock.rs
diff --git a/tests/rustdoc-ui/doc-without-codeblock.stderr b/tests/rustdoc-ui/lints/doc-without-codeblock.stderr
index ebf2a2d54f7..ebf2a2d54f7 100644
--- a/tests/rustdoc-ui/doc-without-codeblock.stderr
+++ b/tests/rustdoc-ui/lints/doc-without-codeblock.stderr
diff --git a/tests/rustdoc-ui/doc_cfg_hide.rs b/tests/rustdoc-ui/lints/doc_cfg_hide.rs
index 5d8791748a0..5d8791748a0 100644
--- a/tests/rustdoc-ui/doc_cfg_hide.rs
+++ b/tests/rustdoc-ui/lints/doc_cfg_hide.rs
diff --git a/tests/rustdoc-ui/doc_cfg_hide.stderr b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
index 03623368cd0..b7e8870fdf5 100644
--- a/tests/rustdoc-ui/doc_cfg_hide.stderr
+++ b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
@@ -16,7 +16,7 @@ LL | #![deny(warnings)]
 help: to apply to the crate, use an inner attribute
    |
 LL | #![doc(cfg_hide(doc))]
-   | ~~~~~~~~~~~~~~~~~~~~~~
+   |  +
 
 error: `#[doc(cfg_hide(...)]` takes a list of attributes
   --> $DIR/doc_cfg_hide.rs:4:8
diff --git a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs
index 0901ac3640f..0901ac3640f 100644
--- a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs
+++ b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs
diff --git a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr
index efc5f349f4f..efc5f349f4f 100644
--- a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr
+++ b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr
diff --git a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs
index c34ea0567a9..c34ea0567a9 100644
--- a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs
+++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs
diff --git a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
index 326dcfe3bde..326dcfe3bde 100644
--- a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr
+++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
diff --git a/tests/rustdoc-ui/invalid-doc-attr.rs b/tests/rustdoc-ui/lints/invalid-doc-attr.rs
index de004b41e27..c231e43b35c 100644
--- a/tests/rustdoc-ui/invalid-doc-attr.rs
+++ b/tests/rustdoc-ui/lints/invalid-doc-attr.rs
@@ -5,7 +5,7 @@
 //~^ ERROR can only be applied at the crate level
 //~| WARN is being phased out
 //~| HELP to apply to the crate, use an inner attribute
-//~| SUGGESTION #![doc(test(no_crate_inject))]
+//~| SUGGESTION !
 #[doc(inline)]
 //~^ ERROR can only be applied to a `use` item
 //~| WARN is being phased out
diff --git a/tests/rustdoc-ui/invalid-doc-attr.stderr b/tests/rustdoc-ui/lints/invalid-doc-attr.stderr
index 3c66e587b47..b23b8ded867 100644
--- a/tests/rustdoc-ui/invalid-doc-attr.stderr
+++ b/tests/rustdoc-ui/lints/invalid-doc-attr.stderr
@@ -16,7 +16,7 @@ LL | #![deny(warnings)]
 help: to apply to the crate, use an inner attribute
    |
 LL | #![doc(test(no_crate_inject))]
-   |
+   |  +
 
 error: this attribute can only be applied to a `use` item
   --> $DIR/invalid-doc-attr.rs:9:7
diff --git a/tests/rustdoc-ui/invalid-html-self-closing-tag.rs b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs
index d973a53cbc7..d973a53cbc7 100644
--- a/tests/rustdoc-ui/invalid-html-self-closing-tag.rs
+++ b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs
diff --git a/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr
index e45edfb43ff..e45edfb43ff 100644
--- a/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr
+++ b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr
diff --git a/tests/rustdoc-ui/invalid-html-tags.rs b/tests/rustdoc-ui/lints/invalid-html-tags.rs
index 317f1fd1d46..317f1fd1d46 100644
--- a/tests/rustdoc-ui/invalid-html-tags.rs
+++ b/tests/rustdoc-ui/lints/invalid-html-tags.rs
diff --git a/tests/rustdoc-ui/invalid-html-tags.stderr b/tests/rustdoc-ui/lints/invalid-html-tags.stderr
index 9c2bfcf2c3d..9c2bfcf2c3d 100644
--- a/tests/rustdoc-ui/invalid-html-tags.stderr
+++ b/tests/rustdoc-ui/lints/invalid-html-tags.stderr
diff --git a/tests/rustdoc-ui/lint-group.rs b/tests/rustdoc-ui/lints/lint-group.rs
index ad88157f64f..ad88157f64f 100644
--- a/tests/rustdoc-ui/lint-group.rs
+++ b/tests/rustdoc-ui/lints/lint-group.rs
diff --git a/tests/rustdoc-ui/lint-group.stderr b/tests/rustdoc-ui/lints/lint-group.stderr
index 7ff09fcc45a..7ff09fcc45a 100644
--- a/tests/rustdoc-ui/lint-group.stderr
+++ b/tests/rustdoc-ui/lints/lint-group.stderr
diff --git a/tests/rustdoc-ui/lint-missing-doc-code-example.rs b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs
index 40f35728d79..40f35728d79 100644
--- a/tests/rustdoc-ui/lint-missing-doc-code-example.rs
+++ b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs
diff --git a/tests/rustdoc-ui/lint-missing-doc-code-example.stderr b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr
index f9331250154..f9331250154 100644
--- a/tests/rustdoc-ui/lint-missing-doc-code-example.stderr
+++ b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr
diff --git a/tests/rustdoc-ui/no-crate-level-doc-lint.rs b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
index a186410acf4..a186410acf4 100644
--- a/tests/rustdoc-ui/no-crate-level-doc-lint.rs
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
diff --git a/tests/rustdoc-ui/no-crate-level-doc-lint.stderr b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
index fb3a5e415df..fb3a5e415df 100644
--- a/tests/rustdoc-ui/no-crate-level-doc-lint.stderr
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
diff --git a/tests/rustdoc-ui/renamed-lint-still-applies.rs b/tests/rustdoc-ui/lints/renamed-lint-still-applies.rs
index a4d3a4b4971..a4d3a4b4971 100644
--- a/tests/rustdoc-ui/renamed-lint-still-applies.rs
+++ b/tests/rustdoc-ui/lints/renamed-lint-still-applies.rs
diff --git a/tests/rustdoc-ui/renamed-lint-still-applies.stderr b/tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr
index ee9b67cb91b..ee9b67cb91b 100644
--- a/tests/rustdoc-ui/renamed-lint-still-applies.stderr
+++ b/tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr
diff --git a/tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs b/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs
index e106d06aff5..e106d06aff5 100644
--- a/tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs
+++ b/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs
diff --git a/tests/rustdoc-ui/unknown-renamed-lints.rs b/tests/rustdoc-ui/lints/unknown-renamed-lints.rs
index ddf03dd079f..ddf03dd079f 100644
--- a/tests/rustdoc-ui/unknown-renamed-lints.rs
+++ b/tests/rustdoc-ui/lints/unknown-renamed-lints.rs
diff --git a/tests/rustdoc-ui/unknown-renamed-lints.stderr b/tests/rustdoc-ui/lints/unknown-renamed-lints.stderr
index bf529b9f8e2..bf529b9f8e2 100644
--- a/tests/rustdoc-ui/unknown-renamed-lints.stderr
+++ b/tests/rustdoc-ui/lints/unknown-renamed-lints.stderr
diff --git a/tests/rustdoc-ui/unused-braces-lint.rs b/tests/rustdoc-ui/lints/unused-braces-lint.rs
index be0e31e4be2..be0e31e4be2 100644
--- a/tests/rustdoc-ui/unused-braces-lint.rs
+++ b/tests/rustdoc-ui/lints/unused-braces-lint.rs
diff --git a/tests/rustdoc-ui/unused.rs b/tests/rustdoc-ui/lints/unused.rs
index 702b24c36c5..702b24c36c5 100644
--- a/tests/rustdoc-ui/unused.rs
+++ b/tests/rustdoc-ui/lints/unused.rs
diff --git a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs
index 8f4fde96d7e..8f4fde96d7e 100644
--- a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs
diff --git a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.stderr b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.stderr
index 750aa320719..750aa320719 100644
--- a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.stderr
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.stderr
diff --git a/tests/rustdoc-ui/scrape-examples-ice.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs
index d629b62a724..d629b62a724 100644
--- a/tests/rustdoc-ui/scrape-examples-ice.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-1.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs
index a1f005c32ee..a1f005c32ee 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-1.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-1.stderr b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.stderr
index eb8e9f79968..eb8e9f79968 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-1.stderr
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.stderr
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-2.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs
index 4aacec7f094..4aacec7f094 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-2.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-2.stderr b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.stderr
index eb8e9f79968..eb8e9f79968 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-2.stderr
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.stderr
diff --git a/tests/rustdoc-ui/unescaped_backticks.rs b/tests/rustdoc-ui/unescaped_backticks.rs
new file mode 100644
index 00000000000..f1ad7c8d4c7
--- /dev/null
+++ b/tests/rustdoc-ui/unescaped_backticks.rs
@@ -0,0 +1,342 @@
+#![deny(rustdoc::unescaped_backticks)]
+#![allow(rustdoc::broken_intra_doc_links)]
+#![allow(rustdoc::invalid_html_tags)]
+
+///
+pub fn empty() {}
+
+#[doc = ""]
+pub fn empty2() {}
+
+/// `
+//~^ ERROR unescaped backtick
+pub fn single() {}
+
+/// \`
+pub fn escaped() {}
+
+/// \\`
+//~^ ERROR unescaped backtick
+pub fn not_escaped() {}
+
+/// \\\`
+pub fn not_not_escaped() {}
+
+/// [`link1]
+//~^ ERROR unescaped backtick
+pub fn link1() {}
+
+/// [link2`]
+//~^ ERROR unescaped backtick
+pub fn link2() {}
+
+/// [`link_long](link_long)
+//~^ ERROR unescaped backtick
+pub fn link_long() {}
+
+/// [`broken-link]
+//~^ ERROR unescaped backtick
+pub fn broken_link() {}
+
+/// <xx:`>
+pub fn url() {}
+
+/// <x:`>
+//~^ ERROR unescaped backtick
+pub fn not_url() {}
+
+/// <h1>`</h1>
+pub fn html_tag() {}
+
+/// &#96;
+pub fn html_escape() {}
+
+/// 🦀`🦀
+//~^ ERROR unescaped backtick
+pub fn unicode() {}
+
+/// `foo(
+//~^ ERROR unescaped backtick
+///
+/// paragraph
+pub fn paragraph() {}
+
+/// `foo `bar`
+//~^ ERROR unescaped backtick
+///
+/// paragraph
+pub fn paragraph2() {}
+
+/// `foo(
+//~^ ERROR unescaped backtick
+/// not paragraph
+pub fn not_paragraph() {}
+
+/// Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (add(n, 42)`),
+/// or even to add a number `n` to 42 (`add(42, b)`)!
+//~^ ERROR unescaped backtick
+pub fn add1(a: i32, b: i32) -> i32 { a + b }
+
+/// Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (`add(n, 42)),
+/// or even to add a number `n` to 42 (`add(42, n)`)!
+//~^ ERROR unescaped backtick
+pub fn add2(a: i32, b: i32) -> i32 { a + b }
+
+/// Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+/// or even to add a number `n` to 42 (add(42, n)`)!
+//~^ ERROR unescaped backtick
+pub fn add3(a: i32, b: i32) -> i32 { a + b }
+
+/// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (`add(n, 42)),
+/// or even to add a number `n` to 42 (`add(42, n)`)!
+//~^ ERROR unescaped backtick
+pub fn add4(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "`"]
+//~^ ERROR unescaped backtick
+pub fn attr() {}
+
+#[doc = concat!("\\", "`")]
+pub fn attr_escaped() {}
+
+#[doc = concat!("\\\\", "`")]
+//~^ ERROR unescaped backtick
+pub fn attr_not_escaped() {}
+
+#[doc = "Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`."]
+//~^ ERROR unescaped backtick
+pub fn attr_add1(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`."]
+//~^ ERROR unescaped backtick
+pub fn attr_add2(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`."]
+//~^ ERROR unescaped backtick
+pub fn attr_add3(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)."]
+//~^ ERROR unescaped backtick
+pub fn attr_add4(a: i32, b: i32) -> i32 { a + b }
+
+/// ``double backticks``
+/// `foo
+//~^ ERROR unescaped backtick
+pub fn double_backticks() {}
+
+/// # `(heading
+//~^ ERROR unescaped backtick
+/// ## heading2)`
+//~^ ERROR unescaped backtick
+///
+/// multi `(
+//~^ ERROR unescaped backtick
+/// line
+/// ) heading
+/// =
+///
+/// para)`(graph
+//~^ ERROR unescaped backtick
+///
+/// para)`(graph2
+//~^ ERROR unescaped backtick
+///
+/// 1. foo)`
+//~^ ERROR unescaped backtick
+/// 2. `(bar
+//~^ ERROR unescaped backtick
+/// * baz)`
+//~^ ERROR unescaped backtick
+/// * `(quux
+//~^ ERROR unescaped backtick
+///
+/// `#![this_is_actually_an_image(and(not), an = "attribute")]
+//~^ ERROR unescaped backtick
+///
+/// #![this_is_actually_an_image(and(not), an = "attribute")]`
+//~^ ERROR unescaped backtick
+///
+/// [this_is_actually_an_image(and(not), an = "attribute")]: `.png
+///
+/// | `table( | )head` |
+//~^ ERROR unescaped backtick
+//~| ERROR unescaped backtick
+/// |---------|--------|
+/// | table`( | )`body |
+//~^ ERROR unescaped backtick
+//~| ERROR unescaped backtick
+pub fn complicated_markdown() {}
+
+/// The `custom_mir` attribute tells the compiler to treat the function as being custom MIR. This
+/// attribute only works on functions - there is no way to insert custom MIR into the middle of
+/// another function. The `dialect` and `phase` parameters indicate which [version of MIR][dialect
+/// docs] you are inserting here. Generally you'll want to use `#![custom_mir(dialect = "built")]`
+/// if you want your MIR to be modified by the full MIR pipeline, or `#![custom_mir(dialect =
+//~^ ERROR unescaped backtick
+/// "runtime", phase = "optimized")] if you don't.
+pub mod mir {}
+
+pub mod rustc {
+    /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
+    //~^ ERROR unescaped backtick
+    /// ensure it gets used.
+    pub fn ty_error_with_message() {}
+
+    pub struct WhereClause {
+        /// `true` if we ate a `where` token: this can happen
+        /// if we parsed no predicates (e.g. `struct Foo where {}
+        /// This allows us to accurately pretty-print
+        /// in `nt_to_tokenstream`
+        //~^ ERROR unescaped backtick
+        pub has_where_token: bool,
+    }
+
+    /// A symbol is an interned or gensymed string. The use of `newtype_index!` means
+    /// that `Option<Symbol>` only takes up 4 bytes, because `newtype_index! reserves
+    //~^ ERROR unescaped backtick
+    /// the last 256 values for tagging purposes.
+    pub struct Symbol();
+
+    /// It is equivalent to `OpenOptions::new()` but allows you to write more
+    /// readable code. Instead of `OpenOptions::new().read(true).open("foo.txt")`
+    /// you can write `File::with_options().read(true).open("foo.txt"). This
+    /// also avoids the need to import `OpenOptions`.
+    //~^ ERROR unescaped backtick
+    pub fn with_options() {}
+
+    /// Subtracts `set from `row`. `set` can be either `BitSet` or
+    /// `HybridBitSet`. Has no effect if `row` does not exist.
+    //~^ ERROR unescaped backtick
+    ///
+    /// Returns true if the row was changed.
+    pub fn subtract_row() {}
+
+    pub mod assert_module_sources {
+        //! The reason that we use `cfg=...` and not `#[cfg_attr]` is so that
+        //! the HIR doesn't change as a result of the annotations, which might
+        //! perturb the reuse results.
+        //!
+        //! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
+        //~^ ERROR unescaped backtick
+        //! allows for doing a more fine-grained check to see if pre- or post-lto data
+        //! was re-used.
+
+        /// `cfg=...
+        //~^ ERROR unescaped backtick
+        pub fn foo() {}
+
+        /// `cfg=... and not `#[cfg_attr]`
+        //~^ ERROR unescaped backtick
+        pub fn bar() {}
+    }
+
+    /// Conceptually, this is like a `Vec<Vec<RWU>>`. But the number of
+    /// RWU`s can get very large, so it uses a more compact representation.
+    //~^ ERROR unescaped backtick
+    pub struct RWUTable {}
+
+    /// Like [Self::canonicalize_query], but preserves distinct universes. For
+    /// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
+    /// `'?1` is in `U3` would be canonicalized to have ?0` in `U1` and `'?1`
+    /// in `U2`.
+    //~^ ERROR unescaped backtick
+    ///
+    /// This is used for Chalk integration.
+    pub fn canonicalize_query_preserving_universes() {}
+
+    /// Note that we used to return `Error` here, but that was quite
+    /// dubious -- the premise was that an error would *eventually* be
+    /// reported, when the obligation was processed. But in general once
+    /// you see an `Error` you are supposed to be able to assume that an
+    /// error *has been* reported, so that you can take whatever heuristic
+    /// paths you want to take. To make things worse, it was possible for
+    /// cycles to arise, where you basically had a setup like `<MyType<$0>
+    /// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0> as
+    /// Trait>::Foo> to `[type error]` would lead to an obligation of
+    /// `<MyType<[type error]> as Trait>::Foo`. We are supposed to report
+    /// an error for this obligation, but we legitimately should not,
+    /// because it contains `[type error]`. Yuck! (See issue #29857 for
+    //~^ ERROR unescaped backtick
+    /// one case where this arose.)
+    pub fn normalize_to_error() {}
+
+    /// you don't want to cache that `B: AutoTrait` or `A: AutoTrait`
+    /// is `EvaluatedToOk`; this is because they were only considered
+    /// ok on the premise that if `A: AutoTrait` held, but we indeed
+    /// encountered a problem (later on) with `A: AutoTrait. So we
+    /// currently set a flag on the stack node for `B: AutoTrait` (as
+    /// well as the second instance of `A: AutoTrait`) to suppress
+    //~^ ERROR unescaped backtick
+    /// caching.
+    pub struct TraitObligationStack;
+
+    /// Extend `scc` so that it can outlive some placeholder region
+    /// from a universe it can't name; at present, the only way for
+    /// this to be true is if `scc` outlives `'static`. This is
+    /// actually stricter than necessary: ideally, we'd support bounds
+    /// like `for<'a: 'b`>` that might then allow us to approximate
+    /// `'a` with `'b` and not `'static`. But it will have to do for
+    //~^ ERROR unescaped backtick
+    /// now.
+    pub fn add_incompatible_universe(){}
+}
+
+/// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+/// which returns an `Option<Dispatch>`. If all [`Dispatch`] clones that point
+/// at the `Subscriber` have been dropped, [`WeakDispatch::upgrade`] will return
+/// `None`. Otherwise, it will return `Some(Dispatch)`.
+//~^ ERROR unescaped backtick
+///
+/// Returns some reference to this `[`Subscriber`] value if it is of type `T`,
+/// or `None` if it isn't.
+//~^ ERROR unescaped backtick
+///
+/// Called before the filtered [`Layer]'s [`on_event`], to determine if
+/// `on_event` should be called.
+//~^ ERROR unescaped backtick
+///
+/// Therefore, if the `Filter will change the value returned by this
+/// method, it is responsible for ensuring that
+/// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+//~^ ERROR unescaped backtick
+/// level changes.
+pub mod tracing {}
+
+macro_rules! id {
+    ($($tt:tt)*) => { $($tt)* }
+}
+
+id! {
+    /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+    //~^ ERROR unescaped backtick
+    //~| ERROR unescaped backtick
+    //~| ERROR unescaped backtick
+    //~| ERROR unescaped backtick
+    /// which returns an `Option<Dispatch>`. If all [`Dispatch`] clones that point
+    /// at the `Subscriber` have been dropped, [`WeakDispatch::upgrade`] will return
+    /// `None`. Otherwise, it will return `Some(Dispatch)`.
+    ///
+    /// Returns some reference to this `[`Subscriber`] value if it is of type `T`,
+    /// or `None` if it isn't.
+    ///
+    /// Called before the filtered [`Layer]'s [`on_event`], to determine if
+    /// `on_event` should be called.
+    ///
+    /// Therefore, if the `Filter will change the value returned by this
+    /// method, it is responsible for ensuring that
+    /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+    /// level changes.
+    pub mod tracing_macro {}
+}
diff --git a/tests/rustdoc-ui/unescaped_backticks.stderr b/tests/rustdoc-ui/unescaped_backticks.stderr
new file mode 100644
index 00000000000..e629dbc34e9
--- /dev/null
+++ b/tests/rustdoc-ui/unescaped_backticks.stderr
@@ -0,0 +1,959 @@
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:186:70
+   |
+LL | /// if you want your MIR to be modified by the full MIR pipeline, or `#![custom_mir(dialect =
+   |                                                                      ^
+   |
+note: the lint level is defined here
+  --> $DIR/unescaped_backticks.rs:1:9
+   |
+LL | #![deny(rustdoc::unescaped_backticks)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// "runtime", phase = "optimized")]` if you don't.
+   |                                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// if you want your MIR to be modified by the full MIR pipeline, or \`#![custom_mir(dialect =
+   |                                                                      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:231:13
+   |
+LL |         //! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
+   |             ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |         //! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]`
+   |                                                                                         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         //! \`#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
+   |             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:236:13
+   |
+LL |         /// `cfg=...
+   |             ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |         /// `cfg=...`
+   |                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         /// \`cfg=...
+   |             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:240:42
+   |
+LL |         /// `cfg=... and not `#[cfg_attr]`
+   |                                          ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |         /// `cfg=...` and not `#[cfg_attr]`
+   |                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         /// `cfg=... and not `#[cfg_attr]\`
+   |                                          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:192:91
+   |
+LL |     /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
+   |                                                                                           ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |     /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg` to
+   |                                                                                               +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given \`msg to
+   |                                                                                           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:201:34
+   |
+LL |         /// in `nt_to_tokenstream`
+   |                                  ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |         /// if we parsed no predicates (e.g. `struct` Foo where {}
+   |                                                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         /// in `nt_to_tokenstream\`
+   |                                  +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:207:62
+   |
+LL |     /// that `Option<Symbol>` only takes up 4 bytes, because `newtype_index! reserves
+   |                                                              ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |     /// that `Option<Symbol>` only takes up 4 bytes, because `newtype_index!` reserves
+   |                                                                             +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// that `Option<Symbol>` only takes up 4 bytes, because \`newtype_index! reserves
+   |                                                              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:215:52
+   |
+LL |     /// also avoids the need to import `OpenOptions`.
+   |                                                    ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// you can write `File::with_options().read(true).open("foo.txt")`. This
+   |                                                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// also avoids the need to import `OpenOptions\`.
+   |                                                    +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:220:46
+   |
+LL |     /// `HybridBitSet`. Has no effect if `row` does not exist.
+   |                                              ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// Subtracts `set` from `row`. `set` can be either `BitSet` or
+   |                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// `HybridBitSet`. Has no effect if `row\` does not exist.
+   |                                              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:246:12
+   |
+LL |     /// RWU`s can get very large, so it uses a more compact representation.
+   |            ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL |     /// `RWU`s can get very large, so it uses a more compact representation.
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// RWU\`s can get very large, so it uses a more compact representation.
+   |            +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:253:15
+   |
+LL |     /// in `U2`.
+   |               ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL |     /// `'?1` is in `U3` would be canonicalized to have `?0` in `U1` and `'?1`
+   |                                                         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// in `U2\`.
+   |               +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:270:42
+   |
+LL |     /// because it contains `[type error]`. Yuck! (See issue #29857 for
+   |                                          ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0>` as
+   |                                                              +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// because it contains `[type error]\`. Yuck! (See issue #29857 for
+   |                                          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:280:53
+   |
+LL |     /// well as the second instance of `A: AutoTrait`) to suppress
+   |                                                     ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// encountered a problem (later on) with `A:` AutoTrait. So we
+   |                                                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// well as the second instance of `A: AutoTrait\`) to suppress
+   |                                                     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:290:40
+   |
+LL |     /// `'a` with `'b` and not `'static`. But it will have to do for
+   |                                        ^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// `'a` with `'b` and not `'static\`. But it will have to do for
+   |                                        +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:299:54
+   |
+LL | /// `None`. Otherwise, it will return `Some(Dispatch)`.
+   |                                                      ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL | /// The `Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// `None`. Otherwise, it will return `Some(Dispatch)\`.
+   |                                                      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:303:13
+   |
+LL | /// or `None` if it isn't.
+   |             ^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or `None\` if it isn't.
+   |             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:307:14
+   |
+LL | /// `on_event` should be called.
+   |              ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// Called before the filtered [`Layer`]'s [`on_event`], to determine if
+   |                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// `on_event\` should be called.
+   |              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:312:29
+   |
+LL | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+   |                             ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// Therefore, if the `Filter` will change the value returned by this
+   |                              +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [`rebuild_interest_cache\`][rebuild] is called after the value of the max
+   |                             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: the opening backtick of a previous inline code may be missing
+            change: The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+           to this: The `Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+   = help: if you meant to use a literal backtick, escape it
+            change: `None`. Otherwise, it will return `Some(Dispatch)`.
+           to this: `None`. Otherwise, it will return `Some(Dispatch)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+   = help: if you meant to use a literal backtick, escape it
+            change: or `None` if it isn't.
+           to this: or `None\` if it isn't.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: a previous inline code might be longer than expected
+            change: Called before the filtered [`Layer]'s [`on_event`], to determine if
+           to this: Called before the filtered [`Layer`]'s [`on_event`], to determine if
+   = help: if you meant to use a literal backtick, escape it
+            change: `on_event` should be called.
+           to this: `on_event\` should be called.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: a previous inline code might be longer than expected
+            change: Therefore, if the `Filter will change the value returned by this
+           to this: Therefore, if the `Filter` will change the value returned by this
+   = help: if you meant to use a literal backtick, escape it
+            change: [`rebuild_interest_cache`][rebuild] is called after the value of the max
+           to this: [`rebuild_interest_cache\`][rebuild] is called after the value of the max
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:11:5
+   |
+LL | /// `
+   |     ^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:18:7
+   |
+LL | /// \`
+   |       ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `\`
+   |     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \\`
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:25:6
+   |
+LL | /// [`link1]
+   |      ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// [`link1`]
+   |            +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [\`link1]
+   |      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:29:11
+   |
+LL | /// [link2`]
+   |           ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// [`link2`]
+   |      +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [link2\`]
+   |           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:33:6
+   |
+LL | /// [`link_long](link_long)
+   |      ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// [`link_long`](link_long)
+   |                +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [\`link_long](link_long)
+   |      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:37:6
+   |
+LL | /// [`broken-link]
+   |      ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// [`broken-link`]
+   |                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [\`broken-link]
+   |      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:44:8
+   |
+LL | /// <x:`>
+   |        ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `<x:`>
+   |     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// <x:\`>
+   |        +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:54:6
+   |
+LL | /// 🦀`🦀
+   |       ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `🦀`🦀
+   |     +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// 🦀`🦀`
+   |          +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// 🦀\`🦀
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:58:5
+   |
+LL | /// `foo(
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// `foo(`
+   |          +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`foo(
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:64:14
+   |
+LL | /// `foo `bar`
+   |              ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// `foo` `bar`
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// `foo `bar\`
+   |              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:70:5
+   |
+LL | /// `foo(
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// not paragraph`
+   |                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`foo(
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:75:83
+   |
+LL | /// Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+   |                                                                                   ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                               +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that add(a, b)` is the same as `add(b, a)\`.
+   |                                                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:79:51
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, b)`)!
+   |                                                   ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL | /// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+   |                                                            +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, b)\`)!
+   |                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:83:83
+   |
+LL | /// Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+   |                                                                                   ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                                         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that `add(a, b) is the same as `add(b, a)\`.
+   |                                                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:87:51
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)`)!
+   |                                                   ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+   |                                                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)\`)!
+   |                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:91:83
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+   |                                                                                   ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                                                          +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as add(b, a)\`.
+   |                                                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:95:50
+   |
+LL | /// or even to add a number `n` to 42 (add(42, n)`)!
+   |                                                  ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)`)!
+   |                                        +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (add(42, n)\`)!
+   |                                                  +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:99:74
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+   |                                                                          ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                                                                    +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as \`add(b, a).
+   |                                                                          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:103:51
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)`)!
+   |                                                   ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+   |                                                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)\`)!
+   |                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:107:1
+   |
+LL | #[doc = "`"]
+   | ^^^^^^^^^^^^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+   = help: if you meant to use a literal backtick, escape it
+            change: `
+           to this: \`
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:114:1
+   |
+LL | #[doc = concat!("\\", "`")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the opening backtick of an inline code may be missing
+            change: \`
+           to this: `\`
+   = help: if you meant to use a literal backtick, escape it
+            change: \`
+           to this: \\`
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:118:1
+   |
+LL | #[doc = "Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the opening backtick of a previous inline code may be missing
+            change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:122:1
+   |
+LL | #[doc = "Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: a previous inline code might be longer than expected
+            change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:126:1
+   |
+LL | #[doc = "Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the opening backtick of an inline code may be missing
+            change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:130:1
+   |
+LL | #[doc = "Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the closing backtick of an inline code may be missing
+            change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+           to this: Addition is commutative, which means that `add(a, b)` is the same as \`add(b, a).
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:135:5
+   |
+LL | /// `foo
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// `foo`
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`foo
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:139:7
+   |
+LL | /// # `(heading
+   |       ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// # `(heading`
+   |                +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// # \`(heading
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:141:17
+   |
+LL | /// ## heading2)`
+   |                 ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// ## `heading2)`
+   |        +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// ## heading2)\`
+   |                 +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:144:11
+   |
+LL | /// multi `(
+   |           ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// )` heading
+   |      +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// multi \`(
+   |           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:150:10
+   |
+LL | /// para)`(graph
+   |          ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `para)`(graph
+   |     +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// para)`(graph`
+   |                 +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// para)\`(graph
+   |          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:153:10
+   |
+LL | /// para)`(graph2
+   |          ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `para)`(graph2
+   |     +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// para)`(graph2`
+   |                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// para)\`(graph2
+   |          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:156:12
+   |
+LL | /// 1. foo)`
+   |            ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// 1. `foo)`
+   |        +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// 1. foo)\`
+   |            +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:158:8
+   |
+LL | /// 2. `(bar
+   |        ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// 2. `(bar`
+   |             +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// 2. \`(bar
+   |        +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:160:11
+   |
+LL | /// * baz)`
+   |           ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// * `baz)`
+   |       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// * baz)\`
+   |           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:162:7
+   |
+LL | /// * `(quux
+   |       ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// * `(quux`
+   |             +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// * \`(quux
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:165:5
+   |
+LL | /// `#![this_is_actually_an_image(and(not), an = "attribute")]
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// `#`![this_is_actually_an_image(and(not), an = "attribute")]
+   |       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`#![this_is_actually_an_image(and(not), an = "attribute")]
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:168:62
+   |
+LL | /// #![this_is_actually_an_image(and(not), an = "attribute")]`
+   |                                                              ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `#![this_is_actually_an_image(and(not), an = "attribute")]`
+   |     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// #![this_is_actually_an_image(and(not), an = "attribute")]\`
+   |                                                              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:173:7
+   |
+LL | /// | `table( | )head` |
+   |       ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// | `table(` | )head` |
+   |              +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | \`table( | )head` |
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:173:22
+   |
+LL | /// | `table( | )head` |
+   |                      ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// | `table( | `)head` |
+   |                 +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | `table( | )head\` |
+   |                      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:177:12
+   |
+LL | /// | table`( | )`body |
+   |            ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// | `table`( | )`body |
+   |       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | table\`( | )`body |
+   |            +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:177:18
+   |
+LL | /// | table`( | )`body |
+   |                  ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// | table`( | `)`body |
+   |                 +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// | table`( | )`body` |
+   |                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | table`( | )\`body |
+   |                  +
+
+error: aborting due to 63 previous errors
+
diff --git a/tests/rustdoc/deref-const-fn.rs b/tests/rustdoc/deref/deref-const-fn.rs
index 8ecca6d12d2..8ecca6d12d2 100644
--- a/tests/rustdoc/deref-const-fn.rs
+++ b/tests/rustdoc/deref/deref-const-fn.rs
diff --git a/tests/rustdoc/deref/deref-multiple-impl-blocks.rs b/tests/rustdoc/deref/deref-multiple-impl-blocks.rs
new file mode 100644
index 00000000000..fa3607c5fc1
--- /dev/null
+++ b/tests/rustdoc/deref/deref-multiple-impl-blocks.rs
@@ -0,0 +1,43 @@
+#![crate_name="foo"]
+
+use std::ops::{Deref, DerefMut};
+
+// @has foo/struct.Vec.html
+// @count - '//h2[@id="deref-methods-Slice"]' 1
+// @count - '//div[@id="deref-methods-Slice-1"]' 1
+// @count - '//div[@id="deref-methods-Slice-1"][@class="impl-items"]' 1
+// @count - '//div[@id="deref-methods-Slice-1"]/div[@class="impl-items"]' 0
+pub struct Vec;
+
+pub struct Slice;
+
+impl Deref for Vec {
+    type Target = Slice;
+    fn deref(&self) -> &Slice {
+        &Slice
+    }
+}
+
+impl DerefMut for Vec {
+    fn deref_mut(&mut self) -> &mut Slice {
+        &mut Slice
+    }
+}
+
+impl Slice {
+    pub fn sort_floats(&mut self) {
+        todo!();
+    }
+}
+
+impl Slice {
+    pub fn sort(&mut self) {
+        todo!();
+    }
+}
+
+impl Slice {
+    pub fn len(&self) {
+        todo!();
+    }
+}
diff --git a/tests/rustdoc/deref-mut-methods.rs b/tests/rustdoc/deref/deref-mut-methods.rs
index fdf8434224f..fdf8434224f 100644
--- a/tests/rustdoc/deref-mut-methods.rs
+++ b/tests/rustdoc/deref/deref-mut-methods.rs
diff --git a/tests/rustdoc/deref-recursive-pathbuf.rs b/tests/rustdoc/deref/deref-recursive-pathbuf.rs
index be2b42b5ac6..be2b42b5ac6 100644
--- a/tests/rustdoc/deref-recursive-pathbuf.rs
+++ b/tests/rustdoc/deref/deref-recursive-pathbuf.rs
diff --git a/tests/rustdoc/deref-recursive.rs b/tests/rustdoc/deref/deref-recursive.rs
index 0436f2f86f5..0436f2f86f5 100644
--- a/tests/rustdoc/deref-recursive.rs
+++ b/tests/rustdoc/deref/deref-recursive.rs
diff --git a/tests/rustdoc/deref-slice-core.rs b/tests/rustdoc/deref/deref-slice-core.rs
index cccf273a820..cccf273a820 100644
--- a/tests/rustdoc/deref-slice-core.rs
+++ b/tests/rustdoc/deref/deref-slice-core.rs
diff --git a/tests/rustdoc/deref-to-primitive.rs b/tests/rustdoc/deref/deref-to-primitive.rs
index 527de780d48..527de780d48 100644
--- a/tests/rustdoc/deref-to-primitive.rs
+++ b/tests/rustdoc/deref/deref-to-primitive.rs
diff --git a/tests/rustdoc/deref-typedef.rs b/tests/rustdoc/deref/deref-typedef.rs
index 32424d13eb8..32424d13eb8 100644
--- a/tests/rustdoc/deref-typedef.rs
+++ b/tests/rustdoc/deref/deref-typedef.rs
diff --git a/tests/rustdoc/escape-deref-methods.rs b/tests/rustdoc/deref/escape-deref-methods.rs
index 66919d73eeb..66919d73eeb 100644
--- a/tests/rustdoc/escape-deref-methods.rs
+++ b/tests/rustdoc/deref/escape-deref-methods.rs
diff --git a/tests/rustdoc/issue-100679-sidebar-links-deref.rs b/tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs
index f09d2320609..f09d2320609 100644
--- a/tests/rustdoc/issue-100679-sidebar-links-deref.rs
+++ b/tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs
diff --git a/tests/rustdoc/recursive-deref-sidebar.rs b/tests/rustdoc/deref/recursive-deref-sidebar.rs
index 619f40eff89..619f40eff89 100644
--- a/tests/rustdoc/recursive-deref-sidebar.rs
+++ b/tests/rustdoc/deref/recursive-deref-sidebar.rs
diff --git a/tests/rustdoc/recursive-deref.rs b/tests/rustdoc/deref/recursive-deref.rs
index aa38485c445..aa38485c445 100644
--- a/tests/rustdoc/recursive-deref.rs
+++ b/tests/rustdoc/deref/recursive-deref.rs
diff --git a/tests/rustdoc/inline_cross/auxiliary/repr.rs b/tests/rustdoc/inline_cross/auxiliary/repr.rs
new file mode 100644
index 00000000000..4a6648a6439
--- /dev/null
+++ b/tests/rustdoc/inline_cross/auxiliary/repr.rs
@@ -0,0 +1,22 @@
+#![feature(repr_simd)]
+
+#[repr(C, align(8))]
+pub struct ReprC {
+    field: u8,
+}
+#[repr(simd, packed(2))]
+pub struct ReprSimd {
+    field: u8,
+}
+#[repr(transparent)]
+pub struct ReprTransparent {
+    field: u8,
+}
+#[repr(isize)]
+pub enum ReprIsize {
+    Bla,
+}
+#[repr(u8)]
+pub enum ReprU8 {
+    Bla,
+}
diff --git a/tests/rustdoc/inline_cross/repr.rs b/tests/rustdoc/inline_cross/repr.rs
new file mode 100644
index 00000000000..9e107cee9e9
--- /dev/null
+++ b/tests/rustdoc/inline_cross/repr.rs
@@ -0,0 +1,29 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/110698>.
+// This test ensures that the re-exported items still have the `#[repr(...)]` attribute.
+
+// aux-build:repr.rs
+
+#![crate_name = "foo"]
+
+extern crate repr;
+
+// @has 'foo/struct.ReprC.html'
+// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C, align(8))]'
+#[doc(inline)]
+pub use repr::ReprC;
+// @has 'foo/struct.ReprSimd.html'
+// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(simd, packed(2))]'
+#[doc(inline)]
+pub use repr::ReprSimd;
+// @has 'foo/struct.ReprTransparent.html'
+// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]'
+#[doc(inline)]
+pub use repr::ReprTransparent;
+// @has 'foo/enum.ReprIsize.html'
+// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(isize)]'
+#[doc(inline)]
+pub use repr::ReprIsize;
+// @has 'foo/enum.ReprU8.html'
+// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(u8)]'
+#[doc(inline)]
+pub use repr::ReprU8;
diff --git a/tests/rustdoc/issue-106142.rs b/tests/rustdoc/issue-106142.rs
new file mode 100644
index 00000000000..41505e72405
--- /dev/null
+++ b/tests/rustdoc/issue-106142.rs
@@ -0,0 +1,14 @@
+// @has 'issue_106142/a/index.html'
+// @count 'issue_106142/a/index.html' '//ul[@class="item-table"]//li//a' 1
+
+#![allow(rustdoc::broken_intra_doc_links)]
+
+pub mod a {
+    /// [`m`]
+    pub fn f() {}
+
+    #[macro_export]
+    macro_rules! m {
+        () => {};
+    }
+}
diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
index eaf3e4b61e3..c0fbb0204b3 100644
--- a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
+++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
@@ -2,38 +2,34 @@ print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:21:21: 24:2]`:
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Suspend0`: 3077 bytes
-print-type-size         local `.__awaitee`: 3077 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         local `.__awaitee`: 3077 bytes
 print-type-size     variant `Returned`: 0 bytes
 print-type-size     variant `Panicked`: 0 bytes
 print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]`: 3077 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
-print-type-size     variant `Unresumed`: 2051 bytes
-print-type-size         padding: 1026 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size     variant `Unresumed`: 1025 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size     variant `Suspend0`: 2052 bytes
-print-type-size         local `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
-print-type-size         local `..generator_field4`: 1 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size         padding: 1 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `..generator_field4`: 1 bytes
 print-type-size         local `.__awaitee`: 1 bytes
 print-type-size     variant `Suspend1`: 3076 bytes
-print-type-size         padding: 1024 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         padding: 1026 bytes
 print-type-size         local `..generator_field4`: 1 bytes, alignment: 1 bytes
-print-type-size         padding: 1 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
 print-type-size         local `.__awaitee`: 1025 bytes
 print-type-size     variant `Suspend2`: 2052 bytes
-print-type-size         local `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
-print-type-size         local `..generator_field4`: 1 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size         padding: 1 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `..generator_field4`: 1 bytes
 print-type-size         local `.__awaitee`: 1 bytes
-print-type-size     variant `Returned`: 2051 bytes
-print-type-size         padding: 1026 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
-print-type-size     variant `Panicked`: 2051 bytes
-print-type-size         padding: 1026 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size     variant `Returned`: 1025 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size     variant `Panicked`: 1025 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]>`: 3077 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 3077 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]>`: 3077 bytes, alignment: 1 bytes
@@ -43,11 +39,11 @@ print-type-size         field `.value`: 3077 bytes
 print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]`: 1025 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 1024 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]>`: 1025 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 1025 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]>`: 1025 bytes, alignment: 1 bytes
diff --git a/tests/ui/async-await/future-sizes/large-arg.stdout b/tests/ui/async-await/future-sizes/large-arg.stdout
index 91db4b1531f..b5e95ddd710 100644
--- a/tests/ui/async-await/future-sizes/large-arg.stdout
+++ b/tests/ui/async-await/future-sizes/large-arg.stdout
@@ -2,20 +2,20 @@ print-type-size type: `[async fn body@$DIR/large-arg.rs:6:21: 8:2]`: 3076 bytes,
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Suspend0`: 3075 bytes
-print-type-size         local `.__awaitee`: 3075 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         local `.__awaitee`: 3075 bytes
 print-type-size     variant `Returned`: 0 bytes
 print-type-size     variant `Panicked`: 0 bytes
 print-type-size type: `[async fn body@$DIR/large-arg.rs:10:30: 12:2]`: 3075 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Suspend0`: 3074 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size         local `.__awaitee`: 2050 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:10:30: 12:2]>`: 3075 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 3075 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:10:30: 12:2]>`: 3075 bytes, alignment: 1 bytes
@@ -25,14 +25,14 @@ print-type-size         field `.value`: 3075 bytes
 print-type-size type: `[async fn body@$DIR/large-arg.rs:13:26: 15:2]`: 2050 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Suspend0`: 2049 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size         local `.__awaitee`: 1025 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:13:26: 15:2]>`: 2050 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 2050 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:13:26: 15:2]>`: 2050 bytes, alignment: 1 bytes
@@ -42,11 +42,11 @@ print-type-size         field `.value`: 2050 bytes
 print-type-size type: `[async fn body@$DIR/large-arg.rs:16:26: 18:2]`: 1025 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:16:26: 18:2]>`: 1025 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 1025 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:16:26: 18:2]>`: 1025 bytes, alignment: 1 bytes
diff --git a/tests/ui/async-await/in-trait/nested-rpit.rs b/tests/ui/async-await/in-trait/nested-rpit.rs
index 41d72ebb4d4..9cdc23bbc78 100644
--- a/tests/ui/async-await/in-trait/nested-rpit.rs
+++ b/tests/ui/async-await/in-trait/nested-rpit.rs
@@ -1,7 +1,5 @@
 // edition: 2021
-// known-bug: #105197
-// failure-status:101
-// dont-check-compiler-stderr
+// check-pass
 
 #![feature(async_fn_in_trait)]
 #![feature(return_position_impl_trait_in_trait)]
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.rs b/tests/ui/async-await/return-type-notation/issue-110963-early.rs
new file mode 100644
index 00000000000..0ecbca5c13b
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.rs
@@ -0,0 +1,48 @@
+// edition: 2021
+// known-bug: #110963
+
+#![feature(return_type_notation)]
+#![feature(async_fn_in_trait)]
+
+trait HealthCheck {
+    async fn check<'a: 'a>(&'a mut self) -> bool;
+}
+
+async fn do_health_check_par<HC>(hc: HC)
+where
+    HC: HealthCheck<check(): Send> + Send + 'static,
+{
+    spawn(async move {
+        let mut hc = hc;
+        if !hc.check().await {
+            log_health_check_failure().await;
+        }
+    });
+}
+
+async fn log_health_check_failure() {}
+
+fn main() {}
+
+// Fake tokio spawn
+
+use std::future::Future;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+
+fn spawn<F>(future: F) -> JoinHandle
+where
+    F: Future + Send + 'static,
+    F::Output: Send + 'static,
+{
+    loop {}
+}
+
+struct JoinHandle;
+
+impl Future for JoinHandle {
+    type Output = ();
+    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+        loop {}
+    }
+}
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.stderr b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
new file mode 100644
index 00000000000..b4a3924d8da
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
@@ -0,0 +1,45 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-early.rs:4:12
+   |
+LL | #![feature(return_type_notation)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-early.rs:5:12
+   |
+LL | #![feature(async_fn_in_trait)]
+   |            ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
+
+error: higher-ranked lifetime error
+  --> $DIR/issue-110963-early.rs:15:5
+   |
+LL | /     spawn(async move {
+LL | |         let mut hc = hc;
+LL | |         if !hc.check().await {
+LL | |             log_health_check_failure().await;
+LL | |         }
+LL | |     });
+   | |______^
+   |
+   = note: could not prove `[async block@$DIR/issue-110963-early.rs:15:11: 20:6]: Send`
+
+error: higher-ranked lifetime error
+  --> $DIR/issue-110963-early.rs:15:5
+   |
+LL | /     spawn(async move {
+LL | |         let mut hc = hc;
+LL | |         if !hc.check().await {
+LL | |             log_health_check_failure().await;
+LL | |         }
+LL | |     });
+   | |______^
+   |
+   = note: could not prove `[async block@$DIR/issue-110963-early.rs:15:11: 20:6]: Send`
+
+error: aborting due to 2 previous errors; 2 warnings emitted
+
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.rs b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
new file mode 100644
index 00000000000..2a35922eaa1
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
@@ -0,0 +1,50 @@
+// edition: 2021
+// check-pass
+
+#![feature(return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+#![feature(async_fn_in_trait)]
+//~^ WARN the feature `async_fn_in_trait` is incomplete
+
+trait HealthCheck {
+    async fn check(&mut self) -> bool;
+}
+
+async fn do_health_check_par<HC>(hc: HC)
+where
+    HC: HealthCheck<check(): Send> + Send + 'static,
+{
+    spawn(async move {
+        let mut hc = hc;
+        if !hc.check().await {
+            log_health_check_failure().await;
+        }
+    });
+}
+
+async fn log_health_check_failure() {}
+
+fn main() {}
+
+// Fake tokio spawn
+
+use std::future::Future;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+
+fn spawn<F>(future: F) -> JoinHandle
+where
+    F: Future + Send + 'static,
+    F::Output: Send + 'static,
+{
+    loop {}
+}
+
+struct JoinHandle;
+
+impl Future for JoinHandle {
+    type Output = ();
+    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+        loop {}
+    }
+}
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.stderr b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
new file mode 100644
index 00000000000..36ef3ad0a4c
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
@@ -0,0 +1,19 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-late.rs:4:12
+   |
+LL | #![feature(return_type_notation)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-late.rs:6:12
+   |
+LL | #![feature(async_fn_in_trait)]
+   |            ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/attributes/invalid-doc-attr.rs b/tests/ui/attributes/invalid-doc-attr.rs
index de004b41e27..c231e43b35c 100644
--- a/tests/ui/attributes/invalid-doc-attr.rs
+++ b/tests/ui/attributes/invalid-doc-attr.rs
@@ -5,7 +5,7 @@
 //~^ ERROR can only be applied at the crate level
 //~| WARN is being phased out
 //~| HELP to apply to the crate, use an inner attribute
-//~| SUGGESTION #![doc(test(no_crate_inject))]
+//~| SUGGESTION !
 #[doc(inline)]
 //~^ ERROR can only be applied to a `use` item
 //~| WARN is being phased out
diff --git a/tests/ui/attributes/invalid-doc-attr.stderr b/tests/ui/attributes/invalid-doc-attr.stderr
index 3c66e587b47..b23b8ded867 100644
--- a/tests/ui/attributes/invalid-doc-attr.stderr
+++ b/tests/ui/attributes/invalid-doc-attr.stderr
@@ -16,7 +16,7 @@ LL | #![deny(warnings)]
 help: to apply to the crate, use an inner attribute
    |
 LL | #![doc(test(no_crate_inject))]
-   |
+   |  +
 
 error: this attribute can only be applied to a `use` item
   --> $DIR/invalid-doc-attr.rs:9:7
diff --git a/tests/ui/attributes/invalid_macro_export_argument.deny.stderr b/tests/ui/attributes/invalid_macro_export_argument.deny.stderr
new file mode 100644
index 00000000000..644acc27b58
--- /dev/null
+++ b/tests/ui/attributes/invalid_macro_export_argument.deny.stderr
@@ -0,0 +1,20 @@
+error: `#[macro_export]` can only take 1 or 0 arguments
+  --> $DIR/invalid_macro_export_argument.rs:7:1
+   |
+LL | #[macro_export(hello, world)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/invalid_macro_export_argument.rs:4:24
+   |
+LL | #![cfg_attr(deny, deny(invalid_macro_export_arguments))]
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `not_local_inner_macros` isn't a valid `#[macro_export]` argument
+  --> $DIR/invalid_macro_export_argument.rs:13:16
+   |
+LL | #[macro_export(not_local_inner_macros)]
+   |                ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/attributes/invalid_macro_export_argument.rs b/tests/ui/attributes/invalid_macro_export_argument.rs
index 85d009f11a6..a0ed5fd1c8f 100644
--- a/tests/ui/attributes/invalid_macro_export_argument.rs
+++ b/tests/ui/attributes/invalid_macro_export_argument.rs
@@ -1,10 +1,17 @@
-// check-pass
-#[macro_export(hello, world)] //~ WARN `#[macro_export]` can only take 1 or 0 arguments
+// revisions: deny allow
+//[allow] check-pass
+
+#![cfg_attr(deny, deny(invalid_macro_export_arguments))]
+#![cfg_attr(allow, allow(invalid_macro_export_arguments))]
+
+#[macro_export(hello, world)]
+//[deny]~^ ERROR `#[macro_export]` can only take 1 or 0 arguments
 macro_rules! a {
     () => ()
 }
 
-#[macro_export(not_local_inner_macros)] //~ WARN `not_local_inner_macros` isn't a valid `#[macro_export]` argument
+#[macro_export(not_local_inner_macros)]
+//[deny]~^ ERROR `not_local_inner_macros` isn't a valid `#[macro_export]` argument
 macro_rules! b {
     () => ()
 }
diff --git a/tests/ui/attributes/invalid_macro_export_argument.stderr b/tests/ui/attributes/invalid_macro_export_argument.stderr
deleted file mode 100644
index a4e17642c2a..00000000000
--- a/tests/ui/attributes/invalid_macro_export_argument.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-warning: `#[macro_export]` can only take 1 or 0 arguments
-  --> $DIR/invalid_macro_export_argument.rs:2:1
-   |
-LL | #[macro_export(hello, world)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(invalid_macro_export_arguments)]` on by default
-
-warning: `not_local_inner_macros` isn't a valid `#[macro_export]` argument
-  --> $DIR/invalid_macro_export_argument.rs:7:16
-   |
-LL | #[macro_export(not_local_inner_macros)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/binding/issue-53114-safety-checks.stderr b/tests/ui/binding/issue-53114-safety-checks.stderr
index 41318d0a38a..349c4639a9e 100644
--- a/tests/ui/binding/issue-53114-safety-checks.stderr
+++ b/tests/ui/binding/issue-53114-safety-checks.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &p.b;
    |             ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let (_,) = (&p.b,);
    |                 ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -22,7 +24,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _: _ = &p.b;
    |                ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -31,7 +34,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let (_,): _ = (&p.b,);
    |                    ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -40,7 +44,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     match &p.b  { _ => { } }
    |           ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -49,7 +54,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     match (&p.b,)  { (_,) => { } }
    |            ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
diff --git a/tests/ui/binop/eq-arr.rs b/tests/ui/binop/eq-arr.rs
new file mode 100644
index 00000000000..a77c4c5aabc
--- /dev/null
+++ b/tests/ui/binop/eq-arr.rs
@@ -0,0 +1,7 @@
+fn main() {
+    struct X;
+    //~^ HELP consider annotating `X` with `#[derive(PartialEq)]`
+    let xs = [X, X, X];
+    let eq = xs == [X, X, X];
+    //~^ ERROR binary operation `==` cannot be applied to type `[X; 3]`
+}
diff --git a/tests/ui/binop/eq-arr.stderr b/tests/ui/binop/eq-arr.stderr
new file mode 100644
index 00000000000..a22f8e3ab0c
--- /dev/null
+++ b/tests/ui/binop/eq-arr.stderr
@@ -0,0 +1,22 @@
+error[E0369]: binary operation `==` cannot be applied to type `[X; 3]`
+  --> $DIR/eq-arr.rs:5:17
+   |
+LL |     let eq = xs == [X, X, X];
+   |              -- ^^ --------- [X; 3]
+   |              |
+   |              [X; 3]
+   |
+note: an implementation of `PartialEq` might be missing for `X`
+  --> $DIR/eq-arr.rs:2:5
+   |
+LL |     struct X;
+   |     ^^^^^^^^ must implement `PartialEq`
+help: consider annotating `X` with `#[derive(PartialEq)]`
+   |
+LL +     #[derive(PartialEq)]
+LL |     struct X;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/eq-vec.rs b/tests/ui/binop/eq-vec.rs
new file mode 100644
index 00000000000..17ce8df8564
--- /dev/null
+++ b/tests/ui/binop/eq-vec.rs
@@ -0,0 +1,13 @@
+fn main() {
+    #[derive(Debug)]
+    enum Foo {
+        //~^ HELP consider annotating `Foo` with `#[derive(PartialEq)]`
+        Bar,
+        Qux,
+    }
+
+    let vec1 = vec![Foo::Bar, Foo::Qux];
+    let vec2 = vec![Foo::Bar, Foo::Qux];
+    assert_eq!(vec1, vec2);
+    //~^ ERROR binary operation `==` cannot be applied to type `Vec<Foo>`
+}
diff --git a/tests/ui/binop/eq-vec.stderr b/tests/ui/binop/eq-vec.stderr
new file mode 100644
index 00000000000..0a98cddfe05
--- /dev/null
+++ b/tests/ui/binop/eq-vec.stderr
@@ -0,0 +1,24 @@
+error[E0369]: binary operation `==` cannot be applied to type `Vec<Foo>`
+  --> $DIR/eq-vec.rs:11:5
+   |
+LL |     assert_eq!(vec1, vec2);
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     |
+   |     Vec<Foo>
+   |     Vec<Foo>
+   |
+note: an implementation of `PartialEq` might be missing for `Foo`
+  --> $DIR/eq-vec.rs:3:5
+   |
+LL |     enum Foo {
+   |     ^^^^^^^^ must implement `PartialEq`
+   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider annotating `Foo` with `#[derive(PartialEq)]`
+   |
+LL +     #[derive(PartialEq)]
+LL |     enum Foo {
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/issue-28837.stderr b/tests/ui/binop/issue-28837.stderr
index bb9f3b8af0f..6c98edd3af8 100644
--- a/tests/ui/binop/issue-28837.stderr
+++ b/tests/ui/binop/issue-28837.stderr
@@ -6,11 +6,11 @@ LL |     a + a;
    |     |
    |     A
    |
-note: an implementation of `Add<_>` might be missing for `A`
+note: an implementation of `Add` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^ must implement `Add`
 note: the trait `Add` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -22,11 +22,11 @@ LL |     a - a;
    |     |
    |     A
    |
-note: an implementation of `Sub<_>` might be missing for `A`
+note: an implementation of `Sub` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Sub<_>`
+   | ^^^^^^^^ must implement `Sub`
 note: the trait `Sub` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -38,11 +38,11 @@ LL |     a * a;
    |     |
    |     A
    |
-note: an implementation of `Mul<_>` might be missing for `A`
+note: an implementation of `Mul` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Mul<_>`
+   | ^^^^^^^^ must implement `Mul`
 note: the trait `Mul` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -54,11 +54,11 @@ LL |     a / a;
    |     |
    |     A
    |
-note: an implementation of `Div<_>` might be missing for `A`
+note: an implementation of `Div` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Div<_>`
+   | ^^^^^^^^ must implement `Div`
 note: the trait `Div` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -70,11 +70,11 @@ LL |     a % a;
    |     |
    |     A
    |
-note: an implementation of `Rem<_>` might be missing for `A`
+note: an implementation of `Rem` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Rem<_>`
+   | ^^^^^^^^ must implement `Rem`
 note: the trait `Rem` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -86,11 +86,11 @@ LL |     a & a;
    |     |
    |     A
    |
-note: an implementation of `BitAnd<_>` might be missing for `A`
+note: an implementation of `BitAnd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `BitAnd<_>`
+   | ^^^^^^^^ must implement `BitAnd`
 note: the trait `BitAnd` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -102,11 +102,11 @@ LL |     a | a;
    |     |
    |     A
    |
-note: an implementation of `BitOr<_>` might be missing for `A`
+note: an implementation of `BitOr` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `BitOr<_>`
+   | ^^^^^^^^ must implement `BitOr`
 note: the trait `BitOr` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -118,11 +118,11 @@ LL |     a << a;
    |     |
    |     A
    |
-note: an implementation of `Shl<_>` might be missing for `A`
+note: an implementation of `Shl` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Shl<_>`
+   | ^^^^^^^^ must implement `Shl`
 note: the trait `Shl` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -134,11 +134,11 @@ LL |     a >> a;
    |     |
    |     A
    |
-note: an implementation of `Shr<_>` might be missing for `A`
+note: an implementation of `Shr` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Shr<_>`
+   | ^^^^^^^^ must implement `Shr`
 note: the trait `Shr` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -150,11 +150,11 @@ LL |     a == a;
    |     |
    |     A
    |
-note: an implementation of `PartialEq<_>` might be missing for `A`
+note: an implementation of `PartialEq` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^ must implement `PartialEq`
 help: consider annotating `A` with `#[derive(PartialEq)]`
    |
 LL + #[derive(PartialEq)]
@@ -169,11 +169,11 @@ LL |     a != a;
    |     |
    |     A
    |
-note: an implementation of `PartialEq<_>` might be missing for `A`
+note: an implementation of `PartialEq` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^ must implement `PartialEq`
 help: consider annotating `A` with `#[derive(PartialEq)]`
    |
 LL + #[derive(PartialEq)]
@@ -188,11 +188,11 @@ LL |     a < a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
@@ -207,11 +207,11 @@ LL |     a <= a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
@@ -226,11 +226,11 @@ LL |     a > a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
@@ -245,11 +245,11 @@ LL |     a >= a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
diff --git a/tests/ui/binop/issue-3820.stderr b/tests/ui/binop/issue-3820.stderr
index c313ed6037f..cfa78a41dbf 100644
--- a/tests/ui/binop/issue-3820.stderr
+++ b/tests/ui/binop/issue-3820.stderr
@@ -6,11 +6,11 @@ LL |     let w = u * 3;
    |             |
    |             Thing
    |
-note: an implementation of `Mul<_>` might be missing for `Thing`
+note: an implementation of `Mul<{integer}>` might be missing for `Thing`
   --> $DIR/issue-3820.rs:1:1
    |
 LL | struct Thing {
-   | ^^^^^^^^^^^^ must implement `Mul<_>`
+   | ^^^^^^^^^^^^ must implement `Mul<{integer}>`
 note: the trait `Mul` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
index 9c2c434572a..8c44229bceb 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         println!("{}", foo.x);
    |                        ^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/coherence/coherence-overlap-negative-impls.rs b/tests/ui/coherence/coherence-overlap-negative-impls.rs
new file mode 100644
index 00000000000..cd1df53a528
--- /dev/null
+++ b/tests/ui/coherence/coherence-overlap-negative-impls.rs
@@ -0,0 +1,41 @@
+// check-pass
+// known-bug: #74629
+
+// Should fail. The `0` and `1` impls overlap, violating coherence. Eg, with
+// `T = Test, F = ()`, all bounds are true, making both impls applicable.
+// `Test: Fold<Nil>`, `Test: Fold<()>` are true because of `2`.
+// `Is<Test>: NotNil` is true because of `auto trait` and lack of negative impl.
+
+#![feature(negative_impls)]
+#![feature(auto_traits)]
+
+struct Nil;
+struct Cons<H>(H);
+struct Test;
+
+trait Fold<F> {}
+
+impl<T, F> Fold<F> for Cons<T> // 0
+where
+    T: Fold<Nil>,
+{}
+
+impl<T, F> Fold<F> for Cons<T> // 1
+where
+    T: Fold<F>,
+    private::Is<T>: private::NotNil,
+{}
+
+impl<F> Fold<F> for Test {} // 2
+
+mod private {
+    use crate::Nil;
+
+    pub struct Is<T>(T);
+    pub auto trait NotNil {}
+
+    #[allow(suspicious_auto_trait_impls)]
+    impl !NotNil for Is<Nil> {}
+}
+
+fn main() {}
diff --git a/tests/ui/const-ptr/forbidden_slices.stderr b/tests/ui/const-ptr/forbidden_slices.stderr
index b42361872c4..817cfb0acf9 100644
--- a/tests/ui/const-ptr/forbidden_slices.stderr
+++ b/tests/ui/const-ptr/forbidden_slices.stderr
@@ -131,8 +131,6 @@ error[E0080]: could not evaluate static initializer
    |
    = note: out-of-bounds pointer arithmetic: allocN has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
    |
-note: inside `ptr::const_ptr::<impl *const u32>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `ptr::const_ptr::<impl *const u32>::add`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `R2`
@@ -195,8 +193,6 @@ error[E0080]: could not evaluate static initializer
    |
    = note: out-of-bounds pointer arithmetic: allocN has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
    |
-note: inside `ptr::const_ptr::<impl *const u64>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `ptr::const_ptr::<impl *const u64>::add`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `R8`
diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
index a0f8dd097c7..a93b561e5be 100644
--- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
@@ -465,7 +465,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
-               00 10 00 00 00 00 00 00                         │ ........
+               00 00 00 00 00 10 00 00                         │ ........
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -476,7 +476,7 @@ LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unche
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
-               09 00 00 00 03 00 00 00                         │ ........
+               03 00 00 00 09 00 00 00                         │ ........
            }
 
 error[E0080]: it is undefined behavior to use this value
diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
index 9706f3ec2e0..a32d4863a38 100644
--- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
@@ -465,7 +465,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
-               00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+               00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 │ ................
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -476,7 +476,7 @@ LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unche
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
-               09 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 │ ................
+               03 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 │ ................
            }
 
 error[E0080]: it is undefined behavior to use this value
diff --git a/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr b/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
index 9fc25f2ade4..e3b17431f89 100644
--- a/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
@@ -7,11 +7,11 @@ LL | #[derive(PartialEq)]
 LL |      x: Error
    |      ^^^^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/derives-span-PartialEq-enum.stderr b/tests/ui/derives/derives-span-PartialEq-enum.stderr
index f56e784478d..d1631732a34 100644
--- a/tests/ui/derives/derives-span-PartialEq-enum.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-enum.stderr
@@ -7,11 +7,11 @@ LL | #[derive(PartialEq)]
 LL |      Error
    |      ^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/derives-span-PartialEq-struct.stderr b/tests/ui/derives/derives-span-PartialEq-struct.stderr
index 76c0b0104af..ab6c6951fc6 100644
--- a/tests/ui/derives/derives-span-PartialEq-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-struct.stderr
@@ -7,11 +7,11 @@ LL | struct Struct {
 LL |     x: Error
    |     ^^^^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr b/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
index 7dae01dbb99..865ecad0e8e 100644
--- a/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
@@ -7,11 +7,11 @@ LL | struct Struct(
 LL |     Error
    |     ^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-tuple-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/deriving-no-inner-impl-error-message.stderr b/tests/ui/derives/deriving-no-inner-impl-error-message.stderr
index 10af5d36ed9..ab99ba9fab5 100644
--- a/tests/ui/derives/deriving-no-inner-impl-error-message.stderr
+++ b/tests/ui/derives/deriving-no-inner-impl-error-message.stderr
@@ -7,11 +7,11 @@ LL | struct E {
 LL |     x: NoCloneOrEq
    |     ^^^^^^^^^^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `NoCloneOrEq`
+note: an implementation of `PartialEq` might be missing for `NoCloneOrEq`
   --> $DIR/deriving-no-inner-impl-error-message.rs:1:1
    |
 LL | struct NoCloneOrEq;
-   | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `NoCloneOrEq` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/destructuring-assignment/note-unsupported.stderr b/tests/ui/destructuring-assignment/note-unsupported.stderr
index 8a88332b73e..f556330070c 100644
--- a/tests/ui/destructuring-assignment/note-unsupported.stderr
+++ b/tests/ui/destructuring-assignment/note-unsupported.stderr
@@ -44,11 +44,11 @@ LL |     S { x: a, y: b } += s;
    |     |
    |     cannot use `+=` on type `S`
    |
-note: an implementation of `AddAssign<_>` might be missing for `S`
+note: an implementation of `AddAssign` might be missing for `S`
   --> $DIR/note-unsupported.rs:1:1
    |
 LL | struct S { x: u8, y: u8 }
-   | ^^^^^^^^ must implement `AddAssign<_>`
+   | ^^^^^^^^ must implement `AddAssign`
 note: the trait `AddAssign` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/feature-gates/test-listing-format-json.rs b/tests/ui/feature-gates/test-listing-format-json.rs
new file mode 100644
index 00000000000..2dd0e10b521
--- /dev/null
+++ b/tests/ui/feature-gates/test-listing-format-json.rs
@@ -0,0 +1,18 @@
+// no-prefer-dynamic
+// compile-flags: --test
+// run-flags: --list --format json -Zunstable-options
+// run-fail
+// check-run-results
+// ignore-nightly
+// unset-exec-env:RUSTC_BOOTSTRAP
+
+#![cfg(test)]
+#[test]
+fn m_test() {}
+
+#[test]
+#[ignore = "not yet implemented"]
+fn z_test() {}
+
+#[test]
+fn a_test() {}
diff --git a/tests/ui/feature-gates/test-listing-format-json.run.stderr b/tests/ui/feature-gates/test-listing-format-json.run.stderr
new file mode 100644
index 00000000000..e81cb81f32c
--- /dev/null
+++ b/tests/ui/feature-gates/test-listing-format-json.run.stderr
@@ -0,0 +1 @@
+error: the option `Z` is only accepted on the nightly compiler
diff --git a/tests/ui/fmt/ifmt-bad-arg.stderr b/tests/ui/fmt/ifmt-bad-arg.stderr
index bf18fb315c9..ed008c454a3 100644
--- a/tests/ui/fmt/ifmt-bad-arg.stderr
+++ b/tests/ui/fmt/ifmt-bad-arg.stderr
@@ -307,7 +307,7 @@ LL |     println!("{} {:.*} {}", 1, 3.2, 4);
    = note: expected reference `&usize`
               found reference `&{float}`
 note: associated function defined here
-  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
@@ -321,7 +321,7 @@ LL |     println!("{} {:07$.*} {}", 1, 3.2, 4);
    = note: expected reference `&usize`
               found reference `&{float}`
 note: associated function defined here
-  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 38 previous errors
diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr
index dc2dee3f341..cc316e55f5c 100644
--- a/tests/ui/fmt/ifmt-unimpl.stderr
+++ b/tests/ui/fmt/ifmt-unimpl.stderr
@@ -17,9 +17,9 @@ LL |     format!("{:X}", "3");
              NonZeroIsize
            and 21 others
    = note: required for `&str` to implement `UpperHex`
-note: required by a bound in `core::fmt::ArgumentV1::<'a>::new_upper_hex`
-  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
-   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `arg_new` (in Nightly builds, run with -Z macro-backtrace for more info)
+note: required by a bound in `core::fmt::rt::Argument::<'a>::new_upper_hex`
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
+   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/fmt/send-sync.stderr b/tests/ui/fmt/send-sync.stderr
index d43f4f0d957..b517a342e63 100644
--- a/tests/ui/fmt/send-sync.stderr
+++ b/tests/ui/fmt/send-sync.stderr
@@ -1,16 +1,16 @@
-error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
+error[E0277]: `core::fmt::rt::Opaque` cannot be shared between threads safely
   --> $DIR/send-sync.rs:8:10
    |
 LL |     send(format_args!("{:?}", c));
-   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::Opaque` cannot be shared between threads safely
+   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::rt::Opaque` cannot be shared between threads safely
    |     |
    |     required by a bound introduced by this call
    |
-   = help: within `[core::fmt::ArgumentV1<'_>]`, the trait `Sync` is not implemented for `core::fmt::Opaque`
-   = note: required because it appears within the type `&core::fmt::Opaque`
-   = note: required because it appears within the type `ArgumentV1<'_>`
-   = note: required because it appears within the type `[ArgumentV1<'_>]`
-   = note: required for `&[core::fmt::ArgumentV1<'_>]` to implement `Send`
+   = help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
+   = note: required because it appears within the type `&core::fmt::rt::Opaque`
+   = note: required because it appears within the type `Argument<'_>`
+   = note: required because it appears within the type `[Argument<'_>]`
+   = note: required for `&[core::fmt::rt::Argument<'_>]` to implement `Send`
    = note: required because it appears within the type `Arguments<'_>`
 note: required by a bound in `send`
   --> $DIR/send-sync.rs:1:12
@@ -18,19 +18,19 @@ note: required by a bound in `send`
 LL | fn send<T: Send>(_: T) {}
    |            ^^^^ required by this bound in `send`
 
-error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
+error[E0277]: `core::fmt::rt::Opaque` cannot be shared between threads safely
   --> $DIR/send-sync.rs:9:10
    |
 LL |     sync(format_args!("{:?}", c));
-   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::Opaque` cannot be shared between threads safely
+   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::rt::Opaque` cannot be shared between threads safely
    |     |
    |     required by a bound introduced by this call
    |
-   = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::Opaque`
-   = note: required because it appears within the type `&core::fmt::Opaque`
-   = note: required because it appears within the type `ArgumentV1<'_>`
-   = note: required because it appears within the type `[ArgumentV1<'_>]`
-   = note: required because it appears within the type `&[ArgumentV1<'_>]`
+   = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
+   = note: required because it appears within the type `&core::fmt::rt::Opaque`
+   = note: required because it appears within the type `Argument<'_>`
+   = note: required because it appears within the type `[Argument<'_>]`
+   = note: required because it appears within the type `&[Argument<'_>]`
    = note: required because it appears within the type `Arguments<'_>`
 note: required by a bound in `sync`
   --> $DIR/send-sync.rs:2:12
diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs b/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs
new file mode 100644
index 00000000000..9408acc15f9
--- /dev/null
+++ b/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs
@@ -0,0 +1,12 @@
+// edition:2021
+// compile-flags: -Zdrop-tracking-mir=yes
+#![feature(generators)]
+
+fn main() {
+    let x = &mut ();
+    || {
+        let _c = || yield *&mut *x;
+        || _ = &mut *x;
+        //~^ cannot borrow `*x` as mutable more than once at a time
+    };
+}
diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr b/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr
new file mode 100644
index 00000000000..4d72ebe79eb
--- /dev/null
+++ b/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr
@@ -0,0 +1,18 @@
+error[E0499]: cannot borrow `*x` as mutable more than once at a time
+  --> $DIR/issue-110929-generator-conflict-error-ice.rs:9:9
+   |
+LL |         let _c = || yield *&mut *x;
+   |                  --             -- first borrow occurs due to use of `*x` in generator
+   |                  |
+   |                  first mutable borrow occurs here
+LL |         || _ = &mut *x;
+   |         ^^          -- second borrow occurs due to use of `*x` in closure
+   |         |
+   |         second mutable borrow occurs here
+LL |
+LL |     };
+   |     - first borrow might be used here, when `_c` is dropped and runs the destructor for generator
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/generic-associated-types/self-outlives-lint.rs b/tests/ui/generic-associated-types/self-outlives-lint.rs
index 673891fc3d1..0ea81b5aecb 100644
--- a/tests/ui/generic-associated-types/self-outlives-lint.rs
+++ b/tests/ui/generic-associated-types/self-outlives-lint.rs
@@ -189,7 +189,7 @@ trait MultipleMethods {
 }
 
 // We would normally require `Self: 'a`, but we can prove that `Self: 'static`
-// because of the the bounds on the trait, so the bound is proven
+// because of the bounds on the trait, so the bound is proven
 trait Trait: 'static {
     type Assoc<'a>;
     fn make_assoc(_: &u32) -> Self::Assoc<'_>;
diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.rs b/tests/ui/io-checks/inaccessbile-temp-dir.rs
deleted file mode 100644
index 9c0aa013572..00000000000
--- a/tests/ui/io-checks/inaccessbile-temp-dir.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Issue #66530: We would ICE if someone compiled with `-o /dev/null`,
-// because we would try to generate auxiliary files in `/dev/` (which
-// at least the OS X file system rejects).
-//
-// An attempt to `-o` into a directory we cannot write into should indeed
-// be an error; but not an ICE.
-//
-// However, some folks run tests as root, which can write `/dev/` and end
-// up clobbering `/dev/null`. Instead we'll use a non-existent path, which
-// also used to ICE, but even root can't magically write there.
-
-// compile-flags: -Z temps-dir=/does-not-exist/output
-
-// The error-pattern check occurs *before* normalization, and the error patterns
-// are wildly different between build environments. So this is a cop-out (and we
-// rely on the checking of the normalized stderr output as our actual
-// "verification" of the diagnostic).
-
-// error-pattern: error
-
-// On Mac OS X, we get an error like the below
-// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/"
-
-// On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
-
-// ignore-windows - this is a unix-specific test
-// ignore-emscripten - the file-system issues do not replicate here
-// ignore-wasm - the file-system issues do not replicate here
-// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
-
-#![crate_type = "lib"]
-#![cfg_attr(not(feature = "std"), no_std)]
-pub mod task {
-    pub mod __internal {
-        use crate::task::Waker;
-    }
-    pub use core::task::Waker;
-}
diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.stderr b/tests/ui/io-checks/inaccessbile-temp-dir.stderr
deleted file mode 100644
index 2fc5f93ef79..00000000000
--- a/tests/ui/io-checks/inaccessbile-temp-dir.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: failed to find or create the directory specified by `--temps-dir`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
index 134e7d420e3..6ec81a94306 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
@@ -9,7 +9,7 @@
 // up clobbering `/dev/null`. Instead we'll use a non-existent path, which
 // also used to ICE, but even root can't magically write there.
 
-// compile-flags: -o /does-not-exist/output
+// compile-flags: -o ./does-not-exist/output
 
 // The error-pattern check occurs *before* normalization, and the error patterns
 // are wildly different between build environments. So this is a cop-out (and we
@@ -19,22 +19,14 @@
 // error-pattern: error
 
 // On Mac OS X, we get an error like the below
-// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/"
+// normalize-stderr-test "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/"
 
 // On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
+// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/"
 
 // ignore-windows - this is a unix-specific test
 // ignore-emscripten - the file-system issues do not replicate here
 // ignore-wasm - the file-system issues do not replicate here
 // ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
 
-#![crate_type="lib"]
-
-#![cfg_attr(not(feature = "std"), no_std)]
-pub mod task {
-    pub mod __internal {
-        use crate::task::Waker;
-    }
-    pub use core::task::Waker;
-}
+#![crate_type = "lib"]
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
index edadecf273a..f1d9ed8ac8b 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
@@ -1,6 +1,6 @@
 warning: ignoring --out-dir flag due to -o flag
 
-error: io error modifying /does-not-exist/
+error: io error modifying ./does-not-exist/
 
 error: aborting due to previous error; 1 warning emitted
 
diff --git a/tests/ui/issues/issue-62375.stderr b/tests/ui/issues/issue-62375.stderr
index a6fd3700edd..cd632e64fe5 100644
--- a/tests/ui/issues/issue-62375.stderr
+++ b/tests/ui/issues/issue-62375.stderr
@@ -6,16 +6,17 @@ LL |     a == A::Value;
    |     |
    |     A
    |
-note: an implementation of `PartialEq<_>` might be missing for `A`
+note: an implementation of `PartialEq<fn(()) -> A {A::Value}>` might be missing for `A`
   --> $DIR/issue-62375.rs:1:1
    |
 LL | enum A {
-   | ^^^^^^ must implement `PartialEq<_>`
-help: consider annotating `A` with `#[derive(PartialEq)]`
-   |
-LL + #[derive(PartialEq)]
-LL | enum A {
+   | ^^^^^^ must implement `PartialEq<fn(()) -> A {A::Value}>`
+note: the trait `PartialEq` must be implemented
+  --> $SRC_DIR/core/src/cmp.rs:LL:COL
+help: use parentheses to construct this tuple variant
    |
+LL |     a == A::Value(/* () */);
+   |                  ++++++++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
index 20d4c418e87..8c7c915350f 100644
--- a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
+++ b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
@@ -370,23 +370,23 @@ error: layout_of(NicheFirst) = Layout {
                pref: $PREF_ALIGN,
            },
            abi: ScalarPair(
-               Union {
+               Initialized {
                    value: Int(
                        I8,
                        false,
                    ),
+                   valid_range: 0..=4,
                },
-               Initialized {
+               Union {
                    value: Int(
                        I8,
                        false,
                    ),
-                   valid_range: 0..=4,
                },
            ),
            fields: Arbitrary {
                offsets: [
-                   Size(1 bytes),
+                   Size(0 bytes),
                ],
                memory_index: [
                    0,
@@ -394,7 +394,7 @@ error: layout_of(NicheFirst) = Layout {
            },
            largest_niche: Some(
                Niche {
-                   offset: Size(1 bytes),
+                   offset: Size(0 bytes),
                    value: Int(
                        I8,
                        false,
@@ -429,29 +429,29 @@ error: layout_of(NicheFirst) = Layout {
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=255,
+                               valid_range: 0..=2,
                            },
                            Initialized {
                                value: Int(
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=2,
+                               valid_range: 0..=255,
                            },
                        ),
                        fields: Arbitrary {
                            offsets: [
-                               Size(1 bytes),
                                Size(0 bytes),
+                               Size(1 bytes),
                            ],
                            memory_index: [
-                               1,
                                0,
+                               1,
                            ],
                        },
                        largest_niche: Some(
                            Niche {
-                               offset: Size(1 bytes),
+                               offset: Size(0 bytes),
                                value: Int(
                                    I8,
                                    false,
@@ -514,23 +514,23 @@ error: layout_of(NicheSecond) = Layout {
                pref: $PREF_ALIGN,
            },
            abi: ScalarPair(
-               Union {
+               Initialized {
                    value: Int(
                        I8,
                        false,
                    ),
+                   valid_range: 0..=4,
                },
-               Initialized {
+               Union {
                    value: Int(
                        I8,
                        false,
                    ),
-                   valid_range: 0..=4,
                },
            ),
            fields: Arbitrary {
                offsets: [
-                   Size(1 bytes),
+                   Size(0 bytes),
                ],
                memory_index: [
                    0,
@@ -538,7 +538,7 @@ error: layout_of(NicheSecond) = Layout {
            },
            largest_niche: Some(
                Niche {
-                   offset: Size(1 bytes),
+                   offset: Size(0 bytes),
                    value: Int(
                        I8,
                        false,
@@ -573,29 +573,29 @@ error: layout_of(NicheSecond) = Layout {
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=255,
+                               valid_range: 0..=2,
                            },
                            Initialized {
                                value: Int(
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=2,
+                               valid_range: 0..=255,
                            },
                        ),
                        fields: Arbitrary {
                            offsets: [
-                               Size(0 bytes),
                                Size(1 bytes),
+                               Size(0 bytes),
                            ],
                            memory_index: [
-                               0,
                                1,
+                               0,
                            ],
                        },
                        largest_niche: Some(
                            Niche {
-                               offset: Size(1 bytes),
+                               offset: Size(0 bytes),
                                value: Int(
                                    I8,
                                    false,
diff --git a/tests/ui/lint/unaligned_references.stderr b/tests/ui/lint/unaligned_references.stderr
index 775dcac678e..5f9cecadbff 100644
--- a/tests/ui/lint/unaligned_references.stderr
+++ b/tests/ui/lint/unaligned_references.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |             &self.x;
    |             ^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.ptr;
    |                 ^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -22,7 +24,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.data;
    |                 ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -31,7 +34,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.data as *const _;
    |                 ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -40,7 +44,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _: *const _ = &good.data;
    |                           ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -49,7 +54,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = good.data.clone();
    |                 ^^^^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -58,7 +64,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.data2[0];
    |                 ^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -67,7 +74,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &packed2.x;
    |                 ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -76,7 +84,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ref = &m1.1.a;
    |                    ^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -85,7 +94,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ref = &m2.1.a;
    |                    ^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to 10 previous errors
diff --git a/tests/ui/lint/unaligned_references_external_macro.stderr b/tests/ui/lint/unaligned_references_external_macro.stderr
index 5b08f433e32..94a95c1d8fd 100644
--- a/tests/ui/lint/unaligned_references_external_macro.stderr
+++ b/tests/ui/lint/unaligned_references_external_macro.stderr
@@ -9,7 +9,8 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
    = note: this error originates in the macro `unaligned_references_external_crate::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.rs b/tests/ui/lint/unused/lint-unused-mut-variables.rs
index 67ec7facf17..5334ab5824d 100644
--- a/tests/ui/lint/unused/lint-unused-mut-variables.rs
+++ b/tests/ui/lint/unused/lint-unused-mut-variables.rs
@@ -205,3 +205,11 @@ fn bar() {
     let mut b = vec![2]; //~ ERROR: variable does not need to be mutable
 
 }
+
+struct Arg(i32);
+
+// Regression test for https://github.com/rust-lang/rust/issues/110849
+fn write_through_reference(mut arg: &mut Arg) {
+    //~^ WARN: variable does not need to be mutable
+    arg.0 = 1
+}
diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.stderr b/tests/ui/lint/unused/lint-unused-mut-variables.stderr
index 805ed2b40bb..5f66c031581 100644
--- a/tests/ui/lint/unused/lint-unused-mut-variables.stderr
+++ b/tests/ui/lint/unused/lint-unused-mut-variables.stderr
@@ -218,5 +218,13 @@ note: the lint level is defined here
 LL | #[deny(unused_mut)]
    |        ^^^^^^^^^^
 
-error: aborting due to previous error; 25 warnings emitted
+warning: variable does not need to be mutable
+  --> $DIR/lint-unused-mut-variables.rs:212:28
+   |
+LL | fn write_through_reference(mut arg: &mut Arg) {
+   |                            ----^^^
+   |                            |
+   |                            help: remove this `mut`
+
+error: aborting due to previous error; 26 warnings emitted
 
diff --git a/tests/ui/macros/missing-bang-in-decl.stderr b/tests/ui/macros/missing-bang-in-decl.stderr
index dfabafb0a7a..aa78c9a6906 100644
--- a/tests/ui/macros/missing-bang-in-decl.stderr
+++ b/tests/ui/macros/missing-bang-in-decl.stderr
@@ -2,13 +2,23 @@ error: expected `!` after `macro_rules`
   --> $DIR/missing-bang-in-decl.rs:5:1
    |
 LL | macro_rules foo {
-   | ^^^^^^^^^^^ help: add a `!`: `macro_rules!`
+   | ^^^^^^^^^^^
+   |
+help: add a `!`
+   |
+LL | macro_rules! foo {
+   |            +
 
 error: expected `!` after `macro_rules`
   --> $DIR/missing-bang-in-decl.rs:10:1
    |
 LL | macro_rules bar! {
-   | ^^^^^^^^^^^ help: add a `!`: `macro_rules!`
+   | ^^^^^^^^^^^
+   |
+help: add a `!`
+   |
+LL | macro_rules! bar! {
+   |            +
 
 error: macro names aren't followed by a `!`
   --> $DIR/missing-bang-in-decl.rs:10:16
diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.rs b/tests/ui/methods/method-not-found-generic-arg-elision.rs
index 799ced5e9c4..538eeadae08 100644
--- a/tests/ui/methods/method-not-found-generic-arg-elision.rs
+++ b/tests/ui/methods/method-not-found-generic-arg-elision.rs
@@ -83,8 +83,8 @@ fn main() {
     //~^ ERROR no method named `distance` found for struct `Point<i32>
     let d = point_i32.other();
     //~^ ERROR no method named `other` found for struct `Point
-    let v = vec![1_i32, 2, 3];
-    v.iter().map(|x| x * x).extend(std::iter::once(100));
+    let v = vec![1, 2, 3];
+    v.iter().map(Box::new(|x| x * x) as Box<dyn Fn(&i32) -> i32>).extend(std::iter::once(100));
     //~^ ERROR no method named `extend` found for struct `Map
     let wrapper = Wrapper(true);
     wrapper.method();
diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.stderr b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
index f3db56d1d53..b97688d3868 100644
--- a/tests/ui/methods/method-not-found-generic-arg-elision.stderr
+++ b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
@@ -20,10 +20,10 @@ LL |     let d = point_i32.other();
    |                       ^^^^^ method not found in `Point<i32>`
 
 error[E0599]: no method named `extend` found for struct `Map` in the current scope
-  --> $DIR/method-not-found-generic-arg-elision.rs:87:29
+  --> $DIR/method-not-found-generic-arg-elision.rs:87:67
    |
-LL |     v.iter().map(|x| x * x).extend(std::iter::once(100));
-   |                             ^^^^^^ method not found in `Map<Iter<'_, i32>, [closure@method-not-found-generic-arg-elision.rs:87:18]>`
+LL |     v.iter().map(Box::new(|x| x * x) as Box<dyn Fn(&i32) -> i32>).extend(std::iter::once(100));
+   |                                                                   ^^^^^^ method not found in `Map<Iter<'_, i32>, Box<dyn Fn(&i32) -> i32>>`
 
 error[E0599]: no method named `method` found for struct `Wrapper<bool>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:90:13
diff --git a/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
index 2393791a9b2..66a85c4656a 100644
--- a/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
+++ b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
@@ -6,11 +6,11 @@ LL |   a += *b;
    |   |
    |   cannot use `+=` on type `Foo`
    |
-note: an implementation of `AddAssign<_>` might be missing for `Foo`
+note: an implementation of `AddAssign` might be missing for `Foo`
   --> $DIR/assignment-operator-unimplemented.rs:1:1
    |
 LL | struct Foo;
-   | ^^^^^^^^^^ must implement `AddAssign<_>`
+   | ^^^^^^^^^^ must implement `AddAssign`
 note: the trait `AddAssign` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs
new file mode 100644
index 00000000000..3fb2842d694
--- /dev/null
+++ b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs
@@ -0,0 +1,6 @@
+// build-fail
+// compile-flags:-C link-arg=märchenhaft
+// only-msvc
+// error-pattern:= note: LINK : fatal error LNK1181:
+// normalize-stderr-test "(\s*\|\n)\s*= note: .*\n" -> "$1"
+pub fn main() {}
diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr b/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr
new file mode 100644
index 00000000000..f843aad782c
--- /dev/null
+++ b/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr
@@ -0,0 +1,7 @@
+error: linking with `link.exe` failed: exit code: 1181
+   |
+   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'
+           
+
+error: aborting due to previous error
+
diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
index 10d42b7e3c0..604bba417e6 100644
--- a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
+++ b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
@@ -30,11 +30,11 @@ LL |     let _ = |A | B: E| ();
    |                  |
    |                  E
    |
-note: an implementation of `BitOr<_>` might be missing for `E`
+note: an implementation of `BitOr<()>` might be missing for `E`
   --> $DIR/or-patterns-syntactic-fail.rs:6:1
    |
 LL | enum E { A, B }
-   | ^^^^^^ must implement `BitOr<_>`
+   | ^^^^^^ must implement `BitOr<()>`
 note: the trait `BitOr` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
diff --git a/tests/ui/packed/issue-27060.stderr b/tests/ui/packed/issue-27060.stderr
index b4753284f72..4dc31a28386 100644
--- a/tests/ui/packed/issue-27060.stderr
+++ b/tests/ui/packed/issue-27060.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data;
    |             ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data2[0];
    |             ^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -22,7 +24,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data;
    |             ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -31,7 +34,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data2[0];
    |             ^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/packed/packed-struct-borrow-element-64bit.stderr b/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
index 32943b0f07b..57630a4b470 100644
--- a/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
+++ b/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let brw = &foo.baz;
    |               ^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to previous error
diff --git a/tests/ui/packed/packed-struct-borrow-element.stderr b/tests/ui/packed/packed-struct-borrow-element.stderr
index 29d867fc5b9..c1f749d6fbb 100644
--- a/tests/ui/packed/packed-struct-borrow-element.stderr
+++ b/tests/ui/packed/packed-struct-borrow-element.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let brw = &foo.baz;
    |               ^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let brw = &foo.baz;
    |               ^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/panics/fmt-only-once.rs b/tests/ui/panics/fmt-only-once.rs
new file mode 100644
index 00000000000..6211bf961b3
--- /dev/null
+++ b/tests/ui/panics/fmt-only-once.rs
@@ -0,0 +1,21 @@
+// run-fail
+// check-run-results
+// exec-env:RUST_BACKTRACE=0
+
+// Test that we format the panic message only once.
+// Regression test for https://github.com/rust-lang/rust/issues/110717
+
+use std::fmt;
+
+struct PrintOnFmt;
+
+impl fmt::Display for PrintOnFmt {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        eprintln!("fmt");
+        f.write_str("PrintOnFmt")
+    }
+}
+
+fn main() {
+    panic!("{}", PrintOnFmt)
+}
diff --git a/tests/ui/panics/fmt-only-once.run.stderr b/tests/ui/panics/fmt-only-once.run.stderr
new file mode 100644
index 00000000000..39bd06881ad
--- /dev/null
+++ b/tests/ui/panics/fmt-only-once.run.stderr
@@ -0,0 +1,3 @@
+fmt
+thread 'main' panicked at 'PrintOnFmt', $DIR/fmt-only-once.rs:20:5
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/parser/item-kw-case-mismatch.fixed b/tests/ui/parser/item-kw-case-mismatch.fixed
index 1794268f260..4b99537fbf7 100644
--- a/tests/ui/parser/item-kw-case-mismatch.fixed
+++ b/tests/ui/parser/item-kw-case-mismatch.fixed
@@ -4,31 +4,31 @@
 
 fn main() {}
 
-use std::ptr::read;  //~ ERROR keyword `use` is written in a wrong case
-use std::ptr::write; //~ ERROR keyword `use` is written in a wrong case
+use std::ptr::read;  //~ ERROR keyword `use` is written in the wrong case
+use std::ptr::write; //~ ERROR keyword `use` is written in the wrong case
 
 async fn _a() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 fn _b() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 async fn _c() {}
-//~^ ERROR keyword `async` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 async fn _d() {}
-//~^ ERROR keyword `async` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
 
 const unsafe fn _e() {}
-//~^ ERROR keyword `const` is written in a wrong case
-//~| ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `const` is written in the wrong case
+//~| ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 unsafe extern fn _f() {}
-//~^ ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `extern` is written in a wrong case
+//~^ ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `extern` is written in the wrong case
 
 extern "C" fn _g() {}
-//~^ ERROR keyword `extern` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `extern` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
diff --git a/tests/ui/parser/item-kw-case-mismatch.rs b/tests/ui/parser/item-kw-case-mismatch.rs
index ac8390efdb9..b11ec93754f 100644
--- a/tests/ui/parser/item-kw-case-mismatch.rs
+++ b/tests/ui/parser/item-kw-case-mismatch.rs
@@ -4,31 +4,31 @@
 
 fn main() {}
 
-Use std::ptr::read;  //~ ERROR keyword `use` is written in a wrong case
-USE std::ptr::write; //~ ERROR keyword `use` is written in a wrong case
+Use std::ptr::read;  //~ ERROR keyword `use` is written in the wrong case
+USE std::ptr::write; //~ ERROR keyword `use` is written in the wrong case
 
 async Fn _a() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 Fn _b() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 aSYNC fN _c() {}
-//~^ ERROR keyword `async` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 Async fn _d() {}
-//~^ ERROR keyword `async` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
 
 CONST UNSAFE FN _e() {}
-//~^ ERROR keyword `const` is written in a wrong case
-//~| ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `const` is written in the wrong case
+//~| ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 unSAFE EXTern fn _f() {}
-//~^ ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `extern` is written in a wrong case
+//~^ ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `extern` is written in the wrong case
 
 EXTERN "C" FN _g() {}
-//~^ ERROR keyword `extern` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `extern` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
diff --git a/tests/ui/parser/item-kw-case-mismatch.stderr b/tests/ui/parser/item-kw-case-mismatch.stderr
index e66dae825f9..ba59ea85363 100644
--- a/tests/ui/parser/item-kw-case-mismatch.stderr
+++ b/tests/ui/parser/item-kw-case-mismatch.stderr
@@ -1,82 +1,82 @@
-error: keyword `use` is written in a wrong case
+error: keyword `use` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:7:1
    |
 LL | Use std::ptr::read;
    | ^^^ help: write it in the correct case (notice the capitalization): `use`
 
-error: keyword `use` is written in a wrong case
+error: keyword `use` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:8:1
    |
 LL | USE std::ptr::write;
    | ^^^ help: write it in the correct case: `use`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:10:7
    |
 LL | async Fn _a() {}
    |       ^^ help: write it in the correct case (notice the capitalization): `fn`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:13:1
    |
 LL | Fn _b() {}
    | ^^ help: write it in the correct case (notice the capitalization): `fn`
 
-error: keyword `async` is written in a wrong case
+error: keyword `async` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:16:1
    |
 LL | aSYNC fN _c() {}
    | ^^^^^ help: write it in the correct case: `async`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:16:7
    |
 LL | aSYNC fN _c() {}
    |       ^^ help: write it in the correct case: `fn`
 
-error: keyword `async` is written in a wrong case
+error: keyword `async` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:20:1
    |
 LL | Async fn _d() {}
    | ^^^^^ help: write it in the correct case: `async`
 
-error: keyword `const` is written in a wrong case
+error: keyword `const` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:23:1
    |
 LL | CONST UNSAFE FN _e() {}
    | ^^^^^ help: write it in the correct case: `const`
 
-error: keyword `unsafe` is written in a wrong case
+error: keyword `unsafe` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:23:7
    |
 LL | CONST UNSAFE FN _e() {}
    |       ^^^^^^ help: write it in the correct case: `unsafe`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:23:14
    |
 LL | CONST UNSAFE FN _e() {}
    |              ^^ help: write it in the correct case: `fn`
 
-error: keyword `unsafe` is written in a wrong case
+error: keyword `unsafe` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:28:1
    |
 LL | unSAFE EXTern fn _f() {}
    | ^^^^^^ help: write it in the correct case: `unsafe`
 
-error: keyword `extern` is written in a wrong case
+error: keyword `extern` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:28:8
    |
 LL | unSAFE EXTern fn _f() {}
    |        ^^^^^^ help: write it in the correct case: `extern`
 
-error: keyword `extern` is written in a wrong case
+error: keyword `extern` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:32:1
    |
 LL | EXTERN "C" FN _g() {}
    | ^^^^^^ help: write it in the correct case: `extern`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:32:12
    |
 LL | EXTERN "C" FN _g() {}
diff --git a/tests/ui/parser/recover-unticked-labels.stderr b/tests/ui/parser/recover-unticked-labels.stderr
index c115dffb10e..fbd108ca613 100644
--- a/tests/ui/parser/recover-unticked-labels.stderr
+++ b/tests/ui/parser/recover-unticked-labels.stderr
@@ -2,13 +2,17 @@ error: expected a label, found an identifier
   --> $DIR/recover-unticked-labels.rs:5:26
    |
 LL |     'label: loop { break label 0 };
-   |                          ^^^^^ help: labels start with a tick: `'label`
+   |                          -^^^^
+   |                          |
+   |                          help: labels start with a tick
 
 error: expected a label, found an identifier
   --> $DIR/recover-unticked-labels.rs:6:29
    |
 LL |     'label: loop { continue label };
-   |                             ^^^^^ help: labels start with a tick: `'label`
+   |                             -^^^^
+   |                             |
+   |                             help: labels start with a tick
 
 error[E0425]: cannot find value `label` in this scope
   --> $DIR/recover-unticked-labels.rs:4:26
diff --git a/tests/ui/parser/use-colon-as-mod-sep.stderr b/tests/ui/parser/use-colon-as-mod-sep.stderr
index e825dfed111..bfc5374ef9d 100644
--- a/tests/ui/parser/use-colon-as-mod-sep.stderr
+++ b/tests/ui/parser/use-colon-as-mod-sep.stderr
@@ -11,18 +11,24 @@ error: expected `::`, found `:`
    |
 LL | use std:fs::File;
    |        ^ help: use double colon
+   |
+   = note: import paths are delimited using `::`
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:7:8
    |
 LL | use std:collections:HashMap;
    |        ^ help: use double colon
+   |
+   = note: import paths are delimited using `::`
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:7:20
    |
 LL | use std:collections:HashMap;
    |                    ^ help: use double colon
+   |
+   = note: import paths are delimited using `::`
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/print_type_sizes/async.stdout b/tests/ui/print_type_sizes/async.stdout
index 8fe936efc89..1c6887412be 100644
--- a/tests/ui/print_type_sizes/async.stdout
+++ b/tests/ui/print_type_sizes/async.stdout
@@ -1,15 +1,15 @@
 print-type-size type: `[async fn body@$DIR/async.rs:8:36: 11:2]`: 16386 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 8192 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size     variant `Suspend0`: 16385 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size         local `.arg`: 8192 bytes
 print-type-size         local `.__awaitee`: 1 bytes
 print-type-size     variant `Returned`: 8192 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size     variant `Panicked`: 8192 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size type: `std::mem::ManuallyDrop<[u8; 8192]>`: 8192 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 8192 bytes
 print-type-size type: `std::mem::MaybeUninit<[u8; 8192]>`: 8192 bytes, alignment: 1 bytes
diff --git a/tests/ui/print_type_sizes/generator.stdout b/tests/ui/print_type_sizes/generator.stdout
index 7c58d6ce5ff..2dcadde9ec2 100644
--- a/tests/ui/print_type_sizes/generator.stdout
+++ b/tests/ui/print_type_sizes/generator.stdout
@@ -1,10 +1,10 @@
 print-type-size type: `[generator@$DIR/generator.rs:10:5: 10:14]`: 8193 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
 print-type-size     variant `Suspend0`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
 print-type-size     variant `Returned`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
 print-type-size     variant `Panicked`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
diff --git a/tests/ui/span/issue-39018.stderr b/tests/ui/span/issue-39018.stderr
index 771f21c45da..bae93639271 100644
--- a/tests/ui/span/issue-39018.stderr
+++ b/tests/ui/span/issue-39018.stderr
@@ -21,11 +21,11 @@ LL |     let y = World::Hello + World::Goodbye;
    |             |
    |             World
    |
-note: an implementation of `Add<_>` might be missing for `World`
+note: an implementation of `Add` might be missing for `World`
   --> $DIR/issue-39018.rs:15:1
    |
 LL | enum World {
-   | ^^^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^^^ must implement `Add`
 note: the trait `Add` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/specialization/issue-40582.rs b/tests/ui/specialization/issue-40582.rs
new file mode 100644
index 00000000000..9805933553d
--- /dev/null
+++ b/tests/ui/specialization/issue-40582.rs
@@ -0,0 +1,35 @@
+// check-pass
+// known-bug: #40582
+
+// Should fail. Should not be possible to implement `make_static`.
+
+#![feature(specialization)]
+#![allow(incomplete_features)]
+
+trait FromRef<'a, T: ?Sized> {
+    fn from_ref(r: &'a T) -> Self;
+}
+
+impl<'a, T: ?Sized> FromRef<'a, T> for &'a T {
+    fn from_ref(r: &'a T) -> Self {
+        r
+    }
+}
+
+impl<'a, T: ?Sized, R> FromRef<'a, T> for R {
+    default fn from_ref(_: &'a T) -> Self {
+        unimplemented!()
+    }
+}
+
+fn make_static<T: ?Sized>(data: &T) -> &'static T {
+    fn helper<T: ?Sized, R>(data: &T) -> R {
+        R::from_ref(data)
+    }
+    helper(data)
+}
+
+fn main() {
+    let s = "specialization".to_owned();
+    println!("{:?}", make_static(s.as_str()));
+}
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
new file mode 100644
index 00000000000..16ad942d5ab
--- /dev/null
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
@@ -0,0 +1,30 @@
+// check-pass
+// known-bug: #105782
+
+// Should fail. Default items completely drop candidates instead of ambiguity,
+// which is unsound during coherence, since coherence requires completeness.
+
+#![feature(specialization)]
+#![allow(incomplete_features)]
+
+trait Default {
+   type Id;
+}
+
+impl<T> Default for T {
+   default type Id = T;
+}
+
+trait Overlap {
+   type Assoc;
+}
+
+impl Overlap for u32 {
+   type Assoc = usize;
+}
+
+impl Overlap for <u32 as Default>::Id {
+   type Assoc = Box<usize>;
+}
+
+fn main() {}
diff --git a/tests/ui/structs-enums/type-sizes.rs b/tests/ui/structs-enums/type-sizes.rs
index 63e2f3150c0..406e5c8441e 100644
--- a/tests/ui/structs-enums/type-sizes.rs
+++ b/tests/ui/structs-enums/type-sizes.rs
@@ -4,9 +4,14 @@
 #![allow(dead_code)]
 #![feature(never_type)]
 #![feature(pointer_is_aligned)]
+#![feature(ptr_from_ref)]
+#![feature(strict_provenance)]
 
 use std::mem::size_of;
-use std::num::NonZeroU8;
+use std::num::{NonZeroU8, NonZeroU16};
+use std::ptr;
+use std::ptr::NonNull;
+use std::borrow::Cow;
 
 struct t {a: u8, b: i8}
 struct u {a: u8, b: i8, c: u8}
@@ -181,6 +186,41 @@ struct Reorder2 {
     ary: [u8; 6],
 }
 
+// We want the niche in the front, which means we can't treat the array as quasi-aligned more than
+// 4 bytes even though we also want to place it at an 8-aligned offset where possible.
+// So the ideal layout would look like: (char, u32, [u8; 8], u8)
+// The current layout algorithm does (char, [u8; 8], u32, u8)
+#[repr(align(8))]
+struct ReorderWithNiche {
+    a: u32,
+    b: char,
+    c: u8,
+    ary: [u8; 8]
+}
+
+#[repr(C)]
+struct EndNiche8([u8; 7], bool);
+
+#[repr(C)]
+struct MiddleNiche4(u8, u8, bool, u8);
+
+struct ReorderEndNiche {
+    a: EndNiche8,
+    b: MiddleNiche4,
+}
+
+
+// standins for std types which we want to be laid out in a reasonable way
+struct RawVecDummy {
+    ptr: NonNull<u8>,
+    cap: usize,
+}
+
+struct VecDummy {
+    r: RawVecDummy,
+    len: usize,
+}
+
 pub fn main() {
     assert_eq!(size_of::<u8>(), 1 as usize);
     assert_eq!(size_of::<u32>(), 4 as usize);
@@ -270,4 +310,29 @@ pub fn main() {
     let v = Reorder2 {a: 0, b: 0, ary: [0; 6]};
     assert_eq!(size_of::<Reorder2>(), 10);
     assert!((&v.ary).as_ptr().is_aligned_to(2), "[u8; 6] should group with align-2 fields");
+
+    let v = VecDummy { r: RawVecDummy { ptr: NonNull::dangling(), cap: 0 }, len: 1 };
+    assert_eq!(ptr::from_ref(&v), ptr::from_ref(&v.r.ptr).cast(),
+               "sort niches to the front where possible");
+
+    // Ideal layouts: (bool, u8, NonZeroU16) or (NonZeroU16, u8, bool)
+    // Currently the layout algorithm will choose the latter because it doesn't attempt
+    // to aggregate multiple smaller fields to move a niche before a higher-alignment one.
+    let b = BoolInTheMiddle( NonZeroU16::new(1).unwrap(), true, 0);
+    assert!(ptr::from_ref(&b.1).addr() > ptr::from_ref(&b.2).addr());
+
+    assert_eq!(size_of::<Cow<'static, str>>(), size_of::<String>());
+
+    let v = ReorderWithNiche {a: 0, b: ' ', c: 0, ary: [0; 8]};
+    assert!((&v.ary).as_ptr().is_aligned_to(4),
+            "here [u8; 8] should group with _at least_ align-4 fields");
+    assert_eq!(ptr::from_ref(&v), ptr::from_ref(&v.b).cast(),
+               "sort niches to the front where possible");
+
+    // Neither field has a niche at the beginning so the layout algorithm should try move niches to
+    // the end which means the 8-sized field shouldn't be alignment-promoted before the 4-sized one.
+    let v = ReorderEndNiche { a: EndNiche8([0; 7], false), b: MiddleNiche4(0, 0, false, 0) };
+    assert!(ptr::from_ref(&v.a).addr() > ptr::from_ref(&v.b).addr());
+
+
 }
diff --git a/tests/ui/suggestions/invalid-bin-op.stderr b/tests/ui/suggestions/invalid-bin-op.stderr
index e291cedb835..570afcea643 100644
--- a/tests/ui/suggestions/invalid-bin-op.stderr
+++ b/tests/ui/suggestions/invalid-bin-op.stderr
@@ -6,11 +6,11 @@ LL |     let _ = s == t;
    |             |
    |             S<T>
    |
-note: an implementation of `PartialEq<_>` might be missing for `S<T>`
+note: an implementation of `PartialEq` might be missing for `S<T>`
   --> $DIR/invalid-bin-op.rs:5:1
    |
 LL | struct S<T>(T);
-   | ^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^ must implement `PartialEq`
 help: consider annotating `S<T>` with `#[derive(PartialEq)]`
    |
 LL + #[derive(PartialEq)]
diff --git a/tests/ui/suggestions/restrict-type-not-param.stderr b/tests/ui/suggestions/restrict-type-not-param.stderr
index 5434472ceec..3c7d42888d8 100644
--- a/tests/ui/suggestions/restrict-type-not-param.stderr
+++ b/tests/ui/suggestions/restrict-type-not-param.stderr
@@ -6,11 +6,11 @@ LL |     a + b
    |     |
    |     Wrapper<T>
    |
-note: an implementation of `Add<_>` might be missing for `Wrapper<T>`
+note: an implementation of `Add<T>` might be missing for `Wrapper<T>`
   --> $DIR/restrict-type-not-param.rs:3:1
    |
 LL | struct Wrapper<T>(T);
-   | ^^^^^^^^^^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^^^^^^^^^^ must implement `Add<T>`
 note: the trait `Add` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed
index b69bad98888..556c9543881 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed
@@ -11,7 +11,7 @@ fn main() {
     let mut map = HashMap::new();
     map.insert("a", Test { v: 0 });
 
-    for (_k, mut v) in map.iter_mut() {
+    for (_k, v) in map.iter_mut() {
         //~^ HELP use mutable method
         //~| NOTE this iterator yields `&` references
         v.v += 1;
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs
index 9284410dfa3..b9d49a074ea 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs
@@ -11,7 +11,7 @@ fn main() {
     let mut map = HashMap::new();
     map.insert("a", Test { v: 0 });
 
-    for (_k, mut v) in map.iter() {
+    for (_k, v) in map.iter() {
         //~^ HELP use mutable method
         //~| NOTE this iterator yields `&` references
         v.v += 1;
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
index 74433daa6ac..c442ed6377a 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
@@ -1,11 +1,11 @@
 error[E0594]: cannot assign to `v.v`, which is behind a `&` reference
   --> $DIR/suggest-mut-method-for-loop-hashmap.rs:17:9
    |
-LL |     for (_k, mut v) in map.iter() {
-   |                        ----------
-   |                        |   |
-   |                        |   help: use mutable method: `iter_mut()`
-   |                        this iterator yields `&` references
+LL |     for (_k, v) in map.iter() {
+   |                    ----------
+   |                    |   |
+   |                    |   help: use mutable method: `iter_mut()`
+   |                    this iterator yields `&` references
 ...
 LL |         v.v += 1;
    |         ^^^^^^^^ `v` is a `&` reference, so the data it refers to cannot be written
diff --git a/tests/ui/test-attrs/tests-listing-format-json.rs b/tests/ui/test-attrs/tests-listing-format-json.rs
index 18f1521eeeb..5afc2746fe4 100644
--- a/tests/ui/test-attrs/tests-listing-format-json.rs
+++ b/tests/ui/test-attrs/tests-listing-format-json.rs
@@ -3,6 +3,7 @@
 // run-flags: --list --format json -Zunstable-options
 // run-pass
 // check-run-results
+// only-nightly
 // normalize-stdout-test: "fake-test-src-base/test-attrs/" -> "$$DIR/"
 // normalize-stdout-test: "fake-test-src-base\\test-attrs\\" -> "$$DIR/"
 
diff --git a/tests/ui/test-attrs/tests-listing-format-json.run.stdout b/tests/ui/test-attrs/tests-listing-format-json.run.stdout
index b4131e97c34..33cc939b59f 100644
--- a/tests/ui/test-attrs/tests-listing-format-json.run.stdout
+++ b/tests/ui/test-attrs/tests-listing-format-json.run.stdout
@@ -1,5 +1,5 @@
 { "type": "suite", "event": "discovery" }
-{ "type": "test", "event": "discovered", "name": "a_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 20, "start_col": 4, "end_line": 20, "end_col": 10 }
-{ "type": "test", "event": "discovered", "name": "m_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 13, "start_col": 4, "end_line": 13, "end_col": 10 }
-{ "type": "test", "event": "discovered", "name": "z_test", "ignore": true, "ignore_message": "not yet implemented", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 17, "start_col": 4, "end_line": 17, "end_col": 10 }
+{ "type": "test", "event": "discovered", "name": "a_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 21, "start_col": 4, "end_line": 21, "end_col": 10 }
+{ "type": "test", "event": "discovered", "name": "m_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 14, "start_col": 4, "end_line": 14, "end_col": 10 }
+{ "type": "test", "event": "discovered", "name": "z_test", "ignore": true, "ignore_message": "not yet implemented", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 18, "start_col": 4, "end_line": 18, "end_col": 10 }
 { "type": "suite", "event": "completed", "tests": 3, "benchmarks": 0, "total": 3, "ignored": 1 }
diff --git a/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs
new file mode 100644
index 00000000000..c282e2185bc
--- /dev/null
+++ b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs
@@ -0,0 +1,46 @@
+// check-pass
+// known-bug: #49682
+// edition:2021
+
+// Should fail. Keeping references to thread local statics can result in a
+// use-after-free.
+
+#![feature(thread_local)]
+
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::thread;
+
+#[allow(dead_code)]
+#[thread_local]
+static FOO: AtomicUsize = AtomicUsize::new(0);
+
+#[allow(dead_code)]
+async fn bar() {}
+
+#[allow(dead_code)]
+async fn foo() {
+    let r = &FOO;
+    bar().await;
+    r.load(Ordering::SeqCst);
+}
+
+fn main() {
+    // &FOO = 0x7fd1e9cbf6d0
+    _ = thread::spawn(|| {
+        let g = foo();
+        println!("&FOO = {:p}", &FOO);
+        g
+    })
+    .join()
+    .unwrap();
+
+    // &FOO = 0x7fd1e9cc0f50
+    println!("&FOO = {:p}", &FOO);
+
+    // &FOO = 0x7fd1e9cbf6d0
+    thread::spawn(move || {
+        println!("&FOO = {:p}", &FOO);
+    })
+    .join()
+    .unwrap();
+}
diff --git a/tests/ui/traits/new-solver/exponential-trait-goals.rs b/tests/ui/traits/new-solver/exponential-trait-goals.rs
new file mode 100644
index 00000000000..b37f09ee185
--- /dev/null
+++ b/tests/ui/traits/new-solver/exponential-trait-goals.rs
@@ -0,0 +1,20 @@
+// compile-flags: -Ztrait-solver=next
+
+trait Trait {}
+
+struct W<T>(T);
+
+impl<T, U> Trait for W<(W<T>, W<U>)>
+where
+    W<T>: Trait,
+    W<U>: Trait,
+{
+}
+
+fn impls<T: Trait>() {}
+
+fn main() {
+    impls::<W<_>>();
+    //~^ ERROR type annotations needed
+    //~| ERROR overflow evaluating the requirement `W<_>: Trait`
+}
diff --git a/tests/ui/traits/new-solver/exponential-trait-goals.stderr b/tests/ui/traits/new-solver/exponential-trait-goals.stderr
new file mode 100644
index 00000000000..28a99cbbca6
--- /dev/null
+++ b/tests/ui/traits/new-solver/exponential-trait-goals.stderr
@@ -0,0 +1,23 @@
+error[E0282]: type annotations needed
+  --> $DIR/exponential-trait-goals.rs:17:5
+   |
+LL |     impls::<W<_>>();
+   |     ^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `impls`
+
+error[E0275]: overflow evaluating the requirement `W<_>: Trait`
+  --> $DIR/exponential-trait-goals.rs:17:5
+   |
+LL |     impls::<W<_>>();
+   |     ^^^^^^^^^^^^^
+   |
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`exponential_trait_goals`)
+note: required by a bound in `impls`
+  --> $DIR/exponential-trait-goals.rs:14:13
+   |
+LL | fn impls<T: Trait>() {}
+   |             ^^^^^ required by this bound in `impls`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0275, E0282.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/tests/ui/type/type-unsatisfiable.usage.stderr b/tests/ui/type/type-unsatisfiable.usage.stderr
index 56e2e30afac..0b76ba8eb7e 100644
--- a/tests/ui/type/type-unsatisfiable.usage.stderr
+++ b/tests/ui/type/type-unsatisfiable.usage.stderr
@@ -1,8 +1,8 @@
-error[E0369]: cannot subtract `(dyn Vector2<ScalarType = i32> + 'static)` from `dyn Vector2<ScalarType = i32>`
+error[E0369]: cannot subtract `dyn Vector2<ScalarType = i32>` from `dyn Vector2<ScalarType = i32>`
   --> $DIR/type-unsatisfiable.rs:57:20
    |
 LL |     let bar = *hey - *word;
-   |               ---- ^ ----- (dyn Vector2<ScalarType = i32> + 'static)
+   |               ---- ^ ----- dyn Vector2<ScalarType = i32>
    |               |
    |               dyn Vector2<ScalarType = i32>