about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-05 00:30:08 +0000
committerbors <bors@rust-lang.org>2025-06-05 00:30:08 +0000
commit81a964c23ea4fe9ab52b4449bb166bf280035797 (patch)
treef125374c699b8fed4c7ec8971ae9c2496b772d15
parentff223d35cd684f8c7c07ed4b7fd4475e482359ab (diff)
parent4959ee314d220688de394ea7ab3f25f2788ca17b (diff)
downloadrust-81a964c23ea4fe9ab52b4449bb166bf280035797.tar.gz
rust-81a964c23ea4fe9ab52b4449bb166bf280035797.zip
Auto merge of #142033 - matthiaskrgr:rollup-99lvg0j, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#141890 (Add link to correct documentation in htmldocck.py)
 - rust-lang/rust#141932 (Fix for async drop inside async gen fn)
 - rust-lang/rust#141960 (Use non-2015 edition paths in tests that do not test for their resolution)
 - rust-lang/rust#141968 (Run wfcheck in one big loop instead of per module)
 - rust-lang/rust#141969 (Triagebot: Remove `assign.users_on_vacation`)
 - rust-lang/rust#141985 (Ensure query keys are printed with reduced queries)
 - rust-lang/rust#141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.)
 - rust-lang/rust#142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`)
 - rust-lang/rust#142017 (Fix incorrect use of "recommend" over "recommended")
 - rust-lang/rust#142024 (Don't refer to 'this tail expression' in expansion.)
 - rust-lang/rust#142025 (Don't refer to 'local binding' in extern macro.)

r? `@ghost`
`@rustbot` modify labels: rollup
-rw-r--r--compiler/rustc_abi/src/layout.rs4
-rw-r--r--compiler/rustc_abi/src/layout/coroutine.rs4
-rw-r--r--compiler/rustc_abi/src/lib.rs2
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs8
-rw-r--r--compiler/rustc_codegen_cranelift/src/discriminant.rs6
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs14
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs2
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/operand.rs4
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/place.rs4
-rw-r--r--compiler/rustc_const_eval/src/interpret/discriminant.rs8
-rw-r--r--compiler/rustc_const_eval/src/interpret/validity.rs2
-rw-r--r--compiler/rustc_hir/src/intravisit.rs5
-rw-r--r--compiler/rustc_hir_analysis/src/check/wfcheck.rs13
-rw-r--r--compiler/rustc_hir_analysis/src/lib.rs4
-rw-r--r--compiler/rustc_middle/src/dep_graph/mod.rs5
-rw-r--r--compiler/rustc_middle/src/query/mod.rs4
-rw-r--r--compiler/rustc_middle/src/ty/layout.rs8
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs2
-rw-r--r--compiler/rustc_mir_transform/src/coroutine/drop.rs34
-rw-r--r--compiler/rustc_query_system/src/dep_graph/dep_node.rs11
-rw-r--r--compiler/rustc_query_system/src/dep_graph/mod.rs2
-rw-r--r--compiler/rustc_smir/src/rustc_smir/convert/abi.rs2
-rw-r--r--compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs4
-rw-r--r--compiler/rustc_transmute/src/layout/tree.rs2
-rw-r--r--compiler/rustc_ty_utils/src/layout.rs2
-rw-r--r--src/doc/rustc/src/codegen-options/index.md2
-rwxr-xr-xsrc/etc/htmldocck.py116
-rw-r--r--src/librustdoc/core.rs4
-rw-r--r--tests/incremental/print-dep-node-cycle.rs25
-rw-r--r--tests/ui/async-await/async-drop/assign-incompatible-types.rs (renamed from tests/crashes/140530.rs)5
-rw-r--r--tests/ui/impl-trait/in-assoc-type-unconstrained.stderr16
-rw-r--r--tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr26
-rw-r--r--tests/ui/issues/issue-20427.rs2
-rw-r--r--tests/ui/issues/issue-28983.rs2
-rw-r--r--tests/ui/issues/issue-31776.rs6
-rw-r--r--tests/ui/issues/issue-32797.rs2
-rw-r--r--tests/ui/issues/issue-41053.rs2
-rw-r--r--tests/ui/issues/issue-47364.rs24
-rw-r--r--tests/ui/issues/issue-50187.rs14
-rw-r--r--tests/ui/issues/issue-50761.rs2
-rw-r--r--tests/ui/issues/issue-6936.rs10
-rw-r--r--tests/ui/issues/issue-6936.stderr12
-rw-r--r--tests/ui/issues/issue-7663.rs4
-rw-r--r--tests/ui/lint/lint-directives-on-use-items-issue-10534.rs8
-rw-r--r--tests/ui/lint/lint-directives-on-use-items-issue-10534.stderr12
-rw-r--r--tests/ui/lint/lint-missing-doc.rs8
-rw-r--r--tests/ui/lint/lint-unnecessary-import-braces.rs6
-rw-r--r--tests/ui/lint/lint-unnecessary-import-braces.stderr4
-rw-r--r--tests/ui/lint/unused/lint-unused-imports.rs8
-rw-r--r--tests/ui/lint/unused/lint-unused-imports.stderr12
-rw-r--r--tests/ui/macros/macro-pub-matcher.rs18
-rw-r--r--tests/ui/macros/paths-in-macro-invocations.rs12
-rw-r--r--tests/ui/macros/return_from_external_macro.rs2
-rw-r--r--tests/ui/macros/return_from_external_macro.stderr4
-rw-r--r--tests/ui/moves/issue-34721.fixed6
-rw-r--r--tests/ui/moves/issue-34721.rs6
-rw-r--r--tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs4
-rw-r--r--tests/ui/never_type/feature-gate-never_type_fallback.stderr6
-rw-r--r--tests/ui/pattern/issue-14221.rs2
-rw-r--r--tests/ui/pattern/issue-22546.rs4
-rw-r--r--tests/ui/pattern/issue-6449.rs40
-rw-r--r--tests/ui/pattern/missing_lifetime.rs2
-rw-r--r--tests/ui/pattern/usefulness/uninhabited.rs2
-rw-r--r--tests/ui/privacy/auxiliary/pub_use_mods_xcrate.rs2
-rw-r--r--tests/ui/privacy/crate-private-reexport.rs18
-rw-r--r--tests/ui/privacy/crate-private-reexport.stderr56
-rw-r--r--tests/ui/privacy/issue-30079.rs8
-rw-r--r--tests/ui/privacy/issue-30079.stderr4
-rw-r--r--tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs2
-rw-r--r--tests/ui/privacy/legacy-ctor-visibility.rs2
-rw-r--r--tests/ui/privacy/privacy-in-paths.rs8
-rw-r--r--tests/ui/privacy/privacy-in-paths.stderr28
-rw-r--r--tests/ui/privacy/privacy-ufcs.rs2
-rw-r--r--tests/ui/privacy/privacy-ufcs.stderr10
-rw-r--r--tests/ui/privacy/privacy1.rs36
-rw-r--r--tests/ui/privacy/privacy1.stderr96
-rw-r--r--tests/ui/privacy/privacy2.rs2
-rw-r--r--tests/ui/privacy/privacy2.stderr4
-rw-r--r--tests/ui/privacy/privacy3.stderr12
-rw-r--r--tests/ui/privacy/private-inferred-type-1.rs6
-rw-r--r--tests/ui/privacy/restricted/lookup-ignores-private.rs8
-rw-r--r--tests/ui/privacy/restricted/private-in-public.rs2
-rw-r--r--tests/ui/privacy/restricted/struct-literal-field.rs4
-rw-r--r--tests/ui/proc-macro/crate-var.rs4
-rw-r--r--tests/ui/proc-macro/helper-attr-blocked-by-import.rs4
-rw-r--r--tests/ui/proc-macro/issue-50493.rs2
-rw-r--r--tests/ui/proc-macro/issue-50493.stderr4
-rw-r--r--tests/ui/proc-macro/issue-53481.rs2
-rw-r--r--tests/ui/pub/pub-reexport-priv-extern-crate.rs4
-rw-r--r--tests/ui/pub/pub-reexport-priv-extern-crate.stderr12
-rw-r--r--tests/ui/pub/pub-restricted.rs6
-rw-r--r--tests/ui/pub/pub-restricted.stderr4
-rw-r--r--tests/ui/recursion/auxiliary/recursive_reexports.rs2
-rw-r--r--tests/ui/recursion_limit/issue-40003.rs4
-rw-r--r--tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/constrain_inputs.stderr52
-rw-r--r--triagebot.toml4
97 files changed, 478 insertions, 534 deletions
diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs
index 42250aa173b..21fd6be39fa 100644
--- a/compiler/rustc_abi/src/layout.rs
+++ b/compiler/rustc_abi/src/layout.rs
@@ -758,7 +758,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
                         niche_variants,
                         niche_start,
                     },
-                    tag_field: 0,
+                    tag_field: FieldIdx::new(0),
                     variants: IndexVec::new(),
                 },
                 fields: FieldsShape::Arbitrary {
@@ -1072,7 +1072,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
             variants: Variants::Multiple {
                 tag,
                 tag_encoding: TagEncoding::Direct,
-                tag_field: 0,
+                tag_field: FieldIdx::new(0),
                 variants: IndexVec::new(),
             },
             fields: FieldsShape::Arbitrary {
diff --git a/compiler/rustc_abi/src/layout/coroutine.rs b/compiler/rustc_abi/src/layout/coroutine.rs
index 27e704d538c..2b22276d4ae 100644
--- a/compiler/rustc_abi/src/layout/coroutine.rs
+++ b/compiler/rustc_abi/src/layout/coroutine.rs
@@ -158,7 +158,7 @@ pub(super) fn layout<
     // Build a prefix layout, including "promoting" all ineligible
     // locals as part of the prefix. We compute the layout of all of
     // these fields at once to get optimal packing.
-    let tag_index = prefix_layouts.len();
+    let tag_index = prefix_layouts.next_index();
 
     // `variant_fields` already accounts for the reserved variants, so no need to add them.
     let max_discr = (variant_fields.len() - 1) as u128;
@@ -187,7 +187,7 @@ pub(super) fn layout<
 
             // "a" (`0..b_start`) and "b" (`b_start..`) correspond to
             // "outer" and "promoted" fields respectively.
-            let b_start = FieldIdx::new(tag_index + 1);
+            let b_start = tag_index.plus(1);
             let offsets_b = IndexVec::from_raw(offsets.raw.split_off(b_start.index()));
             let offsets_a = offsets;
 
diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs
index b806d0aba31..46b7a0c1e77 100644
--- a/compiler/rustc_abi/src/lib.rs
+++ b/compiler/rustc_abi/src/lib.rs
@@ -1573,7 +1573,7 @@ pub enum Variants<FieldIdx: Idx, VariantIdx: Idx> {
     Multiple {
         tag: Scalar,
         tag_encoding: TagEncoding<VariantIdx>,
-        tag_field: usize,
+        tag_field: FieldIdx,
         variants: IndexVec<VariantIdx, LayoutData<FieldIdx, VariantIdx>>,
     },
 }
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 3b7d31b1b13..b7b6a2da549 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -3314,7 +3314,13 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
                     "function parameter".to_string(),
                     "function parameter borrowed here".to_string(),
                 ),
-                LocalKind::Temp if self.body.local_decls[local].is_user_variable() => {
+                LocalKind::Temp
+                    if self.body.local_decls[local].is_user_variable()
+                        && !self.body.local_decls[local]
+                            .source_info
+                            .span
+                            .in_external_macro(self.infcx.tcx.sess.source_map()) =>
+                {
                     ("local binding".to_string(), "local binding introduced here".to_string())
                 }
                 LocalKind::ReturnPointer | LocalKind::Temp => {
diff --git a/compiler/rustc_codegen_cranelift/src/discriminant.rs b/compiler/rustc_codegen_cranelift/src/discriminant.rs
index 4d0d5dc60eb..a08b0e0cbfc 100644
--- a/compiler/rustc_codegen_cranelift/src/discriminant.rs
+++ b/compiler/rustc_codegen_cranelift/src/discriminant.rs
@@ -28,7 +28,7 @@ pub(crate) fn codegen_set_discriminant<'tcx>(
             tag_encoding: TagEncoding::Direct,
             variants: _,
         } => {
-            let ptr = place.place_field(fx, FieldIdx::new(tag_field));
+            let ptr = place.place_field(fx, tag_field);
             let to = layout.ty.discriminant_for_variant(fx.tcx, variant_index).unwrap().val;
             let to = match ptr.layout().ty.kind() {
                 ty::Uint(UintTy::U128) | ty::Int(IntTy::I128) => {
@@ -53,7 +53,7 @@ pub(crate) fn codegen_set_discriminant<'tcx>(
             variants: _,
         } => {
             if variant_index != untagged_variant {
-                let niche = place.place_field(fx, FieldIdx::new(tag_field));
+                let niche = place.place_field(fx, tag_field);
                 let niche_type = fx.clif_type(niche.layout().ty).unwrap();
                 let niche_value = variant_index.as_u32() - niche_variants.start().as_u32();
                 let niche_value = (niche_value as u128).wrapping_add(niche_start);
@@ -118,7 +118,7 @@ pub(crate) fn codegen_get_discriminant<'tcx>(
     let cast_to = fx.clif_type(dest_layout.ty).unwrap();
 
     // Read the tag/niche-encoded discriminant from memory.
-    let tag = value.value_field(fx, FieldIdx::new(tag_field));
+    let tag = value.value_field(fx, tag_field);
     let tag = tag.load_scalar(fx);
 
     // Decode the discriminant (specifically if it's niche-encoded).
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs
index e9574108696..a5c80895741 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs
@@ -1,7 +1,7 @@
 use std::borrow::Cow;
 
 use libc::c_uint;
-use rustc_abi::{Align, Endian, Size, TagEncoding, VariantIdx, Variants};
+use rustc_abi::{Align, Endian, FieldIdx, Size, TagEncoding, VariantIdx, Variants};
 use rustc_codegen_ssa::debuginfo::type_names::compute_debuginfo_type_name;
 use rustc_codegen_ssa::debuginfo::{tag_base_type, wants_c_like_enum_debuginfo};
 use rustc_codegen_ssa::traits::{ConstCodegenMethods, MiscCodegenMethods};
@@ -401,7 +401,7 @@ fn build_union_fields_for_enum<'ll, 'tcx>(
     enum_type_and_layout: TyAndLayout<'tcx>,
     enum_type_di_node: &'ll DIType,
     variant_indices: impl Iterator<Item = VariantIdx> + Clone,
-    tag_field: usize,
+    tag_field: FieldIdx,
     untagged_variant_index: Option<VariantIdx>,
 ) -> SmallVec<&'ll DIType> {
     let tag_base_type = tag_base_type(cx.tcx, enum_type_and_layout);
@@ -805,7 +805,7 @@ fn build_union_fields_for_direct_tag_enum_or_coroutine<'ll, 'tcx>(
     variant_field_infos: &[VariantFieldInfo<'ll>],
     discr_type_di_node: &'ll DIType,
     tag_base_type: Ty<'tcx>,
-    tag_field: usize,
+    tag_field: FieldIdx,
     untagged_variant_index: Option<VariantIdx>,
     di_flags: DIFlags,
 ) -> SmallVec<&'ll DIType> {
@@ -858,7 +858,7 @@ fn build_union_fields_for_direct_tag_enum_or_coroutine<'ll, 'tcx>(
     }));
 
     assert_eq!(
-        cx.size_and_align_of(enum_type_and_layout.field(cx, tag_field).ty),
+        cx.size_and_align_of(enum_type_and_layout.field(cx, tag_field.as_usize()).ty),
         cx.size_and_align_of(self::tag_base_type(cx.tcx, enum_type_and_layout))
     );
 
@@ -875,7 +875,7 @@ fn build_union_fields_for_direct_tag_enum_or_coroutine<'ll, 'tcx>(
             Endian::Big => (8, 0),
         };
 
-        let tag_field_offset = enum_type_and_layout.fields.offset(tag_field).bytes();
+        let tag_field_offset = enum_type_and_layout.fields.offset(tag_field.as_usize()).bytes();
         let lo_offset = Size::from_bytes(tag_field_offset + lo_offset);
         let hi_offset = Size::from_bytes(tag_field_offset + hi_offset);
 
@@ -905,8 +905,8 @@ fn build_union_fields_for_direct_tag_enum_or_coroutine<'ll, 'tcx>(
             cx,
             enum_type_di_node,
             TAG_FIELD_NAME,
-            enum_type_and_layout.field(cx, tag_field),
-            enum_type_and_layout.fields.offset(tag_field),
+            enum_type_and_layout.field(cx, tag_field.as_usize()),
+            enum_type_and_layout.fields.offset(tag_field.as_usize()),
             di_flags,
             tag_base_type_di_node,
             None,
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs
index 20a841f2287..62d38d463ab 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs
@@ -373,7 +373,7 @@ fn build_discr_member_di_node<'ll, 'tcx>(
                 file,
                 UNKNOWN_LINE_NUMBER,
                 layout,
-                enum_or_coroutine_type_and_layout.fields.offset(tag_field),
+                enum_or_coroutine_type_and_layout.fields.offset(tag_field.as_usize()),
                 DIFlags::FlagArtificial,
                 ty,
             ))
diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs
index eade9e52de9..b7f2277bfda 100644
--- a/compiler/rustc_codegen_ssa/src/mir/operand.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs
@@ -462,10 +462,10 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
         let tag_op = match self.val {
             OperandValue::ZeroSized => bug!(),
             OperandValue::Immediate(_) | OperandValue::Pair(_, _) => {
-                self.extract_field(fx, bx, tag_field)
+                self.extract_field(fx, bx, tag_field.as_usize())
             }
             OperandValue::Ref(place) => {
-                let tag = place.with_type(self.layout).project_field(bx, tag_field);
+                let tag = place.with_type(self.layout).project_field(bx, tag_field.as_usize());
                 bx.load_operand(tag)
             }
         };
diff --git a/compiler/rustc_codegen_ssa/src/mir/place.rs b/compiler/rustc_codegen_ssa/src/mir/place.rs
index 31db7fa9a18..937063c24a6 100644
--- a/compiler/rustc_codegen_ssa/src/mir/place.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/place.rs
@@ -250,7 +250,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
             Variants::Single { index } => assert_eq!(index, variant_index),
 
             Variants::Multiple { tag_encoding: TagEncoding::Direct, tag_field, .. } => {
-                let ptr = self.project_field(bx, tag_field);
+                let ptr = self.project_field(bx, tag_field.as_usize());
                 let to =
                     self.layout.ty.discriminant_for_variant(bx.tcx(), variant_index).unwrap().val;
                 bx.store_to_place(
@@ -265,7 +265,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
                 ..
             } => {
                 if variant_index != untagged_variant {
-                    let niche = self.project_field(bx, tag_field);
+                    let niche = self.project_field(bx, tag_field.as_usize());
                     let niche_llty = bx.cx().immediate_backend_type(niche.layout);
                     let BackendRepr::Scalar(scalar) = niche.layout.backend_repr else {
                         bug!("expected a scalar placeref for the niche");
diff --git a/compiler/rustc_const_eval/src/interpret/discriminant.rs b/compiler/rustc_const_eval/src/interpret/discriminant.rs
index 2f0b1cb6d1e..020cd65d75d 100644
--- a/compiler/rustc_const_eval/src/interpret/discriminant.rs
+++ b/compiler/rustc_const_eval/src/interpret/discriminant.rs
@@ -1,6 +1,6 @@
 //! Functions for reading and writing discriminants of multi-variant layouts (enums and coroutines).
 
-use rustc_abi::{self as abi, TagEncoding, VariantIdx, Variants};
+use rustc_abi::{self as abi, FieldIdx, TagEncoding, VariantIdx, Variants};
 use rustc_middle::ty::layout::{LayoutOf, PrimitiveExt, TyAndLayout};
 use rustc_middle::ty::{self, CoroutineArgsExt, ScalarInt, Ty};
 use rustc_middle::{mir, span_bug};
@@ -26,7 +26,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 // No need to validate that the discriminant here because the
                 // `TyAndLayout::for_variant()` call earlier already checks the
                 // variant is valid.
-                let tag_dest = self.project_field(dest, tag_field)?;
+                let tag_dest = self.project_field(dest, tag_field.as_usize())?;
                 self.write_scalar(tag, &tag_dest)
             }
             None => {
@@ -96,7 +96,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         let tag_layout = self.layout_of(tag_scalar_layout.primitive().to_int_ty(*self.tcx))?;
 
         // Read tag and sanity-check `tag_layout`.
-        let tag_val = self.read_immediate(&self.project_field(op, tag_field)?)?;
+        let tag_val = self.read_immediate(&self.project_field(op, tag_field.as_usize())?)?;
         assert_eq!(tag_layout.size, tag_val.layout.size);
         assert_eq!(tag_layout.backend_repr.is_signed(), tag_val.layout.backend_repr.is_signed());
         trace!("tag value: {}", tag_val);
@@ -231,7 +231,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         &self,
         layout: TyAndLayout<'tcx>,
         variant_index: VariantIdx,
-    ) -> InterpResult<'tcx, Option<(ScalarInt, usize)>> {
+    ) -> InterpResult<'tcx, Option<(ScalarInt, FieldIdx)>> {
         // Layout computation excludes uninhabited variants from consideration.
         // Therefore, there's no way to represent those variants in the given layout.
         // Essentially, uninhabited variants do not have a tag that corresponds to their
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs
index 8f39afa642a..7d76d925ef2 100644
--- a/compiler/rustc_const_eval/src/interpret/validity.rs
+++ b/compiler/rustc_const_eval/src/interpret/validity.rs
@@ -294,7 +294,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
         // First, check if we are projecting to a variant.
         match layout.variants {
             Variants::Multiple { tag_field, .. } => {
-                if tag_field == field {
+                if tag_field.as_usize() == field {
                     return match layout.ty.kind() {
                         ty::Adt(def, ..) if def.is_enum() => PathElem::EnumTag,
                         ty::Coroutine(..) => PathElem::CoroutineTag,
diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs
index 42f6fb7aec1..bebac3a4b78 100644
--- a/compiler/rustc_hir/src/intravisit.rs
+++ b/compiler/rustc_hir/src/intravisit.rs
@@ -1332,8 +1332,9 @@ pub fn walk_precise_capturing_arg<'v, V: Visitor<'v>>(
     match *arg {
         PreciseCapturingArg::Lifetime(lt) => visitor.visit_lifetime(lt),
         PreciseCapturingArg::Param(param) => {
-            let PreciseCapturingNonLifetimeArg { hir_id, ident: _, res: _ } = param;
-            visitor.visit_id(hir_id)
+            let PreciseCapturingNonLifetimeArg { hir_id, ident, res: _ } = param;
+            try_visit!(visitor.visit_id(hir_id));
+            visitor.visit_ident(ident)
         }
     }
 }
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs
index b764b714fe1..3e872607e31 100644
--- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs
+++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs
@@ -7,7 +7,7 @@ use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
 use rustc_errors::codes::*;
 use rustc_errors::{Applicability, ErrorGuaranteed, pluralize, struct_span_code_err};
 use rustc_hir::def::{DefKind, Res};
-use rustc_hir::def_id::{DefId, LocalDefId, LocalModDefId};
+use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_hir::lang_items::LangItem;
 use rustc_hir::{AmbigArg, ItemKind};
 use rustc_infer::infer::outlives::env::OutlivesEnvironment;
@@ -2402,8 +2402,8 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> {
     }
 }
 
-fn check_mod_type_wf(tcx: TyCtxt<'_>, module: LocalModDefId) -> Result<(), ErrorGuaranteed> {
-    let items = tcx.hir_module_items(module);
+fn check_type_wf(tcx: TyCtxt<'_>, (): ()) -> Result<(), ErrorGuaranteed> {
+    let items = tcx.hir_crate_items(());
     let res = items
         .par_items(|item| tcx.ensure_ok().check_well_formed(item.owner_id.def_id))
         .and(items.par_impl_items(|item| tcx.ensure_ok().check_well_formed(item.owner_id.def_id)))
@@ -2412,9 +2412,8 @@ fn check_mod_type_wf(tcx: TyCtxt<'_>, module: LocalModDefId) -> Result<(), Error
             items.par_foreign_items(|item| tcx.ensure_ok().check_well_formed(item.owner_id.def_id)),
         )
         .and(items.par_opaques(|item| tcx.ensure_ok().check_well_formed(item)));
-    if module == LocalModDefId::CRATE_DEF_ID {
-        super::entry::check_for_entry_fn(tcx);
-    }
+    super::entry::check_for_entry_fn(tcx);
+
     res
 }
 
@@ -2552,5 +2551,5 @@ struct RedundantLifetimeArgsLint<'tcx> {
 }
 
 pub fn provide(providers: &mut Providers) {
-    *providers = Providers { check_mod_type_wf, check_well_formed, ..*providers };
+    *providers = Providers { check_type_wf, check_well_formed, ..*providers };
 }
diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs
index a64c24f5455..f255817bffc 100644
--- a/compiler/rustc_hir_analysis/src/lib.rs
+++ b/compiler/rustc_hir_analysis/src/lib.rs
@@ -182,9 +182,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
         // what we are intending to discard, to help future type-based refactoring.
         type R = Result<(), ErrorGuaranteed>;
 
-        tcx.par_hir_for_each_module(|module| {
-            let _: R = tcx.ensure_ok().check_mod_type_wf(module);
-        });
+        let _: R = tcx.ensure_ok().check_type_wf(());
 
         for &trait_def_id in tcx.all_local_trait_impls(()).keys() {
             let _: R = tcx.ensure_ok().coherent_trait(trait_def_id);
diff --git a/compiler/rustc_middle/src/dep_graph/mod.rs b/compiler/rustc_middle/src/dep_graph/mod.rs
index 931d67087ac..0a8e6153817 100644
--- a/compiler/rustc_middle/src/dep_graph/mod.rs
+++ b/compiler/rustc_middle/src/dep_graph/mod.rs
@@ -2,6 +2,7 @@ use rustc_data_structures::profiling::SelfProfilerRef;
 use rustc_query_system::ich::StableHashingContext;
 use rustc_session::Session;
 
+use crate::ty::print::with_reduced_queries;
 use crate::ty::{self, TyCtxt};
 
 #[macro_use]
@@ -84,4 +85,8 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
     fn dep_kind_info(&self, dk: DepKind) -> &DepKindStruct<'tcx> {
         &self.query_kinds[dk.as_usize()]
     }
+
+    fn with_reduced_queries<T>(self, f: impl FnOnce() -> T) -> T {
+        with_reduced_queries!(f())
+    }
 }
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 542653efd30..d900e16b005 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -1148,8 +1148,8 @@ rustc_queries! {
         desc { |tcx| "checking deathness of variables in {}", describe_as_module(key, tcx) }
     }
 
-    query check_mod_type_wf(key: LocalModDefId) -> Result<(), ErrorGuaranteed> {
-        desc { |tcx| "checking that types are well-formed in {}", describe_as_module(key, tcx) }
+    query check_type_wf(key: ()) -> Result<(), ErrorGuaranteed> {
+        desc { "checking that types are well-formed" }
         return_result_from_ensure_ok
     }
 
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
index 7ebfebea44e..c2ae6b06192 100644
--- a/compiler/rustc_middle/src/ty/layout.rs
+++ b/compiler/rustc_middle/src/ty/layout.rs
@@ -934,7 +934,7 @@ where
                             .unwrap(),
                     ),
                     Variants::Multiple { tag, tag_field, .. } => {
-                        if i == tag_field {
+                        if FieldIdx::from_usize(i) == tag_field {
                             return TyMaybeWithLayout::TyAndLayout(tag_layout(tag));
                         }
                         TyMaybeWithLayout::Ty(args.as_coroutine().prefix_tys()[i])
@@ -1060,8 +1060,10 @@ where
                         tag_field,
                         variants,
                         ..
-                    } if variants.len() == 2 && this.fields.offset(*tag_field) == offset => {
-                        let tagged_variant = if untagged_variant.as_u32() == 0 {
+                    } if variants.len() == 2
+                        && this.fields.offset(tag_field.as_usize()) == offset =>
+                    {
+                        let tagged_variant = if *untagged_variant == VariantIdx::ZERO {
                             VariantIdx::from_u32(1)
                         } else {
                             VariantIdx::from_u32(0)
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index 877bea095f9..673a89a8134 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -1886,7 +1886,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
     ) -> Result<(), PrintError> {
         define_scoped_cx!(self);
 
-        if self.should_print_verbose() {
+        if with_reduced_queries() || self.should_print_verbose() {
             p!(write("ValTree({:?}: ", cv.valtree), print(cv.ty), ")");
             return Ok(());
         }
diff --git a/compiler/rustc_mir_transform/src/coroutine/drop.rs b/compiler/rustc_mir_transform/src/coroutine/drop.rs
index 6b266da5a69..625e53f9959 100644
--- a/compiler/rustc_mir_transform/src/coroutine/drop.rs
+++ b/compiler/rustc_mir_transform/src/coroutine/drop.rs
@@ -382,12 +382,34 @@ pub(super) fn expand_async_drops<'tcx>(
             dropline_call_bb = Some(drop_call_bb);
         }
 
-        // value needed only for return-yields or gen-coroutines, so just const here
-        let value = Operand::Constant(Box::new(ConstOperand {
-            span: body.span,
-            user_ty: None,
-            const_: Const::from_bool(tcx, false),
-        }));
+        let value =
+            if matches!(coroutine_kind, CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, _))
+            {
+                // For AsyncGen we need `yield Poll<OptRet>::Pending`
+                let full_yield_ty = body.yield_ty().unwrap();
+                let ty::Adt(_poll_adt, args) = *full_yield_ty.kind() else { bug!() };
+                let ty::Adt(_option_adt, args) = *args.type_at(0).kind() else { bug!() };
+                let yield_ty = args.type_at(0);
+                Operand::Constant(Box::new(ConstOperand {
+                    span: source_info.span,
+                    const_: Const::Unevaluated(
+                        UnevaluatedConst::new(
+                            tcx.require_lang_item(LangItem::AsyncGenPending, None),
+                            tcx.mk_args(&[yield_ty.into()]),
+                        ),
+                        full_yield_ty,
+                    ),
+                    user_ty: None,
+                }))
+            } else {
+                // value needed only for return-yields or gen-coroutines, so just const here
+                Operand::Constant(Box::new(ConstOperand {
+                    span: body.span,
+                    user_ty: None,
+                    const_: Const::from_bool(tcx, false),
+                }))
+            };
+
         use rustc_middle::mir::AssertKind::ResumedAfterDrop;
         let panic_bb = insert_panic_block(tcx, body, ResumedAfterDrop(coroutine_kind));
 
diff --git a/compiler/rustc_query_system/src/dep_graph/dep_node.rs b/compiler/rustc_query_system/src/dep_graph/dep_node.rs
index c0b3bd43e25..bdd1d5f3e88 100644
--- a/compiler/rustc_query_system/src/dep_graph/dep_node.rs
+++ b/compiler/rustc_query_system/src/dep_graph/dep_node.rs
@@ -178,9 +178,7 @@ pub trait DepNodeParams<Tcx: DepContext>: fmt::Debug + Sized {
         panic!("Not implemented. Accidentally called on anonymous node?")
     }
 
-    fn to_debug_str(&self, _: Tcx) -> String {
-        format!("{self:?}")
-    }
+    fn to_debug_str(&self, tcx: Tcx) -> String;
 
     /// This method tries to recover the query key from the given `DepNode`,
     /// something which is needed when forcing `DepNode`s during red-green
@@ -210,8 +208,11 @@ where
     }
 
     #[inline(always)]
-    default fn to_debug_str(&self, _: Tcx) -> String {
-        format!("{:?}", *self)
+    default fn to_debug_str(&self, tcx: Tcx) -> String {
+        // Make sure to print dep node params with reduced queries since printing
+        // may themselves call queries, which may lead to (possibly untracked!)
+        // query cycles.
+        tcx.with_reduced_queries(|| format!("{self:?}"))
     }
 
     #[inline(always)]
diff --git a/compiler/rustc_query_system/src/dep_graph/mod.rs b/compiler/rustc_query_system/src/dep_graph/mod.rs
index 89d1db87809..512034a8b2f 100644
--- a/compiler/rustc_query_system/src/dep_graph/mod.rs
+++ b/compiler/rustc_query_system/src/dep_graph/mod.rs
@@ -88,6 +88,8 @@ pub trait DepContext: Copy {
             f(self, dep_node)
         }
     }
+
+    fn with_reduced_queries<T>(self, _: impl FnOnce() -> T) -> T;
 }
 
 pub trait Deps: DynSync {
diff --git a/compiler/rustc_smir/src/rustc_smir/convert/abi.rs b/compiler/rustc_smir/src/rustc_smir/convert/abi.rs
index 06dfaf079a3..64901ee0502 100644
--- a/compiler/rustc_smir/src/rustc_smir/convert/abi.rs
+++ b/compiler/rustc_smir/src/rustc_smir/convert/abi.rs
@@ -180,7 +180,7 @@ impl<'tcx> Stable<'tcx> for rustc_abi::Variants<rustc_abi::FieldIdx, rustc_abi::
                 VariantsShape::Multiple {
                     tag: tag.stable(tables),
                     tag_encoding: tag_encoding.stable(tables),
-                    tag_field: *tag_field,
+                    tag_field: tag_field.stable(tables),
                     variants: variants.iter().as_slice().stable(tables),
                 }
             }
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs
index c4f1f7d712a..9c301373cf9 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs
@@ -3841,7 +3841,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                     .expr_ty_adjusted_opt(inner_expr)
                     .unwrap_or(Ty::new_misc_error(tcx));
                 let span = inner_expr.span;
-                if Some(span) != err.span.primary_span() {
+                if Some(span) != err.span.primary_span()
+                    && !span.in_external_macro(tcx.sess.source_map())
+                {
                     err.span_label(
                         span,
                         if ty.references_error() {
diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs
index 7cf712ce9e9..ff665695b5a 100644
--- a/compiler/rustc_transmute/src/layout/tree.rs
+++ b/compiler/rustc_transmute/src/layout/tree.rs
@@ -451,7 +451,7 @@ pub(crate) mod rustc {
 
                     // For enums (but not coroutines), the tag field is
                     // currently always the first field of the layout.
-                    assert_eq!(*tag_field, 0);
+                    assert_eq!(*tag_field, FieldIdx::ZERO);
 
                     let variants = def.discriminants(cx.tcx()).try_fold(
                         Self::uninhabited(),
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs
index ad57555bd24..9774263e4c9 100644
--- a/compiler/rustc_ty_utils/src/layout.rs
+++ b/compiler/rustc_ty_utils/src/layout.rs
@@ -932,7 +932,7 @@ fn variant_info_for_coroutine<'tcx>(
             // However, if the discriminant is placed past the end of the variant, then we need
             // to factor in the size of the discriminant manually. This really should be refactored
             // better, but this "works" for now.
-            if layout.fields.offset(tag_field) >= variant_size {
+            if layout.fields.offset(tag_field.as_usize()) >= variant_size {
                 variant_size += match tag_encoding {
                     TagEncoding::Direct => tag.size(cx),
                     _ => Size::ZERO,
diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md
index 95e6afae8a1..bb109adf76f 100644
--- a/src/doc/rustc/src/codegen-options/index.md
+++ b/src/doc/rustc/src/codegen-options/index.md
@@ -192,7 +192,7 @@ to save information after compiling a crate to be reused when recompiling the
 crate, improving re-compile times. This takes a path to a directory where
 incremental files will be stored.
 
-Using incremental compilation inhibits certain optimizations (for example by increasing the amount of codegen units) and is therefore not recommend for release builds.
+Using incremental compilation inhibits certain optimizations (for example by increasing the amount of codegen units) and is therefore not recommended for release builds.
 
 ## inline-threshold
 
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py
index 06fc6518e3b..1806e2be9bb 100755
--- a/src/etc/htmldocck.py
+++ b/src/etc/htmldocck.py
@@ -2,120 +2,8 @@
 # -*- coding: utf-8 -*-
 
 r"""
-htmldocck.py is a custom checker script for Rustdoc HTML outputs.
-
-# How and why?
-
-The principle is simple: This script receives a path to generated HTML
-documentation and a "template" script, which has a series of check
-commands like `@has` or `@matches`. Each command is used to check if
-some pattern is present or not present in the particular file or in
-a particular node of the HTML tree. In many cases, the template script
-happens to be the source code given to rustdoc.
-
-While it indeed is possible to test in smaller portions, it has been
-hard to construct tests in this fashion and major rendering errors were
-discovered much later. This script is designed to make black-box and
-regression testing of Rustdoc easy. This does not preclude the needs for
-unit testing, but can be used to complement related tests by quickly
-showing the expected renderings.
-
-In order to avoid one-off dependencies for this task, this script uses
-a reasonably working HTML parser and the existing XPath implementation
-from Python's standard library. Hopefully, we won't render
-non-well-formed HTML.
-
-# Commands
-
-Commands start with an `@` followed by a command name (letters and
-hyphens), and zero or more arguments separated by one or more whitespace
-characters and optionally delimited with single or double quotes. The `@`
-mark cannot be preceded by a non-whitespace character. Other lines
-(including every text up to the first `@`) are ignored, but it is
-recommended to avoid the use of `@` in the template file.
-
-There are a number of supported commands:
-
-* `@has PATH` checks for the existence of the given file.
-
-  `PATH` is relative to the output directory. It can be given as `-`
-  which repeats the most recently used `PATH`.
-
-* `@hasraw PATH PATTERN` and `@matchesraw PATH PATTERN` checks
-  for the occurrence of the given pattern `PATTERN` in the specified file.
-  Only one occurrence of the pattern is enough.
-
-  For `@hasraw`, `PATTERN` is a whitespace-normalized (every consecutive
-  whitespace being replaced by one single space character) string.
-  The entire file is also whitespace-normalized including newlines.
-
-  For `@matchesraw`, `PATTERN` is a Python-supported regular expression.
-  The file remains intact but the regexp is matched without the `MULTILINE`
-  and `IGNORECASE` options. You can still use a prefix `(?m)` or `(?i)`
-  to override them, and `\A` and `\Z` for definitely matching
-  the beginning and end of the file.
-
-  (The same distinction goes to other variants of these commands.)
-
-* `@has PATH XPATH PATTERN` and `@matches PATH XPATH PATTERN` checks for
-  the presence of the given XPath `XPATH` in the specified HTML file,
-  and also the occurrence of the given pattern `PATTERN` in the matching
-  node or attribute. Only one occurrence of the pattern in the match
-  is enough.
-
-  `PATH` should be a valid and well-formed HTML file. It does *not*
-  accept arbitrary HTML5; it should have matching open and close tags
-  and correct entity references at least.
-
-  `XPATH` is an XPath expression to match. The XPath is fairly limited:
-  `tag`, `*`, `.`, `//`, `..`, `[@attr]`, `[@attr='value']`, `[tag]`,
-  `[POS]` (element located in given `POS`), `[last()-POS]`, `text()`
-  and `@attr` (both as the last segment) are supported. Some examples:
-
-  - `//pre` or `.//pre` matches any element with a name `pre`.
-  - `//a[@href]` matches any element with an `href` attribute.
-  - `//*[@class="impl"]//code` matches any element with a name `code`,
-    which is an ancestor of some element which `class` attr is `impl`.
-  - `//h1[@class="fqn"]/span[1]/a[last()]/@class` matches a value of
-    `class` attribute in the last `a` element (can be followed by more
-    elements that are not `a`) inside the first `span` in the `h1` with
-    a class of `fqn`. Note that there cannot be any additional elements
-    between them due to the use of `/` instead of `//`.
-
-  Do not try to use non-absolute paths, it won't work due to the flawed
-  ElementTree implementation. The script rejects them.
-
-  For the text matches (i.e. paths not ending with `@attr`), any
-  subelements are flattened into one string; this is handy for ignoring
-  highlights for example. If you want to simply check for the presence of
-  a given node or attribute, use an empty string (`""`) as a `PATTERN`.
-
-* `@count PATH XPATH COUNT` checks for the occurrence of the given XPath
-  in the specified file. The number of occurrences must match the given
-  count.
-
-* `@count PATH XPATH TEXT COUNT` checks for the occurrence of the given XPath
-  with the given text in the specified file. The number of occurrences must
-  match the given count.
-
-* `@snapshot NAME PATH XPATH` creates a snapshot test named NAME.
-  A snapshot test captures a subtree of the DOM, at the location
-  determined by the XPath, and compares it to a pre-recorded value
-  in a file. The file's name is the test's name with the `.rs` extension
-  replaced with `.NAME.html`, where NAME is the snapshot's name.
-
-  htmldocck supports the `--bless` option to accept the current subtree
-  as expected, saving it to the file determined by the snapshot's name.
-  compiletest's `--bless` flag is forwarded to htmldocck.
-
-* `@has-dir PATH` checks for the existence of the given directory.
-
-* `@files FOLDER_PATH [ENTRIES]`, checks that `FOLDER_PATH` contains exactly
-  `[ENTRIES]`.
-
-All conditions can be negated with `!`. `@!has foo/type.NoSuch.html`
-checks if the given file does not exist, for example.
-
+For documentation and usage instructions, please see
+https://rustc-dev-guide.rust-lang.org/rustdoc-internals/rustdoc-test-suite.html
 """
 
 from __future__ import absolute_import, print_function, unicode_literals
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 9d1c9ff00b1..204f8decffc 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -345,9 +345,7 @@ pub(crate) fn run_global_ctxt(
     // (see `override_queries` in the `config`)
 
     // NOTE: These are copy/pasted from typeck/lib.rs and should be kept in sync with those changes.
-    let _ = tcx.sess.time("wf_checking", || {
-        tcx.try_par_hir_for_each_module(|module| tcx.ensure_ok().check_mod_type_wf(module))
-    });
+    let _ = tcx.sess.time("wf_checking", || tcx.ensure_ok().check_type_wf(()));
 
     tcx.dcx().abort_if_errors();
 
diff --git a/tests/incremental/print-dep-node-cycle.rs b/tests/incremental/print-dep-node-cycle.rs
new file mode 100644
index 00000000000..931d3da521e
--- /dev/null
+++ b/tests/incremental/print-dep-node-cycle.rs
@@ -0,0 +1,25 @@
+//@ compile-flags: -Z query-dep-graph
+//@ revisions: rpass1
+
+// Exercises a debug-assertions-only query cycle that when printing a valtree const in
+// a dep node's debug representation, we end up invoking a query that also has a valtree
+// const in its dep node's debug representation, which leads to a cycle (and ICE, since
+// deps are not tracked when printing dep nodes' debug representations).
+
+#![feature(adt_const_params)]
+
+use std::marker::ConstParamTy;
+
+#[derive(Debug, ConstParamTy, PartialEq, Eq)]
+enum Foo {
+    A1,
+}
+
+#[inline(never)]
+fn hello<const F: Foo>() {
+    println!("{:#?}", F);
+}
+
+fn main() {
+    hello::<{ Foo::A1 }>();
+}
diff --git a/tests/crashes/140530.rs b/tests/ui/async-await/async-drop/assign-incompatible-types.rs
index 7e0372a4bd8..359939ff9ac 100644
--- a/tests/crashes/140530.rs
+++ b/tests/ui/async-await/async-drop/assign-incompatible-types.rs
@@ -1,7 +1,8 @@
-//@ known-bug: #140530
+// ex-ice: #140530
 //@ edition: 2024
-
+//@ build-pass
 #![feature(async_drop, gen_blocks)]
+#![allow(incomplete_features)]
 async gen fn a() {
   _ = async {}
 }
diff --git a/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr b/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr
index c9e657b87d5..2f417d57752 100644
--- a/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr
+++ b/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr
@@ -12,14 +12,6 @@ note: required by a bound in `compare_ty::Trait::Ty`
 LL |         type Ty: IntoIterator<Item = ()>;
    |                               ^^^^^^^^^ required by this bound in `Trait::Ty`
 
-error: unconstrained opaque type
-  --> $DIR/in-assoc-type-unconstrained.rs:8:26
-   |
-LL |         type Ty = Option<impl Sized>;
-   |                          ^^^^^^^^^^
-   |
-   = note: `Ty` must be used in combination with a concrete type within the same impl
-
 error[E0053]: method `method` has an incompatible type for trait
   --> $DIR/in-assoc-type-unconstrained.rs:22:24
    |
@@ -43,6 +35,14 @@ LL +         fn method() -> <() as compare_method::Trait>::Ty {}
    |
 
 error: unconstrained opaque type
+  --> $DIR/in-assoc-type-unconstrained.rs:8:26
+   |
+LL |         type Ty = Option<impl Sized>;
+   |                          ^^^^^^^^^^
+   |
+   = note: `Ty` must be used in combination with a concrete type within the same impl
+
+error: unconstrained opaque type
   --> $DIR/in-assoc-type-unconstrained.rs:20:19
    |
 LL |         type Ty = impl Sized;
diff --git a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
index 7f642fa1bed..ce6f68f535b 100644
--- a/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
+++ b/tests/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
@@ -15,19 +15,6 @@ LL -         fn eq(&self, _other: &(Foo, i32)) -> bool {
 LL +         fn eq(&self, _other: &(a::Bar, i32)) -> bool {
    |
 
-error: item does not constrain `a::Foo::{opaque#0}`
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:10:12
-   |
-LL |         fn eq(&self, _other: &(Foo, i32)) -> bool {
-   |            ^^
-   |
-   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
-note: this opaque type is supposed to be constrained
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:4:16
-   |
-LL |     type Foo = impl PartialEq<(Foo, i32)>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
 error[E0053]: method `eq` has an incompatible type for trait
   --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:25:30
    |
@@ -50,6 +37,19 @@ LL -         fn eq(&self, _other: &(Bar, i32)) -> bool {
 LL +         fn eq(&self, _other: &(b::Foo, i32)) -> bool {
    |
 
+error: item does not constrain `a::Foo::{opaque#0}`
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:10:12
+   |
+LL |         fn eq(&self, _other: &(Foo, i32)) -> bool {
+   |            ^^
+   |
+   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
+note: this opaque type is supposed to be constrained
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:4:16
+   |
+LL |     type Foo = impl PartialEq<(Foo, i32)>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: unconstrained opaque type
   --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:19:16
    |
diff --git a/tests/ui/issues/issue-20427.rs b/tests/ui/issues/issue-20427.rs
index ff84023ebf2..4018043c371 100644
--- a/tests/ui/issues/issue-20427.rs
+++ b/tests/ui/issues/issue-20427.rs
@@ -59,7 +59,7 @@ mod reuse {
 
     pub fn check<u16>() {
         assert_eq!(size_of::<u8>(), 8);
-        assert_eq!(size_of::<::u64>(), 0);
+        assert_eq!(size_of::<crate::u64>(), 0);
         assert_eq!(size_of::<i16>(), 3 * size_of::<*const ()>());
         assert_eq!(size_of::<u16>(), 0);
     }
diff --git a/tests/ui/issues/issue-28983.rs b/tests/ui/issues/issue-28983.rs
index 5273dab16c1..90a4793787d 100644
--- a/tests/ui/issues/issue-28983.rs
+++ b/tests/ui/issues/issue-28983.rs
@@ -7,7 +7,7 @@ impl Test for u32 {
 
 pub mod export {
     #[no_mangle]
-    pub extern "C" fn issue_28983(t: <u32 as ::Test>::T) -> i32 { t*3 }
+    pub extern "C" fn issue_28983(t: <u32 as crate::Test>::T) -> i32 { t*3 }
 }
 
 // to test both exporting and importing functions, import
diff --git a/tests/ui/issues/issue-31776.rs b/tests/ui/issues/issue-31776.rs
index 4b342a0e3b2..abe6c7ecee5 100644
--- a/tests/ui/issues/issue-31776.rs
+++ b/tests/ui/issues/issue-31776.rs
@@ -8,7 +8,7 @@ struct S;
 
 mod m {
     fn f() {
-        impl ::S {
+        impl crate::S {
             pub fn s(&self) {}
         }
     }
@@ -24,7 +24,7 @@ pub struct S1;
 fn f() {
     pub struct Z;
 
-    impl ::Tr for ::S1 {
+    impl crate::Tr for crate::S1 {
         type A = Z; // Private-in-public error unless `struct Z` is pub
     }
 }
@@ -43,7 +43,7 @@ mod m1 {
             pub field: u8
         }
 
-        impl ::Tr1 for ::S2 {
+        impl crate::Tr1 for crate::S2 {
             type A = Z;
             fn pull(&self) -> Self::A { Z{field: 10} }
         }
diff --git a/tests/ui/issues/issue-32797.rs b/tests/ui/issues/issue-32797.rs
index 6711a8f9fe5..470d661cb28 100644
--- a/tests/ui/issues/issue-32797.rs
+++ b/tests/ui/issues/issue-32797.rs
@@ -7,7 +7,7 @@ mod bar {
 
 pub use baz::*;
 mod baz {
-    pub use main as f;
+    pub use crate::main as f;
 }
 
 pub fn main() {}
diff --git a/tests/ui/issues/issue-41053.rs b/tests/ui/issues/issue-41053.rs
index 18f9e209c33..42b0b008ce9 100644
--- a/tests/ui/issues/issue-41053.rs
+++ b/tests/ui/issues/issue-41053.rs
@@ -11,7 +11,7 @@ impl Iterator for Foo {
     type Item = Box<dyn Trait>;
     fn next(&mut self) -> Option<Box<dyn Trait>> {
         extern crate issue_41053;
-        impl ::Trait for issue_41053::Test {
+        impl crate::Trait for issue_41053::Test {
             fn foo(&self) {}
         }
         Some(Box::new(issue_41053::Test))
diff --git a/tests/ui/issues/issue-47364.rs b/tests/ui/issues/issue-47364.rs
index b657b3d3bde..79cd5ed92a8 100644
--- a/tests/ui/issues/issue-47364.rs
+++ b/tests/ui/issues/issue-47364.rs
@@ -18,18 +18,18 @@ pub enum IResult<I,O> {
     Incomplete(u32, u64)
 }
 
-pub fn multispace<T: Copy>(input: T) -> ::IResult<i8, i8> {
-    ::IResult::Done(0, 0)
+pub fn multispace<T: Copy>(input: T) -> crate::IResult<i8, i8> {
+    crate::IResult::Done(0, 0)
 }
 
 mod nom_sql {
-    fn where_clause(i: &[u8]) -> ::IResult<&[u8], Option<String>> {
-        let X = match ::multispace(i) {
-            ::IResult::Done(..) => ::IResult::Done(i, None::<String>),
-            _ => ::IResult::Error(::Err::NodePosition(0)),
+    fn where_clause(i: &[u8]) -> crate::IResult<&[u8], Option<String>> {
+        let X = match crate::multispace(i) {
+            crate::IResult::Done(..) => crate::IResult::Done(i, None::<String>),
+            _ => crate::IResult::Error(crate::Err::NodePosition(0)),
         };
         match X {
-            ::IResult::Done(_, _) => ::IResult::Done(i, None),
+            crate::IResult::Done(_, _) => crate::IResult::Done(i, None),
             _ => X
         }
     }
@@ -39,16 +39,16 @@ mod nom_sql {
             match {
                 where_clause(i)
             } {
-                ::IResult::Done(_, o) => ::IResult::Done(i, Some(o)),
-                ::IResult::Error(_) => ::IResult::Done(i, None),
-                _ => ::IResult::Incomplete(0, 0),
+                crate::IResult::Done(_, o) => crate::IResult::Done(i, Some(o)),
+                crate::IResult::Error(_) => crate::IResult::Done(i, None),
+                _ => crate::IResult::Incomplete(0, 0),
             }
         } {
-            ::IResult::Done(z, _) => ::IResult::Done(z, None::<String>),
+            crate::IResult::Done(z, _) => crate::IResult::Done(z, None::<String>),
             _ => return ()
         };
         match Y {
-            ::IResult::Done(x, _) => {
+            crate::IResult::Done(x, _) => {
                 let bytes = b";   ";
                 let len = x.len();
                 bytes[len];
diff --git a/tests/ui/issues/issue-50187.rs b/tests/ui/issues/issue-50187.rs
index 7304903b954..478416f86dc 100644
--- a/tests/ui/issues/issue-50187.rs
+++ b/tests/ui/issues/issue-50187.rs
@@ -13,20 +13,20 @@ mod macro_ns {
 }
 
 mod merge2 {
-    pub use type_ns::A;
-    pub use value_ns::A;
+    pub use crate::type_ns::A;
+    pub use crate::value_ns::A;
 }
 mod merge3 {
-    pub use type_ns::A;
-    pub use value_ns::A;
-    pub use macro_ns::A;
+    pub use crate::type_ns::A;
+    pub use crate::value_ns::A;
+    pub use crate::macro_ns::A;
 }
 
 mod use2 {
-    pub use merge2::A;
+    pub use crate::merge2::A;
 }
 mod use3 {
-    pub use merge3::A;
+    pub use crate::merge3::A;
 }
 
 fn main() {
diff --git a/tests/ui/issues/issue-50761.rs b/tests/ui/issues/issue-50761.rs
index 6911bfa0265..8f5a32e0a00 100644
--- a/tests/ui/issues/issue-50761.rs
+++ b/tests/ui/issues/issue-50761.rs
@@ -14,7 +14,7 @@ mod b {
     }
 
     impl Builder {
-        pub fn with_a(&mut self, _a: fn() -> dyn (::a::A)) {}
+        pub fn with_a(&mut self, _a: fn() -> dyn (crate::a::A)) {}
     }
 }
 
diff --git a/tests/ui/issues/issue-6936.rs b/tests/ui/issues/issue-6936.rs
index 26531bba9ec..e9aa80b4eb3 100644
--- a/tests/ui/issues/issue-6936.rs
+++ b/tests/ui/issues/issue-6936.rs
@@ -1,22 +1,22 @@
 struct T;
 
 mod t1 {
-    type Foo = ::T;
+    type Foo = crate::T;
     mod Foo {} //~ ERROR the name `Foo` is defined multiple times
 }
 
 mod t2 {
-    type Foo = ::T;
+    type Foo = crate::T;
     struct Foo; //~ ERROR the name `Foo` is defined multiple times
 }
 
 mod t3 {
-    type Foo = ::T;
+    type Foo = crate::T;
     enum Foo {} //~ ERROR the name `Foo` is defined multiple times
 }
 
 mod t4 {
-    type Foo = ::T;
+    type Foo = crate::T;
     fn Foo() {} // ok
 }
 
@@ -26,7 +26,7 @@ mod t5 {
 }
 
 mod t6 {
-    type Foo = ::T;
+    type Foo = crate::T;
     impl Foo {} // ok
 }
 
diff --git a/tests/ui/issues/issue-6936.stderr b/tests/ui/issues/issue-6936.stderr
index 9292d60ca68..03cc50636b4 100644
--- a/tests/ui/issues/issue-6936.stderr
+++ b/tests/ui/issues/issue-6936.stderr
@@ -1,8 +1,8 @@
 error[E0428]: the name `Foo` is defined multiple times
   --> $DIR/issue-6936.rs:5:5
    |
-LL |     type Foo = ::T;
-   |     --------------- previous definition of the type `Foo` here
+LL |     type Foo = crate::T;
+   |     -------------------- previous definition of the type `Foo` here
 LL |     mod Foo {}
    |     ^^^^^^^ `Foo` redefined here
    |
@@ -11,8 +11,8 @@ LL |     mod Foo {}
 error[E0428]: the name `Foo` is defined multiple times
   --> $DIR/issue-6936.rs:10:5
    |
-LL |     type Foo = ::T;
-   |     --------------- previous definition of the type `Foo` here
+LL |     type Foo = crate::T;
+   |     -------------------- previous definition of the type `Foo` here
 LL |     struct Foo;
    |     ^^^^^^^^^^^ `Foo` redefined here
    |
@@ -21,8 +21,8 @@ LL |     struct Foo;
 error[E0428]: the name `Foo` is defined multiple times
   --> $DIR/issue-6936.rs:15:5
    |
-LL |     type Foo = ::T;
-   |     --------------- previous definition of the type `Foo` here
+LL |     type Foo = crate::T;
+   |     -------------------- previous definition of the type `Foo` here
 LL |     enum Foo {}
    |     ^^^^^^^^ `Foo` redefined here
    |
diff --git a/tests/ui/issues/issue-7663.rs b/tests/ui/issues/issue-7663.rs
index ad52ea21127..d2b2c727cab 100644
--- a/tests/ui/issues/issue-7663.rs
+++ b/tests/ui/issues/issue-7663.rs
@@ -8,7 +8,7 @@ mod test1 {
     mod bar { pub fn p() -> isize { 2 } }
 
     pub mod baz {
-        use test1::bar::p;
+        use crate::test1::bar::p;
 
         pub fn my_main() { assert_eq!(p(), 2); }
     }
@@ -20,7 +20,7 @@ mod test2 {
     mod bar { pub fn p() -> isize { 2 } }
 
     pub mod baz {
-        use test2::bar::p;
+        use crate::test2::bar::p;
 
         pub fn my_main() { assert_eq!(p(), 2); }
     }
diff --git a/tests/ui/lint/lint-directives-on-use-items-issue-10534.rs b/tests/ui/lint/lint-directives-on-use-items-issue-10534.rs
index e5cb0d3df0e..55ecb564beb 100644
--- a/tests/ui/lint/lint-directives-on-use-items-issue-10534.rs
+++ b/tests/ui/lint/lint-directives-on-use-items-issue-10534.rs
@@ -9,16 +9,16 @@
 mod a { pub static x: isize = 3; pub static y: isize = 4; }
 
 mod b {
-    use a::x; //~ ERROR: unused import
+    use crate::a::x; //~ ERROR: unused import
     #[allow(unused_imports)]
-    use a::y; // no error here
+    use crate::a::y; // no error here
 }
 
 #[allow(unused_imports)]
 mod c {
-    use a::x;
+    use crate::a::x;
     #[deny(unused_imports)]
-    use a::y; //~ ERROR: unused import
+    use crate::a::y; //~ ERROR: unused import
 }
 
 fn main() {}
diff --git a/tests/ui/lint/lint-directives-on-use-items-issue-10534.stderr b/tests/ui/lint/lint-directives-on-use-items-issue-10534.stderr
index ccb139e0ed6..c394d1e7932 100644
--- a/tests/ui/lint/lint-directives-on-use-items-issue-10534.stderr
+++ b/tests/ui/lint/lint-directives-on-use-items-issue-10534.stderr
@@ -1,8 +1,8 @@
-error: unused import: `a::x`
+error: unused import: `crate::a::x`
   --> $DIR/lint-directives-on-use-items-issue-10534.rs:12:9
    |
-LL |     use a::x;
-   |         ^^^^
+LL |     use crate::a::x;
+   |         ^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/lint-directives-on-use-items-issue-10534.rs:1:9
@@ -10,11 +10,11 @@ note: the lint level is defined here
 LL | #![deny(unused_imports)]
    |         ^^^^^^^^^^^^^^
 
-error: unused import: `a::y`
+error: unused import: `crate::a::y`
   --> $DIR/lint-directives-on-use-items-issue-10534.rs:21:9
    |
-LL |     use a::y;
-   |         ^^^^
+LL |     use crate::a::y;
+   |         ^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/lint-directives-on-use-items-issue-10534.rs:20:12
diff --git a/tests/ui/lint/lint-missing-doc.rs b/tests/ui/lint/lint-missing-doc.rs
index 0b7c99e5012..b8655994fc2 100644
--- a/tests/ui/lint/lint-missing-doc.rs
+++ b/tests/ui/lint/lint-missing-doc.rs
@@ -184,10 +184,10 @@ mod internal_impl {
 }
 /// dox
 pub mod public_interface {
-    pub use internal_impl::documented as foo;
-    pub use internal_impl::undocumented1 as bar;
-    pub use internal_impl::{documented, undocumented2};
-    pub use internal_impl::globbed::*;
+    pub use crate::internal_impl::documented as foo;
+    pub use crate::internal_impl::undocumented1 as bar;
+    pub use crate::internal_impl::{documented, undocumented2};
+    pub use crate::internal_impl::globbed::*;
 }
 
 extern "C" {
diff --git a/tests/ui/lint/lint-unnecessary-import-braces.rs b/tests/ui/lint/lint-unnecessary-import-braces.rs
index 9a3398a8734..a9c8da85a22 100644
--- a/tests/ui/lint/lint-unnecessary-import-braces.rs
+++ b/tests/ui/lint/lint-unnecessary-import-braces.rs
@@ -1,10 +1,10 @@
 #![deny(unused_import_braces)]
 
-use test::{A}; //~ ERROR braces around A is unnecessary
+use crate::test::{A}; //~ ERROR braces around A is unnecessary
 
 mod test {
-    use test::{self}; // OK
-    use test::{self as rename}; // OK
+    use crate::test::{self}; // OK
+    use crate::test::{self as rename}; // OK
     pub struct A;
 }
 
diff --git a/tests/ui/lint/lint-unnecessary-import-braces.stderr b/tests/ui/lint/lint-unnecessary-import-braces.stderr
index 5f441ef4a66..dc470551cd4 100644
--- a/tests/ui/lint/lint-unnecessary-import-braces.stderr
+++ b/tests/ui/lint/lint-unnecessary-import-braces.stderr
@@ -1,8 +1,8 @@
 error: braces around A is unnecessary
   --> $DIR/lint-unnecessary-import-braces.rs:3:1
    |
-LL | use test::{A};
-   | ^^^^^^^^^^^^^^
+LL | use crate::test::{A};
+   | ^^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/lint-unnecessary-import-braces.rs:1:9
diff --git a/tests/ui/lint/unused/lint-unused-imports.rs b/tests/ui/lint/unused/lint-unused-imports.rs
index 710fb7a5ed1..d09a84b59a3 100644
--- a/tests/ui/lint/unused/lint-unused-imports.rs
+++ b/tests/ui/lint/unused/lint-unused-imports.rs
@@ -48,8 +48,8 @@ pub mod bar {
     pub struct Square;
 
     pub mod c {
-        use foo::Point;
-        use foo::Square; //~ ERROR unused import: `foo::Square`
+        use crate::foo::Point;
+        use crate::foo::Square; //~ ERROR unused import: `crate::foo::Square`
         pub fn cc(_p: Point) -> super::Square {
             fn f() -> super::Square {
                 super::Square
@@ -74,7 +74,7 @@ fn g() {
 // cf. issue #35135.
 #[allow(unused_variables)]
 fn h() {
-    use test2::foo; //~ ERROR unused import: `test2::foo`
+    use crate::test2::foo; //~ ERROR unused import: `crate::test2::foo`
     let foo = 0;
 }
 
@@ -83,6 +83,6 @@ fn main() {
     let mut a = 3;
     let mut b = 4;
     swap(&mut a, &mut b);
-    test::C.b();
+    crate::test::C.b();
     foo();
 }
diff --git a/tests/ui/lint/unused/lint-unused-imports.stderr b/tests/ui/lint/unused/lint-unused-imports.stderr
index a848fb31eba..750bc059de0 100644
--- a/tests/ui/lint/unused/lint-unused-imports.stderr
+++ b/tests/ui/lint/unused/lint-unused-imports.stderr
@@ -28,11 +28,11 @@ error: unused import: `bar`
 LL | use test2::{foo, bar};
    |                  ^^^
 
-error: unused import: `foo::Square`
+error: unused import: `crate::foo::Square`
   --> $DIR/lint-unused-imports.rs:52:13
    |
-LL |         use foo::Square;
-   |             ^^^^^^^^^^^
+LL |         use crate::foo::Square;
+   |             ^^^^^^^^^^^^^^^^^^
 
 error: unused import: `self::g`
   --> $DIR/lint-unused-imports.rs:68:9
@@ -40,11 +40,11 @@ error: unused import: `self::g`
 LL |     use self::g;
    |         ^^^^^^^
 
-error: unused import: `test2::foo`
+error: unused import: `crate::test2::foo`
   --> $DIR/lint-unused-imports.rs:77:9
    |
-LL |     use test2::foo;
-   |         ^^^^^^^^^^
+LL |     use crate::test2::foo;
+   |         ^^^^^^^^^^^^^^^^^
 
 error: unused import: `test::B2`
   --> $DIR/lint-unused-imports.rs:20:5
diff --git a/tests/ui/macros/macro-pub-matcher.rs b/tests/ui/macros/macro-pub-matcher.rs
index 538f55cc98d..e0b03dbbeb1 100644
--- a/tests/ui/macros/macro-pub-matcher.rs
+++ b/tests/ui/macros/macro-pub-matcher.rs
@@ -68,15 +68,15 @@ mod with_crate {
 
 mod garden {
     mod with_pub_restricted_path {
-        vis_passthru! { pub(in garden) const A: i32 = 0; }
-        vis_passthru! { pub(in garden) enum B {} }
-        vis_passthru! { pub(in garden) extern "C" fn c() {} }
-        vis_passthru! { pub(in garden) mod d {} }
-        vis_passthru! { pub(in garden) static E: i32 = 0; }
-        vis_passthru! { pub(in garden) struct F; }
-        vis_passthru! { pub(in garden) trait G {} }
-        vis_passthru! { pub(in garden) type H = i32; }
-        vis_passthru! { pub(in garden) use A as I; }
+        vis_passthru! { pub(in crate::garden) const A: i32 = 0; }
+        vis_passthru! { pub(in crate::garden) enum B {} }
+        vis_passthru! { pub(in crate::garden) extern "C" fn c() {} }
+        vis_passthru! { pub(in crate::garden) mod d {} }
+        vis_passthru! { pub(in crate::garden) static E: i32 = 0; }
+        vis_passthru! { pub(in crate::garden) struct F; }
+        vis_passthru! { pub(in crate::garden) trait G {} }
+        vis_passthru! { pub(in crate::garden) type H = i32; }
+        vis_passthru! { pub(in crate::garden) use A as I; }
     }
 }
 
diff --git a/tests/ui/macros/paths-in-macro-invocations.rs b/tests/ui/macros/paths-in-macro-invocations.rs
index c1b7789d6de..b8f4784298d 100644
--- a/tests/ui/macros/paths-in-macro-invocations.rs
+++ b/tests/ui/macros/paths-in-macro-invocations.rs
@@ -11,26 +11,26 @@ mod foo { pub use two_macros::macro_one as bar; }
 
 trait T {
     foo::bar!();
-    ::foo::bar!();
+    crate::foo::bar!();
 }
 
 struct S {
     x: foo::bar!(i32),
-    y: ::foo::bar!(i32),
+    y: crate::foo::bar!(i32),
 }
 
 impl S {
     foo::bar!();
-    ::foo::bar!();
+    crate::foo::bar!();
 }
 
 fn main() {
     foo::bar!();
-    ::foo::bar!();
+    crate::foo::bar!();
 
     let _ = foo::bar!(0);
-    let _ = ::foo::bar!(0);
+    let _ = crate::foo::bar!(0);
 
     let foo::bar!(_) = 0;
-    let ::foo::bar!(_) = 0;
+    let crate::foo::bar!(_) = 0;
 }
diff --git a/tests/ui/macros/return_from_external_macro.rs b/tests/ui/macros/return_from_external_macro.rs
index 43fe99e63ad..91d0c4c64fd 100644
--- a/tests/ui/macros/return_from_external_macro.rs
+++ b/tests/ui/macros/return_from_external_macro.rs
@@ -5,7 +5,7 @@ extern crate ret_from_ext;
 
 fn foo() -> impl Sized {
     drop(|| ret_from_ext::foo!());
-    //~^ ERROR cannot return reference to local binding
+    //~^ ERROR cannot return reference to temporary value
 
     ret_from_ext::foo!()
     //~^ ERROR temporary value dropped while borrowed
diff --git a/tests/ui/macros/return_from_external_macro.stderr b/tests/ui/macros/return_from_external_macro.stderr
index b6010b8ec79..6f707b9f52b 100644
--- a/tests/ui/macros/return_from_external_macro.stderr
+++ b/tests/ui/macros/return_from_external_macro.stderr
@@ -1,11 +1,11 @@
-error[E0515]: cannot return reference to local binding
+error[E0515]: cannot return reference to temporary value
   --> $DIR/return_from_external_macro.rs:7:13
    |
 LL |     drop(|| ret_from_ext::foo!());
    |             ^^^^^^^^^^^^^^^^^^^^
    |             |
    |             returns a reference to data owned by the current function
-   |             local binding introduced here
+   |             temporary value created here
    |
    = note: this error originates in the macro `ret_from_ext::foo` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/moves/issue-34721.fixed b/tests/ui/moves/issue-34721.fixed
index 995fd920da7..4fdbee4d60b 100644
--- a/tests/ui/moves/issue-34721.fixed
+++ b/tests/ui/moves/issue-34721.fixed
@@ -9,15 +9,15 @@ impl Foo for u32 {
 }
 
 pub mod bar {
-    pub use Foo;
+    pub use crate::Foo;
     pub fn bar<T: Foo>(x: T) -> T {
       x.zero()
     }
 }
 
 mod baz {
-    use bar;
-    use Foo;
+    use crate::bar;
+    use crate::Foo;
     pub fn baz<T: Foo + Copy>(x: T) -> T {
         if 0 == 1 {
             bar::bar(x.zero())
diff --git a/tests/ui/moves/issue-34721.rs b/tests/ui/moves/issue-34721.rs
index 747b15b4e02..4591b545b23 100644
--- a/tests/ui/moves/issue-34721.rs
+++ b/tests/ui/moves/issue-34721.rs
@@ -9,15 +9,15 @@ impl Foo for u32 {
 }
 
 pub mod bar {
-    pub use Foo;
+    pub use crate::Foo;
     pub fn bar<T: Foo>(x: T) -> T {
       x.zero()
     }
 }
 
 mod baz {
-    use bar;
-    use Foo;
+    use crate::bar;
+    use crate::Foo;
     pub fn baz<T: Foo>(x: T) -> T {
         if 0 == 1 {
             bar::bar(x.zero())
diff --git a/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs b/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs
index ab24f36f9a1..1586dd8bd59 100644
--- a/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs
+++ b/tests/ui/namespace/namespaced-enum-glob-import-no-impls.rs
@@ -12,11 +12,11 @@ mod m2 {
 }
 
 mod m {
-    pub use m2::Foo::*;
+    pub use crate::m2::Foo::*;
 }
 
 pub fn main() {
-    use m2::Foo::*;
+    use crate::m2::Foo::*;
 
     foo(); //~ ERROR cannot find function `foo` in this scope
     m::foo(); //~ ERROR cannot find function `foo` in module `m`
diff --git a/tests/ui/never_type/feature-gate-never_type_fallback.stderr b/tests/ui/never_type/feature-gate-never_type_fallback.stderr
index cbb670ea708..8dbd43e121b 100644
--- a/tests/ui/never_type/feature-gate-never_type_fallback.stderr
+++ b/tests/ui/never_type/feature-gate-never_type_fallback.stderr
@@ -2,10 +2,8 @@ error[E0277]: the trait bound `(): T` is not satisfied
   --> $DIR/feature-gate-never_type_fallback.rs:10:9
    |
 LL |     foo(panic!())
-   |     --- ^^^^^^^^
-   |     |   |
-   |     |   the trait `T` is not implemented for `()`
-   |     |   this tail expression is of type `()`
+   |     --- ^^^^^^^^ the trait `T` is not implemented for `()`
+   |     |
    |     required by a bound introduced by this call
    |
 help: this trait has no implementations, consider adding one
diff --git a/tests/ui/pattern/issue-14221.rs b/tests/ui/pattern/issue-14221.rs
index 13427d2c9b2..f5f419a6314 100644
--- a/tests/ui/pattern/issue-14221.rs
+++ b/tests/ui/pattern/issue-14221.rs
@@ -8,7 +8,7 @@ pub enum E {
 }
 
 pub mod b {
-    pub fn key(e: ::E) -> &'static str {
+    pub fn key(e: crate::E) -> &'static str {
         match e {
             A => "A",
 //~^ ERROR pattern binding `A` is named the same as one of the variants of the type `E`
diff --git a/tests/ui/pattern/issue-22546.rs b/tests/ui/pattern/issue-22546.rs
index fd1d5fb6c47..81908017b4e 100644
--- a/tests/ui/pattern/issue-22546.rs
+++ b/tests/ui/pattern/issue-22546.rs
@@ -7,7 +7,7 @@ use std::default::Default;
 #[derive(Default)]
 pub struct Foo<T>(T, T);
 
-impl<T: ::std::fmt::Display> Foo<T> {
+impl<T: std::fmt::Display> Foo<T> {
     fn foo(&self) {
         match *self {
             Foo::<T>(ref x, ref y) => println!("Goodbye, World! {} {}", x, y)
@@ -36,7 +36,7 @@ fn main() {
     let w = Wrapper { value: Foo(10u8, 11u8) };
     match w {
         Wrapper::<Foo<u8>> { value: Foo(10, 11) } => {},
-        ::Wrapper::<<Foo<_> as Tr>::U> { value: Foo::<u8>(11, 16) } => { panic!() },
+        crate::Wrapper::<<Foo<_> as Tr>::U> { value: Foo::<u8>(11, 16) } => { panic!() },
         _ => { panic!() }
     }
 
diff --git a/tests/ui/pattern/issue-6449.rs b/tests/ui/pattern/issue-6449.rs
index 38399a18793..25152cf5d29 100644
--- a/tests/ui/pattern/issue-6449.rs
+++ b/tests/ui/pattern/issue-6449.rs
@@ -13,32 +13,32 @@ enum Other {
 
 fn main() {
     match Foo::Baz {
-        ::Foo::Bar(3) => panic!(),
-        ::Foo::Bar(_) if false => panic!(),
-        ::Foo::Bar(..) if false => panic!(),
-        ::Foo::Bar(_n) => panic!(),
-        ::Foo::Baz => {}
+        crate::Foo::Bar(3) => panic!(),
+        crate::Foo::Bar(_) if false => panic!(),
+        crate::Foo::Bar(..) if false => panic!(),
+        crate::Foo::Bar(_n) => panic!(),
+        crate::Foo::Baz => {}
     }
     match Foo::Bar(3) {
-        ::Foo::Bar(3) => {}
-        ::Foo::Bar(_) if false => panic!(),
-        ::Foo::Bar(..) if false => panic!(),
-        ::Foo::Bar(_n) => panic!(),
-        ::Foo::Baz => panic!(),
+        crate::Foo::Bar(3) => {}
+        crate::Foo::Bar(_) if false => panic!(),
+        crate::Foo::Bar(..) if false => panic!(),
+        crate::Foo::Bar(_n) => panic!(),
+        crate::Foo::Baz => panic!(),
     }
     match Foo::Bar(4) {
-        ::Foo::Bar(3) => panic!(),
-        ::Foo::Bar(_) if false => panic!(),
-        ::Foo::Bar(..) if false => panic!(),
-        ::Foo::Bar(n) => assert_eq!(n, 4),
-        ::Foo::Baz => panic!(),
+        crate::Foo::Bar(3) => panic!(),
+        crate::Foo::Bar(_) if false => panic!(),
+        crate::Foo::Bar(..) if false => panic!(),
+        crate::Foo::Bar(n) => assert_eq!(n, 4),
+        crate::Foo::Baz => panic!(),
     }
 
     match Other::Other1(Foo::Baz) {
-        ::Other::Other1(::Foo::Baz) => {}
-        ::Other::Other1(::Foo::Bar(_)) => {}
-        ::Other::Other2(::Foo::Baz, ::Foo::Bar(_)) => {}
-        ::Other::Other2(::Foo::Bar(..), ::Foo::Baz) => {}
-        ::Other::Other2(..) => {}
+        crate::Other::Other1(crate::Foo::Baz) => {}
+        crate::Other::Other1(crate::Foo::Bar(_)) => {}
+        crate::Other::Other2(crate::Foo::Baz, crate::Foo::Bar(_)) => {}
+        crate::Other::Other2(crate::Foo::Bar(..), crate::Foo::Baz) => {}
+        crate::Other::Other2(..) => {}
     }
 }
diff --git a/tests/ui/pattern/missing_lifetime.rs b/tests/ui/pattern/missing_lifetime.rs
index 081f667d8f6..53f8e155019 100644
--- a/tests/ui/pattern/missing_lifetime.rs
+++ b/tests/ui/pattern/missing_lifetime.rs
@@ -20,6 +20,6 @@ enum Other {
 
 fn main() {
     match Other::Other1(Foo::Baz) {
-        ::Other::Other2(::Foo::Bar(..)) => {}
+        crate::Other::Other2(crate::Foo::Bar(..)) => {}
     }
 }
diff --git a/tests/ui/pattern/usefulness/uninhabited.rs b/tests/ui/pattern/usefulness/uninhabited.rs
index 5c774b7874a..0e2793fb448 100644
--- a/tests/ui/pattern/usefulness/uninhabited.rs
+++ b/tests/ui/pattern/usefulness/uninhabited.rs
@@ -120,7 +120,7 @@ mod visibility {
     mod c {
         use super::*;
         pub struct AlsoSecretlyUninhabited {
-            _priv: ::Struct1,
+            _priv: crate::Struct1,
         }
         assert_empty!(SometimesEmptyStruct);
         assert_non_empty!(SometimesEmptyEnum);
diff --git a/tests/ui/privacy/auxiliary/pub_use_mods_xcrate.rs b/tests/ui/privacy/auxiliary/pub_use_mods_xcrate.rs
index 74d3504d5be..f754c01f3d5 100644
--- a/tests/ui/privacy/auxiliary/pub_use_mods_xcrate.rs
+++ b/tests/ui/privacy/auxiliary/pub_use_mods_xcrate.rs
@@ -1,5 +1,5 @@
 pub mod a {
-    pub use a::b::c;
+    pub use crate::a::b::c;
 
     pub mod b {
         pub mod c {
diff --git a/tests/ui/privacy/crate-private-reexport.rs b/tests/ui/privacy/crate-private-reexport.rs
index fa4f88666d8..db0314683a0 100644
--- a/tests/ui/privacy/crate-private-reexport.rs
+++ b/tests/ui/privacy/crate-private-reexport.rs
@@ -5,10 +5,10 @@ struct S1 {
     bar: i32,
 }
 mod m1 {
-    pub use ::f1; //~ ERROR `f1` is only public within the crate, and cannot be re-exported outside
-    pub use ::S1; //~ ERROR `S1` is only public within the crate, and cannot be re-exported outside
-    pub use ::E1; //~ ERROR `E1` is only public within the crate, and cannot be re-exported outside
-    pub use ::E1::V; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside
+    pub use crate::f1; //~ ERROR `f1` is only public within the crate, and cannot be re-exported outside
+    pub use crate::S1; //~ ERROR `S1` is only public within the crate, and cannot be re-exported outside
+    pub use crate::E1; //~ ERROR `E1` is only public within the crate, and cannot be re-exported outside
+    pub use crate::E1::V; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside
 }
 
 pub(crate) fn f2() {}
@@ -20,10 +20,10 @@ pub(crate) struct S2 {
     bar: i32,
 }
 mod m2 {
-    pub use ::f2; //~ ERROR `f2` is only public within the crate, and cannot be re-exported outside
-    pub use ::S2; //~ ERROR `S2` is only public within the crate, and cannot be re-exported outside
-    pub use ::E2; //~ ERROR `E2` is only public within the crate, and cannot be re-exported outside
-    pub use ::E2::V; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside
+    pub use crate::f2; //~ ERROR `f2` is only public within the crate, and cannot be re-exported outside
+    pub use crate::S2; //~ ERROR `S2` is only public within the crate, and cannot be re-exported outside
+    pub use crate::E2; //~ ERROR `E2` is only public within the crate, and cannot be re-exported outside
+    pub use crate::E2::V; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside
 }
 
 mod m3 {
@@ -42,7 +42,7 @@ pub use m3::E3; //~ ERROR `E3` is only public within the crate, and cannot be re
 pub use m3::E3::V; //~ ERROR `V` is only public within the crate, and cannot be re-exported outside
 
 pub(self) fn f4() {}
-pub use ::f4 as f5; //~ ERROR `f4` is only public within the crate, and cannot be re-exported outside
+pub use crate::f4 as f5; //~ ERROR `f4` is only public within the crate, and cannot be re-exported outside
 
 pub mod m10 {
     pub mod m {
diff --git a/tests/ui/privacy/crate-private-reexport.stderr b/tests/ui/privacy/crate-private-reexport.stderr
index 66e11e82107..9b2626efacd 100644
--- a/tests/ui/privacy/crate-private-reexport.stderr
+++ b/tests/ui/privacy/crate-private-reexport.stderr
@@ -1,82 +1,82 @@
 error[E0364]: `f1` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:8:13
    |
-LL |     pub use ::f1;
-   |             ^^^^
+LL |     pub use crate::f1;
+   |             ^^^^^^^^^
    |
 note: consider marking `f1` as `pub` in the imported module
   --> $DIR/crate-private-reexport.rs:8:13
    |
-LL |     pub use ::f1;
-   |             ^^^^
+LL |     pub use crate::f1;
+   |             ^^^^^^^^^
 
 error[E0365]: `S1` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:9:13
    |
-LL |     pub use ::S1;
-   |             ^^^^ re-export of crate public `S1`
+LL |     pub use crate::S1;
+   |             ^^^^^^^^^ re-export of crate public `S1`
    |
    = note: consider declaring type or module `S1` with `pub`
 
 error[E0365]: `E1` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:10:13
    |
-LL |     pub use ::E1;
-   |             ^^^^ re-export of crate public `E1`
+LL |     pub use crate::E1;
+   |             ^^^^^^^^^ re-export of crate public `E1`
    |
    = note: consider declaring type or module `E1` with `pub`
 
 error[E0364]: `V` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:11:13
    |
-LL |     pub use ::E1::V;
-   |             ^^^^^^^
+LL |     pub use crate::E1::V;
+   |             ^^^^^^^^^^^^
    |
 note: consider marking `V` as `pub` in the imported module
   --> $DIR/crate-private-reexport.rs:11:13
    |
-LL |     pub use ::E1::V;
-   |             ^^^^^^^
+LL |     pub use crate::E1::V;
+   |             ^^^^^^^^^^^^
 
 error[E0364]: `f2` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:23:13
    |
-LL |     pub use ::f2;
-   |             ^^^^
+LL |     pub use crate::f2;
+   |             ^^^^^^^^^
    |
 note: consider marking `f2` as `pub` in the imported module
   --> $DIR/crate-private-reexport.rs:23:13
    |
-LL |     pub use ::f2;
-   |             ^^^^
+LL |     pub use crate::f2;
+   |             ^^^^^^^^^
 
 error[E0365]: `S2` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:24:13
    |
-LL |     pub use ::S2;
-   |             ^^^^ re-export of crate public `S2`
+LL |     pub use crate::S2;
+   |             ^^^^^^^^^ re-export of crate public `S2`
    |
    = note: consider declaring type or module `S2` with `pub`
 
 error[E0365]: `E2` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:25:13
    |
-LL |     pub use ::E2;
-   |             ^^^^ re-export of crate public `E2`
+LL |     pub use crate::E2;
+   |             ^^^^^^^^^ re-export of crate public `E2`
    |
    = note: consider declaring type or module `E2` with `pub`
 
 error[E0364]: `V` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:26:13
    |
-LL |     pub use ::E2::V;
-   |             ^^^^^^^
+LL |     pub use crate::E2::V;
+   |             ^^^^^^^^^^^^
    |
 note: consider marking `V` as `pub` in the imported module
   --> $DIR/crate-private-reexport.rs:26:13
    |
-LL |     pub use ::E2::V;
-   |             ^^^^^^^
+LL |     pub use crate::E2::V;
+   |             ^^^^^^^^^^^^
 
 error[E0364]: `f3` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:39:9
@@ -121,14 +121,14 @@ LL | pub use m3::E3::V;
 error[E0364]: `f4` is only public within the crate, and cannot be re-exported outside
   --> $DIR/crate-private-reexport.rs:45:9
    |
-LL | pub use ::f4 as f5;
-   |         ^^^^^^^^^^
+LL | pub use crate::f4 as f5;
+   |         ^^^^^^^^^^^^^^^
    |
 note: consider marking `f4` as `pub` in the imported module
   --> $DIR/crate-private-reexport.rs:45:9
    |
-LL | pub use ::f4 as f5;
-   |         ^^^^^^^^^^
+LL | pub use crate::f4 as f5;
+   |         ^^^^^^^^^^^^^^^
 
 error[E0364]: `f6` is private, and cannot be re-exported
   --> $DIR/crate-private-reexport.rs:53:13
diff --git a/tests/ui/privacy/issue-30079.rs b/tests/ui/privacy/issue-30079.rs
index ddba629f528..3725540c24b 100644
--- a/tests/ui/privacy/issue-30079.rs
+++ b/tests/ui/privacy/issue-30079.rs
@@ -2,7 +2,7 @@ struct SemiPriv;
 
 mod m1 {
     struct Priv;
-    impl ::SemiPriv {
+    impl crate::SemiPriv {
         pub fn f(_: Priv) {} //~ WARN type `m1::Priv` is more private than the item `m1::<impl SemiPriv>::f`
     }
 
@@ -13,12 +13,12 @@ mod m1 {
 
 mod m2 {
     struct Priv;
-    impl ::std::ops::Deref for ::SemiPriv {
+    impl std::ops::Deref for crate::SemiPriv {
         type Target = Priv; //~ ERROR private type `m2::Priv` in public interface
         fn deref(&self) -> &Self::Target { unimplemented!() }
     }
 
-    impl ::std::ops::Deref for Priv {
+    impl std::ops::Deref for Priv {
         type Target = Priv; // ok
         fn deref(&self) -> &Self::Target { unimplemented!() }
     }
@@ -30,7 +30,7 @@ trait SemiPrivTrait {
 
 mod m3 {
     struct Priv;
-    impl ::SemiPrivTrait for () {
+    impl crate::SemiPrivTrait for () {
         type Assoc = Priv; //~ ERROR private type `m3::Priv` in public interface
     }
 }
diff --git a/tests/ui/privacy/issue-30079.stderr b/tests/ui/privacy/issue-30079.stderr
index f1facba7cd2..fcee1b5a93c 100644
--- a/tests/ui/privacy/issue-30079.stderr
+++ b/tests/ui/privacy/issue-30079.stderr
@@ -16,7 +16,7 @@ error[E0446]: private type `m2::Priv` in public interface
    |
 LL |     struct Priv;
    |     ----------- `m2::Priv` declared as private
-LL |     impl ::std::ops::Deref for ::SemiPriv {
+LL |     impl std::ops::Deref for crate::SemiPriv {
 LL |         type Target = Priv;
    |         ^^^^^^^^^^^ can't leak private type
 
@@ -25,7 +25,7 @@ error[E0446]: private type `m3::Priv` in public interface
    |
 LL |     struct Priv;
    |     ----------- `m3::Priv` declared as private
-LL |     impl ::SemiPrivTrait for () {
+LL |     impl crate::SemiPrivTrait for () {
 LL |         type Assoc = Priv;
    |         ^^^^^^^^^^ can't leak private type
 
diff --git a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs
index 796ba4d2332..1800648b954 100644
--- a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs
+++ b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs
@@ -26,7 +26,7 @@ mod rank {
         Full,
     }
 
-    pub(in rank) enum PettyOfficer {
+    pub(in crate::rank) enum PettyOfficer {
         SecondClass,
         FirstClass,
         Chief,
diff --git a/tests/ui/privacy/legacy-ctor-visibility.rs b/tests/ui/privacy/legacy-ctor-visibility.rs
index 5732b6446fe..e698a481173 100644
--- a/tests/ui/privacy/legacy-ctor-visibility.rs
+++ b/tests/ui/privacy/legacy-ctor-visibility.rs
@@ -4,7 +4,7 @@ mod m {
     pub struct S(u8);
 
     mod n {
-        use S;
+        use crate::S;
         fn f() {
             S(10);
             //~^ ERROR expected function, tuple struct or tuple variant, found struct `S`
diff --git a/tests/ui/privacy/privacy-in-paths.rs b/tests/ui/privacy/privacy-in-paths.rs
index 9cee2b89dd5..4baa9758bbe 100644
--- a/tests/ui/privacy/privacy-in-paths.rs
+++ b/tests/ui/privacy/privacy-in-paths.rs
@@ -2,7 +2,7 @@ mod foo {
     pub use self::bar::S;
     mod bar {
         pub struct S;
-        pub use baz;
+        pub use crate::baz;
     }
 
     trait T {
@@ -21,9 +21,9 @@ pub mod baz {
     fn f() {}
 
     fn g() {
-        ::foo::bar::baz::f(); //~ERROR module `bar` is private
-        ::foo::bar::S::f(); //~ERROR module `bar` is private
-        <() as ::foo::T>::Assoc::f(); //~ERROR trait `T` is private
+        crate::foo::bar::baz::f(); //~ERROR module `bar` is private
+        crate::foo::bar::S::f(); //~ERROR module `bar` is private
+        <() as crate::foo::T>::Assoc::f(); //~ERROR trait `T` is private
     }
 }
 
diff --git a/tests/ui/privacy/privacy-in-paths.stderr b/tests/ui/privacy/privacy-in-paths.stderr
index e6ece35865d..4acb9baa66c 100644
--- a/tests/ui/privacy/privacy-in-paths.stderr
+++ b/tests/ui/privacy/privacy-in-paths.stderr
@@ -1,10 +1,10 @@
 error[E0603]: module `bar` is private
-  --> $DIR/privacy-in-paths.rs:24:16
+  --> $DIR/privacy-in-paths.rs:24:21
    |
-LL |         ::foo::bar::baz::f();
-   |                ^^^       - function `f` is not publicly re-exported
-   |                |
-   |                private module
+LL |         crate::foo::bar::baz::f();
+   |                     ^^^       - function `f` is not publicly re-exported
+   |                     |
+   |                     private module
    |
 note: the module `bar` is defined here
   --> $DIR/privacy-in-paths.rs:3:5
@@ -13,10 +13,10 @@ LL |     mod bar {
    |     ^^^^^^^
 
 error[E0603]: module `bar` is private
-  --> $DIR/privacy-in-paths.rs:25:16
+  --> $DIR/privacy-in-paths.rs:25:21
    |
-LL |         ::foo::bar::S::f();
-   |                ^^^ private module
+LL |         crate::foo::bar::S::f();
+   |                     ^^^ private module
    |
 note: the module `bar` is defined here
   --> $DIR/privacy-in-paths.rs:3:5
@@ -25,17 +25,17 @@ LL |     mod bar {
    |     ^^^^^^^
 help: consider importing this struct through its public re-export instead
    |
-LL -         ::foo::bar::S::f();
+LL -         crate::foo::bar::S::f();
 LL +         foo::S::f();
    |
 
 error[E0603]: trait `T` is private
-  --> $DIR/privacy-in-paths.rs:26:23
+  --> $DIR/privacy-in-paths.rs:26:28
    |
-LL |         <() as ::foo::T>::Assoc::f();
-   |                       ^   ----- associated type `Assoc` is not publicly re-exported
-   |                       |
-   |                       private trait
+LL |         <() as crate::foo::T>::Assoc::f();
+   |                            ^   ----- associated type `Assoc` is not publicly re-exported
+   |                            |
+   |                            private trait
    |
 note: the trait `T` is defined here
   --> $DIR/privacy-in-paths.rs:8:5
diff --git a/tests/ui/privacy/privacy-ufcs.rs b/tests/ui/privacy/privacy-ufcs.rs
index fec7f41340a..0ba682dde15 100644
--- a/tests/ui/privacy/privacy-ufcs.rs
+++ b/tests/ui/privacy/privacy-ufcs.rs
@@ -9,5 +9,5 @@ mod foo {
 }
 
 fn main() {
-    <i32 as ::foo::Bar>::baz(); //~ERROR trait `Bar` is private
+    <i32 as crate::foo::Bar>::baz(); //~ERROR trait `Bar` is private
 }
diff --git a/tests/ui/privacy/privacy-ufcs.stderr b/tests/ui/privacy/privacy-ufcs.stderr
index 5c986895d64..0608c06e8a4 100644
--- a/tests/ui/privacy/privacy-ufcs.stderr
+++ b/tests/ui/privacy/privacy-ufcs.stderr
@@ -1,10 +1,10 @@
 error[E0603]: trait `Bar` is private
-  --> $DIR/privacy-ufcs.rs:12:20
+  --> $DIR/privacy-ufcs.rs:12:25
    |
-LL |     <i32 as ::foo::Bar>::baz();
-   |                    ^^^   --- associated function `baz` is not publicly re-exported
-   |                    |
-   |                    private trait
+LL |     <i32 as crate::foo::Bar>::baz();
+   |                         ^^^   --- associated function `baz` is not publicly re-exported
+   |                         |
+   |                         private trait
    |
 note: the trait `Bar` is defined here
   --> $DIR/privacy-ufcs.rs:4:5
diff --git a/tests/ui/privacy/privacy1.rs b/tests/ui/privacy/privacy1.rs
index 9436441ecc6..6cd12b80782 100644
--- a/tests/ui/privacy/privacy1.rs
+++ b/tests/ui/privacy/privacy1.rs
@@ -98,34 +98,34 @@ fn lol() {
 
 mod foo {
     fn test() {
-        ::bar::A::foo();
-        ::bar::A::bar();        //~ ERROR: associated function `bar` is private
-        ::bar::A.foo2();
-        ::bar::baz::A::foo();   //~ ERROR: module `baz` is private
-        ::bar::baz::A::bar();   //~ ERROR: module `baz` is private
+        crate::bar::A::foo();
+        crate::bar::A::bar();        //~ ERROR: associated function `bar` is private
+        crate::bar::A.foo2();
+        crate::bar::baz::A::foo();   //~ ERROR: module `baz` is private
+        crate::bar::baz::A::bar();   //~ ERROR: module `baz` is private
                                 //~^ ERROR: associated function `bar` is private
-        ::bar::baz::A.foo2();   //~ ERROR: module `baz` is private
-        ::bar::baz::A.bar2();   //~ ERROR: module `baz` is private
+        crate::bar::baz::A.foo2();   //~ ERROR: module `baz` is private
+        crate::bar::baz::A.bar2();   //~ ERROR: module `baz` is private
                                 //~^ ERROR: method `bar2` is private
 
         let _: isize =
-        ::bar::B::foo();        //~ ERROR: trait `B` is private
-        ::lol();
+        crate::bar::B::foo();        //~ ERROR: trait `B` is private
+        crate::lol();
 
-        ::bar::Enum::Pub;
+        crate::bar::Enum::Pub;
 
         unsafe {
-            ::bar::epriv(); //~ ERROR: function `epriv` is private
-            ::bar::epub();
+            crate::bar::epriv(); //~ ERROR: function `epriv` is private
+            crate::bar::epub();
         }
 
-        ::bar::foo();
-        ::bar::bar();
+        crate::bar::foo();
+        crate::bar::bar();
 
-        ::bar::gpub();
+        crate::bar::gpub();
 
-        ::bar::baz::foo(); //~ ERROR: module `baz` is private
-        ::bar::baz::bar(); //~ ERROR: module `baz` is private
+        crate::bar::baz::foo(); //~ ERROR: module `baz` is private
+        crate::bar::baz::bar(); //~ ERROR: module `baz` is private
     }
 
     fn test2() {
@@ -154,7 +154,7 @@ mod foo {
         bar::bar();
     }
 
-    impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
+    impl crate::bar::B for f32 { fn foo() -> f32 { 1.0 } }
     //~^ ERROR: trait `B` is private
 }
 
diff --git a/tests/ui/privacy/privacy1.stderr b/tests/ui/privacy/privacy1.stderr
index cb7b858e54d..1f2f4a92c48 100644
--- a/tests/ui/privacy/privacy1.stderr
+++ b/tests/ui/privacy/privacy1.stderr
@@ -48,12 +48,12 @@ LL |         mod i {
    |         ^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:104:16
+  --> $DIR/privacy1.rs:104:21
    |
-LL |         ::bar::baz::A::foo();
-   |                ^^^  - struct `A` is not publicly re-exported
-   |                |
-   |                private module
+LL |         crate::bar::baz::A::foo();
+   |                     ^^^  - struct `A` is not publicly re-exported
+   |                     |
+   |                     private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -62,12 +62,12 @@ LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:105:16
+  --> $DIR/privacy1.rs:105:21
    |
-LL |         ::bar::baz::A::bar();
-   |                ^^^  - struct `A` is not publicly re-exported
-   |                |
-   |                private module
+LL |         crate::bar::baz::A::bar();
+   |                     ^^^  - struct `A` is not publicly re-exported
+   |                     |
+   |                     private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -76,12 +76,12 @@ LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:107:16
+  --> $DIR/privacy1.rs:107:21
    |
-LL |         ::bar::baz::A.foo2();
-   |                ^^^  - unit struct `A` is not publicly re-exported
-   |                |
-   |                private module
+LL |         crate::bar::baz::A.foo2();
+   |                     ^^^  - unit struct `A` is not publicly re-exported
+   |                     |
+   |                     private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -90,12 +90,12 @@ LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:108:16
+  --> $DIR/privacy1.rs:108:21
    |
-LL |         ::bar::baz::A.bar2();
-   |                ^^^  - unit struct `A` is not publicly re-exported
-   |                |
-   |                private module
+LL |         crate::bar::baz::A.bar2();
+   |                     ^^^  - unit struct `A` is not publicly re-exported
+   |                     |
+   |                     private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -104,12 +104,12 @@ LL |     mod baz {
    |     ^^^^^^^
 
 error[E0603]: trait `B` is private
-  --> $DIR/privacy1.rs:112:16
+  --> $DIR/privacy1.rs:112:21
    |
-LL |         ::bar::B::foo();
-   |                ^  --- associated function `foo` is not publicly re-exported
-   |                |
-   |                private trait
+LL |         crate::bar::B::foo();
+   |                     ^  --- associated function `foo` is not publicly re-exported
+   |                     |
+   |                     private trait
    |
 note: the trait `B` is defined here
   --> $DIR/privacy1.rs:40:5
@@ -118,10 +118,10 @@ LL |     trait B {
    |     ^^^^^^^
 
 error[E0603]: function `epriv` is private
-  --> $DIR/privacy1.rs:118:20
+  --> $DIR/privacy1.rs:118:25
    |
-LL |             ::bar::epriv();
-   |                    ^^^^^ private function
+LL |             crate::bar::epriv();
+   |                         ^^^^^ private function
    |
 note: the function `epriv` is defined here
   --> $DIR/privacy1.rs:65:9
@@ -130,10 +130,10 @@ LL |         fn epriv();
    |         ^^^^^^^^^^^
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:127:16
+  --> $DIR/privacy1.rs:127:21
    |
-LL |         ::bar::baz::foo();
-   |                ^^^ private module
+LL |         crate::bar::baz::foo();
+   |                     ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -142,15 +142,15 @@ LL |     mod baz {
    |     ^^^^^^^
 help: consider importing this function through its public re-export instead
    |
-LL -         ::bar::baz::foo();
+LL -         crate::bar::baz::foo();
 LL +         bar::foo();
    |
 
 error[E0603]: module `baz` is private
-  --> $DIR/privacy1.rs:128:16
+  --> $DIR/privacy1.rs:128:21
    |
-LL |         ::bar::baz::bar();
-   |                ^^^ private module
+LL |         crate::bar::baz::bar();
+   |                     ^^^ private module
    |
 note: the module `baz` is defined here
   --> $DIR/privacy1.rs:50:5
@@ -159,15 +159,15 @@ LL |     mod baz {
    |     ^^^^^^^
 help: consider importing this function through its public re-export instead
    |
-LL -         ::bar::baz::bar();
+LL -         crate::bar::baz::bar();
 LL +         bar::bar();
    |
 
 error[E0603]: trait `B` is private
-  --> $DIR/privacy1.rs:157:17
+  --> $DIR/privacy1.rs:157:22
    |
-LL |     impl ::bar::B for f32 { fn foo() -> f32 { 1.0 } }
-   |                 ^ private trait
+LL |     impl crate::bar::B for f32 { fn foo() -> f32 { 1.0 } }
+   |                      ^ private trait
    |
 note: the trait `B` is defined here
   --> $DIR/privacy1.rs:40:5
@@ -194,31 +194,31 @@ LL |     bar::A::bar();
    |             ^^^ private associated function
 
 error[E0624]: associated function `bar` is private
-  --> $DIR/privacy1.rs:102:19
+  --> $DIR/privacy1.rs:102:24
    |
 LL |         fn bar() {}
    |         -------- private associated function defined here
 ...
-LL |         ::bar::A::bar();
-   |                   ^^^ private associated function
+LL |         crate::bar::A::bar();
+   |                        ^^^ private associated function
 
 error[E0624]: associated function `bar` is private
-  --> $DIR/privacy1.rs:105:24
+  --> $DIR/privacy1.rs:105:29
    |
 LL |             fn bar() {}
    |             -------- private associated function defined here
 ...
-LL |         ::bar::baz::A::bar();
-   |                        ^^^ private associated function
+LL |         crate::bar::baz::A::bar();
+   |                             ^^^ private associated function
 
 error[E0624]: method `bar2` is private
-  --> $DIR/privacy1.rs:108:23
+  --> $DIR/privacy1.rs:108:28
    |
 LL |             fn bar2(&self) {}
    |             -------------- private method defined here
 ...
-LL |         ::bar::baz::A.bar2();
-   |                       ^^^^ private method
+LL |         crate::bar::baz::A.bar2();
+   |                            ^^^^ private method
 
 error: aborting due to 18 previous errors
 
diff --git a/tests/ui/privacy/privacy2.rs b/tests/ui/privacy/privacy2.rs
index e44100a8059..d4c4faf8ac4 100644
--- a/tests/ui/privacy/privacy2.rs
+++ b/tests/ui/privacy/privacy2.rs
@@ -10,7 +10,7 @@ mod bar {
     pub use self::glob::*;
 
     pub mod glob {
-        use foo;
+        use crate::foo;
     }
 }
 
diff --git a/tests/ui/privacy/privacy2.stderr b/tests/ui/privacy/privacy2.stderr
index b70134965fa..3d36f26f784 100644
--- a/tests/ui/privacy/privacy2.stderr
+++ b/tests/ui/privacy/privacy2.stderr
@@ -13,8 +13,8 @@ LL |     use bar::glob::foo;
 note: the function import `foo` is defined here...
   --> $DIR/privacy2.rs:13:13
    |
-LL |         use foo;
-   |             ^^^
+LL |         use crate::foo;
+   |             ^^^^^^^^^^
 note: ...and refers to the function `foo` which is defined here
   --> $DIR/privacy2.rs:17:1
    |
diff --git a/tests/ui/privacy/privacy3.stderr b/tests/ui/privacy/privacy3.stderr
index 06a287d35ea..4530dfe447b 100644
--- a/tests/ui/privacy/privacy3.stderr
+++ b/tests/ui/privacy/privacy3.stderr
@@ -5,6 +5,12 @@ LL |     use bar::gpriv;
    |         ^^^^^^^^^^ no `gpriv` in `bar`
 
 error: requires `sized` lang_item
+  --> $DIR/privacy3.rs:13:20
+   |
+LL |         fn gpriv() {}
+   |                    ^^
+
+error: requires `sized` lang_item
   --> $DIR/privacy3.rs:18:14
    |
 LL | pub fn foo() {}
@@ -28,12 +34,6 @@ error: requires `sized` lang_item
 LL | fn main() {}
    |           ^^
 
-error: requires `sized` lang_item
-  --> $DIR/privacy3.rs:13:20
-   |
-LL |         fn gpriv() {}
-   |                    ^^
-
 error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/privacy/private-inferred-type-1.rs b/tests/ui/privacy/private-inferred-type-1.rs
index b3eba53dd13..c5d90d50df4 100644
--- a/tests/ui/privacy/private-inferred-type-1.rs
+++ b/tests/ui/privacy/private-inferred-type-1.rs
@@ -12,9 +12,9 @@ trait Ref {
 mod m {
     struct Priv;
 
-    impl ::Arr0 for [Priv; 0] { fn arr0_secret(&self) {} }
-    impl ::TyParam for Option<Priv> { fn ty_param_secret(&self) {} }
-    impl<'a> ::Ref for &'a Priv { fn ref_secret(self) {} }
+    impl crate::Arr0 for [Priv; 0] { fn arr0_secret(&self) {} }
+    impl crate::TyParam for Option<Priv> { fn ty_param_secret(&self) {} }
+    impl<'a> crate::Ref for &'a Priv { fn ref_secret(self) {} }
 }
 
 fn anyref<'a, T>() -> &'a T { panic!() }
diff --git a/tests/ui/privacy/restricted/lookup-ignores-private.rs b/tests/ui/privacy/restricted/lookup-ignores-private.rs
index 7060db0092f..40fd8ff45b5 100644
--- a/tests/ui/privacy/restricted/lookup-ignores-private.rs
+++ b/tests/ui/privacy/restricted/lookup-ignores-private.rs
@@ -2,14 +2,14 @@
 #![allow(warnings)]
 
 mod foo {
-    pub use foo::bar::S;
+    pub use crate::foo::bar::S;
     mod bar {
         #[derive(Default)]
         pub struct S {
-            pub(in foo) x: i32,
+            pub(in crate::foo) x: i32,
         }
         impl S {
-            pub(in foo) fn f(&self) -> i32 { 0 }
+            pub(in crate::foo) fn f(&self) -> i32 { 0 }
         }
 
         pub struct S2 {
@@ -19,7 +19,7 @@ mod foo {
             pub(crate) fn f(&self) -> bool { false }
         }
 
-        impl ::std::ops::Deref for S {
+        impl std::ops::Deref for S {
             type Target = S2;
             fn deref(&self) -> &S2 { unimplemented!() }
         }
diff --git a/tests/ui/privacy/restricted/private-in-public.rs b/tests/ui/privacy/restricted/private-in-public.rs
index fa8371436b5..f54ab1d5a4a 100644
--- a/tests/ui/privacy/restricted/private-in-public.rs
+++ b/tests/ui/privacy/restricted/private-in-public.rs
@@ -2,7 +2,7 @@
 mod foo {
     struct Priv;
     mod bar {
-        use foo::Priv;
+        use crate::foo::Priv;
         pub(super) fn f(_: Priv) {}
         pub(crate) fn g(_: Priv) {}
         pub(crate) fn h(_: Priv) {}
diff --git a/tests/ui/privacy/restricted/struct-literal-field.rs b/tests/ui/privacy/restricted/struct-literal-field.rs
index 9c6104755a4..2bb2a7fe95f 100644
--- a/tests/ui/privacy/restricted/struct-literal-field.rs
+++ b/tests/ui/privacy/restricted/struct-literal-field.rs
@@ -3,7 +3,7 @@
 mod foo {
     pub mod bar {
         pub struct S {
-            pub(in foo) x: i32,
+            pub(in crate::foo) x: i32,
         }
     }
 
@@ -14,6 +14,6 @@ mod foo {
 }
 
 fn main() {
-    use foo::bar::S;
+    use crate::foo::bar::S;
     S { x: 0 }; //~ ERROR private
 }
diff --git a/tests/ui/proc-macro/crate-var.rs b/tests/ui/proc-macro/crate-var.rs
index cea5d48e080..56e9affae8b 100644
--- a/tests/ui/proc-macro/crate-var.rs
+++ b/tests/ui/proc-macro/crate-var.rs
@@ -31,7 +31,7 @@ macro_rules! local { () => {
 
     mod qself {
         #[derive(Double)]
-        struct QSelf(<::Foo as $crate::Trait>::Assoc);
+        struct QSelf(<crate::Foo as $crate::Trait>::Assoc);
     }
 
     mod qself_recurse {
@@ -43,7 +43,7 @@ macro_rules! local { () => {
         #[derive(Double)]
         #[repr(u32)]
         enum QSelfInConst {
-            Variant = <::Foo as $crate::Trait>::CONST,
+            Variant = <crate::Foo as $crate::Trait>::CONST,
         }
     }
 } }
diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs
index 53c079fd19c..bb5006d1c11 100644
--- a/tests/ui/proc-macro/helper-attr-blocked-by-import.rs
+++ b/tests/ui/proc-macro/helper-attr-blocked-by-import.rs
@@ -10,7 +10,7 @@ use self::two::*;
 mod empty_helper {}
 
 mod one {
-    use empty_helper;
+    use crate::empty_helper;
 
     #[derive(Empty)]
     #[empty_helper]
@@ -18,7 +18,7 @@ mod one {
 }
 
 mod two {
-    use empty_helper;
+    use crate::empty_helper;
 
     #[derive(Empty)]
     #[empty_helper]
diff --git a/tests/ui/proc-macro/issue-50493.rs b/tests/ui/proc-macro/issue-50493.rs
index 4a88eee2185..2621e595baa 100644
--- a/tests/ui/proc-macro/issue-50493.rs
+++ b/tests/ui/proc-macro/issue-50493.rs
@@ -5,7 +5,7 @@ extern crate issue_50493;
 
 #[derive(Derive)]
 struct Restricted {
-    pub(in restricted) field: usize, //~ ERROR visibilities can only be restricted to ancestor modules
+    pub(in crate::restricted) field: usize, //~ ERROR visibilities can only be restricted to ancestor modules
 }
 
 mod restricted {}
diff --git a/tests/ui/proc-macro/issue-50493.stderr b/tests/ui/proc-macro/issue-50493.stderr
index 1cd3583135b..fc76e207bc7 100644
--- a/tests/ui/proc-macro/issue-50493.stderr
+++ b/tests/ui/proc-macro/issue-50493.stderr
@@ -1,8 +1,8 @@
 error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/issue-50493.rs:8:12
    |
-LL |     pub(in restricted) field: usize,
-   |            ^^^^^^^^^^
+LL |     pub(in crate::restricted) field: usize,
+   |            ^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/proc-macro/issue-53481.rs b/tests/ui/proc-macro/issue-53481.rs
index 11e11e2e6b6..ab5f175faf4 100644
--- a/tests/ui/proc-macro/issue-53481.rs
+++ b/tests/ui/proc-macro/issue-53481.rs
@@ -5,7 +5,7 @@
 extern crate test_macros;
 
 mod m1 {
-    use m2::Empty;
+    use crate::m2::Empty;
 
     #[derive(Empty)]
     struct A {}
diff --git a/tests/ui/pub/pub-reexport-priv-extern-crate.rs b/tests/ui/pub/pub-reexport-priv-extern-crate.rs
index fb495be4001..9d615be30f4 100644
--- a/tests/ui/pub/pub-reexport-priv-extern-crate.rs
+++ b/tests/ui/pub/pub-reexport-priv-extern-crate.rs
@@ -7,14 +7,14 @@ mod foo1 {
 }
 
 mod foo2 {
-    use foo1::core; //~ ERROR crate import `core` is private
+    use crate::foo1::core; //~ ERROR crate import `core` is private
     pub mod bar {
         extern crate core;
     }
 }
 
 mod baz {
-    pub use foo2::bar::core; //~ ERROR crate import `core` is private
+    pub use crate::foo2::bar::core; //~ ERROR crate import `core` is private
 }
 
 fn main() {}
diff --git a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr
index 8ab6e83641d..9bb64a3325b 100644
--- a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr
+++ b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr
@@ -1,8 +1,8 @@
 error[E0603]: crate import `core` is private
-  --> $DIR/pub-reexport-priv-extern-crate.rs:10:15
+  --> $DIR/pub-reexport-priv-extern-crate.rs:10:22
    |
-LL |     use foo1::core;
-   |               ^^^^ private crate import
+LL |     use crate::foo1::core;
+   |                      ^^^^ private crate import
    |
 note: the crate import `core` is defined here
   --> $DIR/pub-reexport-priv-extern-crate.rs:6:5
@@ -11,10 +11,10 @@ LL |     extern crate core;
    |     ^^^^^^^^^^^^^^^^^^
 
 error[E0603]: crate import `core` is private
-  --> $DIR/pub-reexport-priv-extern-crate.rs:17:24
+  --> $DIR/pub-reexport-priv-extern-crate.rs:17:31
    |
-LL |     pub use foo2::bar::core;
-   |                        ^^^^ private crate import
+LL |     pub use crate::foo2::bar::core;
+   |                               ^^^^ private crate import
    |
 note: the crate import `core` is defined here
   --> $DIR/pub-reexport-priv-extern-crate.rs:12:9
diff --git a/tests/ui/pub/pub-restricted.rs b/tests/ui/pub/pub-restricted.rs
index 2aa24121335..4d5eda69de5 100644
--- a/tests/ui/pub/pub-restricted.rs
+++ b/tests/ui/pub/pub-restricted.rs
@@ -7,7 +7,7 @@ pub (crate::a) fn cfn() {} //~ ERROR incorrect visibility restriction
 pub fn privfn() {}
 mod x {
     mod y {
-        pub (in x) fn foo() {}
+        pub (in crate::x) fn foo() {}
         pub (super) fn bar() {}
         pub (crate) fn qux() {}
     }
@@ -18,9 +18,9 @@ mod y {
         pub (crate) c: usize,
         pub (super) s: usize,
         valid_private: usize,
-        pub (in y) valid_in_x: usize,
+        pub (in crate::y) valid_in_x: usize,
         pub (a) invalid: usize, //~ ERROR incorrect visibility restriction
-        pub (in x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted
+        pub (in crate::x) non_parent_invalid: usize, //~ ERROR visibilities can only be restricted
     }
 }
 
diff --git a/tests/ui/pub/pub-restricted.stderr b/tests/ui/pub/pub-restricted.stderr
index 6c913938bb8..0548116362b 100644
--- a/tests/ui/pub/pub-restricted.stderr
+++ b/tests/ui/pub/pub-restricted.stderr
@@ -76,8 +76,8 @@ LL | pub (in xyz) fn xyz() {}
 error[E0742]: visibilities can only be restricted to ancestor modules
   --> $DIR/pub-restricted.rs:23:17
    |
-LL |         pub (in x) non_parent_invalid: usize,
-   |                 ^
+LL |         pub (in crate::x) non_parent_invalid: usize,
+   |                 ^^^^^^^^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/recursion/auxiliary/recursive_reexports.rs b/tests/ui/recursion/auxiliary/recursive_reexports.rs
index f98fa71009f..47a79090f4d 100644
--- a/tests/ui/recursion/auxiliary/recursive_reexports.rs
+++ b/tests/ui/recursion/auxiliary/recursive_reexports.rs
@@ -1,3 +1,3 @@
 pub mod foo {
-    pub use foo;
+    pub use crate::foo;
 }
diff --git a/tests/ui/recursion_limit/issue-40003.rs b/tests/ui/recursion_limit/issue-40003.rs
index 5032d0c9db3..6bc40690dad 100644
--- a/tests/ui/recursion_limit/issue-40003.rs
+++ b/tests/ui/recursion_limit/issue-40003.rs
@@ -17,7 +17,7 @@ use future::{Future, IntoFuture};
 mod future {
     use std::result;
 
-    use {stream, Stream};
+    use crate::{stream, Stream};
 
     pub trait Future {
         type Item;
@@ -100,7 +100,7 @@ mod future {
 }
 
 mod stream {
-    use IntoFuture;
+    use crate::IntoFuture;
 
     pub trait Stream {
         type Item;
diff --git a/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr b/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr
index bdf2d3b6a58..1a0563b469c 100644
--- a/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr
+++ b/tests/ui/transmutability/structs/repr/transmute_infinitely_recursive_type.stderr
@@ -12,7 +12,7 @@ LL |     struct ExplicitlyPadded(Box<ExplicitlyPadded>);
 error[E0391]: cycle detected when computing layout of `should_pad_explicitly_packed_field::ExplicitlyPadded`
    |
    = note: ...which immediately requires computing layout of `should_pad_explicitly_packed_field::ExplicitlyPadded` again
-   = note: cycle used when evaluating trait selection obligation `(): core::mem::transmutability::TransmuteFrom<should_pad_explicitly_packed_field::ExplicitlyPadded, core::mem::transmutability::Assume { alignment: false, lifetimes: false, safety: false, validity: false }>`
+   = note: cycle used when evaluating trait selection obligation `(): core::mem::transmutability::TransmuteFrom<should_pad_explicitly_packed_field::ExplicitlyPadded, ValTree(Branch([Leaf(0x00), Leaf(0x00), Leaf(0x00), Leaf(0x00)]): core::mem::transmutability::Assume)>`
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/type-alias-impl-trait/constrain_inputs.stderr b/tests/ui/type-alias-impl-trait/constrain_inputs.stderr
index b016715b129..cb299a2021e 100644
--- a/tests/ui/type-alias-impl-trait/constrain_inputs.stderr
+++ b/tests/ui/type-alias-impl-trait/constrain_inputs.stderr
@@ -25,19 +25,6 @@ LL |     type BadTraitRef = dyn Fn(Ty<'_>) -> &str;
    = note: lifetimes appearing in an associated or opaque type are not considered constrained
    = note: consider introducing a named lifetime parameter
 
-error: item does not constrain `lifetime_params::Ty::{opaque#0}`
-  --> $DIR/constrain_inputs.rs:8:8
-   |
-LL |     fn execute(ty: Ty<'_>) -> &str { todo!() }
-   |        ^^^^^^^
-   |
-   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
-note: this opaque type is supposed to be constrained
-  --> $DIR/constrain_inputs.rs:4:19
-   |
-LL |     type Ty<'a> = impl Sized;
-   |                   ^^^^^^^^^^
-
 error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
   --> $DIR/constrain_inputs.rs:23:31
    |
@@ -47,19 +34,6 @@ LL |     fn execute(ty: Ty<'_>) -> &str { ty() }
    = note: lifetimes appearing in an associated or opaque type are not considered constrained
    = note: consider introducing a named lifetime parameter
 
-error: item does not constrain `lifetime_params_2::Ty::{opaque#0}`
-  --> $DIR/constrain_inputs.rs:23:8
-   |
-LL |     fn execute(ty: Ty<'_>) -> &str { ty() }
-   |        ^^^^^^^
-   |
-   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
-note: this opaque type is supposed to be constrained
-  --> $DIR/constrain_inputs.rs:19:19
-   |
-LL |     type Ty<'a> = impl FnOnce() -> &'a str;
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^
-
 error[E0581]: return type references an anonymous lifetime, which is not constrained by the fn input types
   --> $DIR/constrain_inputs.rs:34:37
    |
@@ -78,6 +52,32 @@ LL |     type BadTraitRef = dyn Fn(Ty<&str>) -> &str;
    = note: lifetimes appearing in an associated or opaque type are not considered constrained
    = note: consider introducing a named lifetime parameter
 
+error: item does not constrain `lifetime_params::Ty::{opaque#0}`
+  --> $DIR/constrain_inputs.rs:8:8
+   |
+LL |     fn execute(ty: Ty<'_>) -> &str { todo!() }
+   |        ^^^^^^^
+   |
+   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
+note: this opaque type is supposed to be constrained
+  --> $DIR/constrain_inputs.rs:4:19
+   |
+LL |     type Ty<'a> = impl Sized;
+   |                   ^^^^^^^^^^
+
+error: item does not constrain `lifetime_params_2::Ty::{opaque#0}`
+  --> $DIR/constrain_inputs.rs:23:8
+   |
+LL |     fn execute(ty: Ty<'_>) -> &str { ty() }
+   |        ^^^^^^^
+   |
+   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
+note: this opaque type is supposed to be constrained
+  --> $DIR/constrain_inputs.rs:19:19
+   |
+LL |     type Ty<'a> = impl FnOnce() -> &'a str;
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: aborting due to 8 previous errors
 
 Some errors have detailed explanations: E0581, E0582.
diff --git a/triagebot.toml b/triagebot.toml
index 07ba5044f10..db263a3768f 100644
--- a/triagebot.toml
+++ b/triagebot.toml
@@ -1188,10 +1188,6 @@ cc = ["@m-ou-se"]
 [assign]
 warn_non_default_branch.enable = true
 contributing_url = "https://rustc-dev-guide.rust-lang.org/getting-started.html"
-users_on_vacation = [
-    "fmease",
-    "jyn514",
-]
 
 [[assign.warn_non_default_branch.exceptions]]
 title = "[beta"