about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJack Huey <jack.huey@umassmed.edu>2020-10-03 20:45:12 -0400
committerJack Huey <jack.huey@umassmed.edu>2020-10-06 14:14:25 -0400
commit23491084bc3e44ddc9b2b3fbe0f957dc891b4b08 (patch)
tree5131d34f771723c13dc1be1f84f60f2d9c64d376
parent08e2d4616613716362b4b49980ff303f2b9ae654 (diff)
downloadrust-23491084bc3e44ddc9b2b3fbe0f957dc891b4b08.tar.gz
rust-23491084bc3e44ddc9b2b3fbe0f957dc891b4b08.zip
Update to chalk 0.31. Implement some unimplemented. Ignore some tests in compare mode chalk don't finish.
-rw-r--r--Cargo.lock20
-rw-r--r--compiler/rustc_middle/Cargo.toml2
-rw-r--r--compiler/rustc_traits/Cargo.toml6
-rw-r--r--compiler/rustc_traits/src/chalk/db.rs36
-rw-r--r--compiler/rustc_traits/src/chalk/lowering.rs44
-rw-r--r--compiler/rustc_traits/src/chalk/mod.rs9
-rw-r--r--src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs1
-rw-r--r--src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr6
-rw-r--r--src/test/ui/associated-type-bounds/trait-params.rs1
-rw-r--r--src/test/ui/associated-type-bounds/union-bounds.rs1
-rw-r--r--src/test/ui/associated-types/associated-types-stream.rs1
-rw-r--r--src/test/ui/associated-types/hr-associated-type-bound-param-2.rs1
-rw-r--r--src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr6
-rw-r--r--src/test/ui/associated-types/hr-associated-type-bound-param-5.rs1
-rw-r--r--src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr8
-rw-r--r--src/test/ui/deriving/deriving-associated-types.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr26
-rw-r--r--src/test/ui/impl-trait/example-calendar.rs1
-rw-r--r--src/test/ui/impl-trait/issue-55872-2.rs1
-rw-r--r--src/test/ui/impl-trait/issue-55872-2.stderr4
-rw-r--r--src/test/ui/impl-trait/issue-55872.rs1
-rw-r--r--src/test/ui/impl-trait/issue-55872.stderr2
-rw-r--r--src/test/ui/issues/issue-23122-1.rs2
-rw-r--r--src/test/ui/issues/issue-23122-1.stderr2
-rw-r--r--src/test/ui/issues/issue-23122-2.rs1
-rw-r--r--src/test/ui/issues/issue-23122-2.stderr2
-rw-r--r--src/test/ui/issues/issue-28561.rs1
-rw-r--r--src/test/ui/issues/issue-33187.rs1
-rw-r--r--src/test/ui/issues/issue-37051.rs1
-rw-r--r--src/test/ui/issues/issue-50301.rs1
-rw-r--r--src/test/ui/issues/issue-55796.nll.stderr4
-rw-r--r--src/test/ui/issues/issue-55796.rs2
-rw-r--r--src/test/ui/issues/issue-55796.stderr24
-rw-r--r--src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs1
-rw-r--r--src/test/ui/nll/ty-outlives/issue-53789-2.rs1
-rw-r--r--src/test/ui/specialization/deafult-associated-type-bound-1.rs1
-rw-r--r--src/test/ui/specialization/deafult-associated-type-bound-1.stderr4
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-53598.rs1
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-53598.stderr2
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-57700.rs1
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-57700.stderr2
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-60371.rs2
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-60371.stderr6
44 files changed, 143 insertions, 99 deletions
diff --git a/Cargo.lock b/Cargo.lock
index d216b09c66a..41a66767aa9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -442,9 +442,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-derive"
-version = "0.29.0"
+version = "0.31.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a7f257e3bcdc56d8877ae31c012bd69fba0be66929d588e603905f2632c0c59"
+checksum = "ca40c97e20f43e4aac2282d342103d45fafad74ad9bfcbaaf0b5d386f9ce1f39"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -454,9 +454,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-engine"
-version = "0.29.0"
+version = "0.31.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c43fcc7edf4d51b42f44ed50e2337bd90ddc8e088d0cd78a71db92a6f780f782"
+checksum = "88e3d545394fbc4f7d8fe203c6a78d2b73f82bb119f21af98de1f924c2518e34"
 dependencies = [
  "chalk-derive",
  "chalk-ir",
@@ -467,9 +467,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-ir"
-version = "0.29.0"
+version = "0.31.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03a4050029ecb2b5a1ff3bfc64c39279179b294821ec2e8891a4a5c6e3a08db0"
+checksum = "8c4183955e084fcc387b515f867ed0e17e9e7301f5eee29c0338d5e63315bb41"
 dependencies = [
  "chalk-derive",
  "lazy_static",
@@ -477,9 +477,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-solve"
-version = "0.29.0"
+version = "0.31.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "828c1f80d4eaf681027cce02050c54a3c97370f81988d31bf2a56df54048746c"
+checksum = "50e8407bba06d9e760011a28060e8f3b3f87b82ea53fb8bfaa43614c19c14dcc"
 dependencies = [
  "chalk-derive",
  "chalk-ir",
@@ -5121,9 +5121,9 @@ dependencies = [
 
 [[package]]
 name = "tracing-serde"
-version = "0.1.1"
+version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6ccba2f8f16e0ed268fc765d9b7ff22e965e7185d32f8f1ec8294fe17d86e79"
+checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
 dependencies = [
  "serde",
  "tracing-core",
diff --git a/compiler/rustc_middle/Cargo.toml b/compiler/rustc_middle/Cargo.toml
index e8ace361b21..f9a450305d0 100644
--- a/compiler/rustc_middle/Cargo.toml
+++ b/compiler/rustc_middle/Cargo.toml
@@ -26,7 +26,7 @@ rustc_index = { path = "../rustc_index" }
 rustc_serialize = { path = "../rustc_serialize" }
 rustc_ast = { path = "../rustc_ast" }
 rustc_span = { path = "../rustc_span" }
-chalk-ir = "0.29.0"
+chalk-ir = "0.31.0"
 smallvec = { version = "1.0", features = ["union", "may_dangle"] }
 measureme = "0.7.1"
 rustc_session = { path = "../rustc_session" }
diff --git a/compiler/rustc_traits/Cargo.toml b/compiler/rustc_traits/Cargo.toml
index 6d495718276..b176b150cd3 100644
--- a/compiler/rustc_traits/Cargo.toml
+++ b/compiler/rustc_traits/Cargo.toml
@@ -12,9 +12,9 @@ rustc_hir = { path = "../rustc_hir" }
 rustc_index = { path = "../rustc_index" }
 rustc_ast = { path = "../rustc_ast" }
 rustc_span = { path = "../rustc_span" }
-chalk-ir = "0.29.0"
-chalk-solve = "0.29.0"
-chalk-engine = "0.29.0"
+chalk-ir = "0.31.0"
+chalk-solve = "0.31.0"
+chalk-engine = "0.31.0"
 smallvec = { version = "1.0", features = ["union", "may_dangle"] }
 rustc_infer = { path = "../rustc_infer" }
 rustc_trait_selection = { path = "../rustc_trait_selection" }
diff --git a/compiler/rustc_traits/src/chalk/db.rs b/compiler/rustc_traits/src/chalk/db.rs
index 223635e9aec..3368c5b7699 100644
--- a/compiler/rustc_traits/src/chalk/db.rs
+++ b/compiler/rustc_traits/src/chalk/db.rs
@@ -22,7 +22,6 @@ use rustc_ast::ast;
 
 pub struct RustIrDatabase<'tcx> {
     pub(crate) interner: RustInterner<'tcx>,
-    pub(crate) restatic_placeholder: ty::Region<'tcx>,
     pub(crate) reempty_placeholder: ty::Region<'tcx>,
 }
 
@@ -39,11 +38,8 @@ impl<'tcx> RustIrDatabase<'tcx> {
         bound_vars: SubstsRef<'tcx>,
     ) -> Vec<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>> {
         let predicates = self.interner.tcx.predicates_of(def_id).predicates;
-        let mut regions_substitutor = lowering::RegionsSubstitutor::new(
-            self.interner.tcx,
-            self.restatic_placeholder,
-            self.reempty_placeholder,
-        );
+        let mut regions_substitutor =
+            lowering::RegionsSubstitutor::new(self.interner.tcx, self.reempty_placeholder);
         predicates
             .iter()
             .map(|(wc, _)| wc.subst(self.interner.tcx, bound_vars))
@@ -274,11 +270,8 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
 
         let trait_ref = self.interner.tcx.impl_trait_ref(def_id).expect("not an impl");
         let trait_ref = trait_ref.subst(self.interner.tcx, bound_vars);
-        let mut regions_substitutor = lowering::RegionsSubstitutor::new(
-            self.interner.tcx,
-            self.restatic_placeholder,
-            self.reempty_placeholder,
-        );
+        let mut regions_substitutor =
+            lowering::RegionsSubstitutor::new(self.interner.tcx, self.reempty_placeholder);
         let trait_ref = trait_ref.fold_with(&mut regions_substitutor);
 
         let where_clauses = self.where_clauses_for(def_id, bound_vars);
@@ -316,11 +309,8 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
 
             let self_ty = trait_ref.self_ty();
             let self_ty = self_ty.subst(self.interner.tcx, bound_vars);
-            let mut regions_substitutor = lowering::RegionsSubstitutor::new(
-                self.interner.tcx,
-                self.restatic_placeholder,
-                self.reempty_placeholder,
-            );
+            let mut regions_substitutor =
+                lowering::RegionsSubstitutor::new(self.interner.tcx, self.reempty_placeholder);
             let self_ty = self_ty.fold_with(&mut regions_substitutor);
             let lowered_ty = self_ty.lower_into(&self.interner);
 
@@ -590,6 +580,20 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
         let substitution = &substs.as_slice(&self.interner)[0..substs.len(&self.interner) - 3];
         chalk_ir::Substitution::from_iter(&self.interner, substitution)
     }
+
+    fn generator_datum(
+        &self,
+        _generator_id: chalk_ir::GeneratorId<RustInterner<'tcx>>,
+    ) -> Arc<chalk_solve::rust_ir::GeneratorDatum<RustInterner<'tcx>>> {
+        unimplemented!()
+    }
+
+    fn generator_witness_datum(
+        &self,
+        _generator_id: chalk_ir::GeneratorId<RustInterner<'tcx>>,
+    ) -> Arc<chalk_solve::rust_ir::GeneratorWitnessDatum<RustInterner<'tcx>>> {
+        unimplemented!()
+    }
 }
 
 /// Creates a `InternalSubsts` that maps each generic parameter to a higher-ranked
diff --git a/compiler/rustc_traits/src/chalk/lowering.rs b/compiler/rustc_traits/src/chalk/lowering.rs
index bdb2513cc46..391251b6fa5 100644
--- a/compiler/rustc_traits/src/chalk/lowering.rs
+++ b/compiler/rustc_traits/src/chalk/lowering.rs
@@ -427,13 +427,20 @@ impl<'tcx> LowerInto<'tcx, Ty<'tcx>> for &chalk_ir::Ty<RustInterner<'tcx>> {
                         chalk_ir::FloatTy::F64 => ty::Float(ast::FloatTy::F64),
                     },
                 },
-                chalk_ir::TypeName::Array => unimplemented!(),
+                chalk_ir::TypeName::Array => {
+                    let substs = application_ty.substitution.as_slice(interner);
+                    let ty = substs[0].assert_ty_ref(interner).lower_into(interner);
+                    let c = substs[1].assert_const_ref(interner).lower_into(interner);
+                    ty::Array(ty, interner.tcx.mk_const(c))
+                }
                 chalk_ir::TypeName::FnDef(id) => {
                     ty::FnDef(id.0, application_ty.substitution.lower_into(interner))
                 }
                 chalk_ir::TypeName::Closure(closure) => {
                     ty::Closure(closure.0, application_ty.substitution.lower_into(interner))
                 }
+                chalk_ir::TypeName::Generator(_) => unimplemented!(),
+                chalk_ir::TypeName::GeneratorWitness(_) => unimplemented!(),
                 chalk_ir::TypeName::Never => ty::Never,
                 chalk_ir::TypeName::Tuple(_size) => {
                     ty::Tuple(application_ty.substitution.lower_into(interner))
@@ -483,7 +490,15 @@ impl<'tcx> LowerInto<'tcx, Ty<'tcx>> for &chalk_ir::Ty<RustInterner<'tcx>> {
                 universe: ty::UniverseIndex::from_usize(placeholder.ui.counter),
                 name: ty::BoundVar::from_usize(placeholder.idx),
             }),
-            TyData::Alias(_alias_ty) => unimplemented!(),
+            chalk_ir::TyData::Alias(alias_ty) => match alias_ty {
+                chalk_ir::AliasTy::Projection(projection) => ty::Projection(ty::ProjectionTy {
+                    item_def_id: projection.associated_ty_id.0,
+                    substs: projection.substitution.lower_into(interner),
+                }),
+                chalk_ir::AliasTy::Opaque(opaque) => {
+                    ty::Opaque(opaque.opaque_ty_id.0, opaque.substitution.lower_into(interner))
+                }
+            },
             TyData::Function(_quantified_ty) => unimplemented!(),
             TyData::BoundVar(_bound) => ty::Bound(
                 ty::DebruijnIndex::from_usize(_bound.debruijn.depth() as usize),
@@ -519,8 +534,7 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Lifetime<RustInterner<'tcx>>> for Region<'t
                 ty::BrEnv => unimplemented!(),
             },
             ReFree(_) => unimplemented!(),
-            // FIXME(chalk): need to handle ReStatic
-            ReStatic => unimplemented!(),
+            ReStatic => chalk_ir::LifetimeData::Static.intern(interner),
             ReVar(_) => unimplemented!(),
             RePlaceholder(placeholder_region) => {
                 chalk_ir::LifetimeData::Placeholder(chalk_ir::PlaceholderIndex {
@@ -550,6 +564,7 @@ impl<'tcx> LowerInto<'tcx, Region<'tcx>> for &chalk_ir::Lifetime<RustInterner<'t
                     name: ty::BoundRegion::BrAnon(p.idx as u32),
                 })
             }
+            chalk_ir::LifetimeData::Static => ty::RegionKind::ReStatic,
             chalk_ir::LifetimeData::Phantom(_, _) => unimplemented!(),
         };
         interner.tcx.mk_region(kind)
@@ -701,7 +716,16 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::Binders<chalk_ir::QuantifiedWhereClauses<Ru
                     }),
                 )
             }
-            ty::ExistentialPredicate::Projection(_predicate) => unimplemented!(),
+            ty::ExistentialPredicate::Projection(predicate) => chalk_ir::Binders::new(
+                chalk_ir::VariableKinds::empty(interner),
+                chalk_ir::WhereClause::AliasEq(chalk_ir::AliasEq {
+                    alias: chalk_ir::AliasTy::Projection(chalk_ir::ProjectionTy {
+                        associated_ty_id: chalk_ir::AssocTypeId(predicate.item_def_id),
+                        substitution: predicate.substs.lower_into(interner),
+                    }),
+                    ty: predicate.ty.lower_into(interner),
+                }),
+            ),
             ty::ExistentialPredicate::AutoTrait(def_id) => chalk_ir::Binders::new(
                 chalk_ir::VariableKinds::empty(interner),
                 chalk_ir::WhereClause::Implemented(chalk_ir::TraitRef {
@@ -1116,17 +1140,12 @@ impl<'tcx> TypeVisitor<'tcx> for PlaceholdersCollector {
 /// Used to substitute specific `Regions`s with placeholders.
 crate struct RegionsSubstitutor<'tcx> {
     tcx: TyCtxt<'tcx>,
-    restatic_placeholder: ty::Region<'tcx>,
     reempty_placeholder: ty::Region<'tcx>,
 }
 
 impl<'tcx> RegionsSubstitutor<'tcx> {
-    crate fn new(
-        tcx: TyCtxt<'tcx>,
-        restatic_placeholder: ty::Region<'tcx>,
-        reempty_placeholder: ty::Region<'tcx>,
-    ) -> Self {
-        RegionsSubstitutor { tcx, restatic_placeholder, reempty_placeholder }
+    crate fn new(tcx: TyCtxt<'tcx>, reempty_placeholder: ty::Region<'tcx>) -> Self {
+        RegionsSubstitutor { tcx, reempty_placeholder }
     }
 }
 
@@ -1137,7 +1156,6 @@ impl<'tcx> TypeFolder<'tcx> for RegionsSubstitutor<'tcx> {
 
     fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx> {
         match r {
-            ty::ReStatic => self.restatic_placeholder,
             ty::ReEmpty(ui) => {
                 assert_eq!(ui.as_usize(), 0);
                 self.reempty_placeholder
diff --git a/compiler/rustc_traits/src/chalk/mod.rs b/compiler/rustc_traits/src/chalk/mod.rs
index 63c5b884357..f174a92274e 100644
--- a/compiler/rustc_traits/src/chalk/mod.rs
+++ b/compiler/rustc_traits/src/chalk/mod.rs
@@ -42,10 +42,6 @@ crate fn evaluate_goal<'tcx>(
     let mut placeholders_collector = PlaceholdersCollector::new();
     obligation.visit_with(&mut placeholders_collector);
 
-    let restatic_placeholder = tcx.mk_region(ty::RegionKind::RePlaceholder(ty::Placeholder {
-        universe: ty::UniverseIndex::ROOT,
-        name: ty::BoundRegion::BrAnon(placeholders_collector.next_anon_region_placeholder),
-    }));
     let reempty_placeholder = tcx.mk_region(ty::RegionKind::RePlaceholder(ty::Placeholder {
         universe: ty::UniverseIndex::ROOT,
         name: ty::BoundRegion::BrAnon(placeholders_collector.next_anon_region_placeholder + 1),
@@ -57,8 +53,7 @@ crate fn evaluate_goal<'tcx>(
     // FIXME(chalk): we really should be substituting these back in the solution
     let _params: FxHashMap<usize, ParamTy> = params_substitutor.params;
 
-    let mut regions_substitutor =
-        RegionsSubstitutor::new(tcx, restatic_placeholder, reempty_placeholder);
+    let mut regions_substitutor = RegionsSubstitutor::new(tcx, reempty_placeholder);
     let obligation = obligation.fold_with(&mut regions_substitutor);
 
     let max_universe = obligation.max_universe.index();
@@ -101,7 +96,7 @@ crate fn evaluate_goal<'tcx>(
 
     use chalk_solve::Solver;
     let mut solver = chalk_engine::solve::SLGSolver::new(32, None);
-    let db = ChalkRustIrDatabase { interner, restatic_placeholder, reempty_placeholder };
+    let db = ChalkRustIrDatabase { interner, reempty_placeholder };
     let solution = chalk_solve::logging::with_tracing_logs(|| solver.solve(&db, &lowered_goal));
 
     // Ideally, the code to convert *back* to rustc types would live close to
diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs
index d180de9be3b..0c4907fd002 100644
--- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs
+++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs
@@ -1,5 +1,6 @@
 // NOTE: rustc cannot currently handle bounds of the form `for<'a> <Foo as Bar<'a>>::Assoc: Baz`.
 // This should hopefully be fixed with Chalk.
+// ignore-compare-mode-chalk
 
 #![feature(associated_type_bounds)]
 
diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
index e68b5b342a4..1c493581bc9 100644
--- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
+++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` is not an iterator
-  --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:5
+  --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:5
    |
 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<<Self as Case1>::C as Iterator>::Item` is not an iterator
@@ -11,7 +11,7 @@ LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
-  --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:36
+  --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:36
    |
 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
    |                                    ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
@@ -28,7 +28,7 @@ LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
-  --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:93
+  --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:93
    |
 LL |     type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
    |                                                                                             ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
diff --git a/src/test/ui/associated-type-bounds/trait-params.rs b/src/test/ui/associated-type-bounds/trait-params.rs
index b0703a4ee22..a9aa2747e52 100644
--- a/src/test/ui/associated-type-bounds/trait-params.rs
+++ b/src/test/ui/associated-type-bounds/trait-params.rs
@@ -1,4 +1,5 @@
 // build-pass (FIXME(62277): could be check-pass?)
+// ignore-compare-mode-chalk
 
 #![feature(associated_type_bounds)]
 
diff --git a/src/test/ui/associated-type-bounds/union-bounds.rs b/src/test/ui/associated-type-bounds/union-bounds.rs
index 97c5acf1f72..f1aab2a6da0 100644
--- a/src/test/ui/associated-type-bounds/union-bounds.rs
+++ b/src/test/ui/associated-type-bounds/union-bounds.rs
@@ -1,4 +1,5 @@
 // run-pass
+// ignore-compare-mode-chalk
 
 #![feature(associated_type_bounds)]
 #![feature(untagged_unions)]
diff --git a/src/test/ui/associated-types/associated-types-stream.rs b/src/test/ui/associated-types/associated-types-stream.rs
index 96954528aaa..220ee6af2fc 100644
--- a/src/test/ui/associated-types/associated-types-stream.rs
+++ b/src/test/ui/associated-types/associated-types-stream.rs
@@ -1,6 +1,7 @@
 // run-pass
 // Test references to the trait `Stream` in the bounds for associated
 // types defined on `Stream`. Issue #20551.
+// ignore-compare-mode-chalk
 
 
 trait Stream {
diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs
index 5db619dc98f..a04144ba06b 100644
--- a/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs
+++ b/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs
@@ -1,3 +1,4 @@
+// ignore-compare-mode-chalk
 trait Z<'a, T: ?Sized>
 where
     T: Z<'a, u16>,
diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr
index 9a701943796..b48ff97f121 100644
--- a/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr
+++ b/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-2.rs:3:8
+  --> $DIR/hr-associated-type-bound-param-2.rs:4:8
    |
 LL | trait Z<'a, T: ?Sized>
    |       - required by a bound in this
@@ -15,7 +15,7 @@ LL |     for<'b> <T as Z<'b, u16>>::W: Clone,
              <&mut T as Clone>
 
 error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-2.rs:15:14
+  --> $DIR/hr-associated-type-bound-param-2.rs:16:14
    |
 LL | trait Z<'a, T: ?Sized>
    |       - required by a bound in this
@@ -31,7 +31,7 @@ LL |     type W = str;
              <&mut T as Clone>
 
 error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-2.rs:3:8
+  --> $DIR/hr-associated-type-bound-param-2.rs:4:8
    |
 LL | trait Z<'a, T: ?Sized>
    |       - required by a bound in this
diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs
index ec627c7f7ea..fc3a85171e2 100644
--- a/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs
+++ b/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs
@@ -1,3 +1,4 @@
+// ignore-compare-mode-chalk
 trait Cycle: Sized {
     type Next: Cycle<Next = Self>;
 }
diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr
index 81eceb46667..df25f7ac953 100644
--- a/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr
+++ b/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-5.rs:26:14
+  --> $DIR/hr-associated-type-bound-param-5.rs:27:14
    |
 LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
    |       - required by a bound in this
@@ -15,7 +15,7 @@ LL |     type U = str;
              <&mut T as Clone>
 
 error[E0277]: the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-5.rs:26:14
+  --> $DIR/hr-associated-type-bound-param-5.rs:27:14
    |
 LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
    |       - required by a bound in this
@@ -31,7 +31,7 @@ LL |     type U = str;
              <&mut T as Clone>
 
 error[E0277]: the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-5.rs:32:14
+  --> $DIR/hr-associated-type-bound-param-5.rs:33:14
    |
 LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
    |       - required by a bound in this
@@ -47,7 +47,7 @@ LL |     type U = str;
              <&mut T as Clone>
 
 error[E0277]: the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
-  --> $DIR/hr-associated-type-bound-param-5.rs:32:14
+  --> $DIR/hr-associated-type-bound-param-5.rs:33:14
    |
 LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
    |       - required by a bound in this
diff --git a/src/test/ui/deriving/deriving-associated-types.rs b/src/test/ui/deriving/deriving-associated-types.rs
index 4b1cbe80c50..13735ff2c5a 100644
--- a/src/test/ui/deriving/deriving-associated-types.rs
+++ b/src/test/ui/deriving/deriving-associated-types.rs
@@ -1,4 +1,5 @@
 // run-pass
+// ignore-compare-mode-chalk
 pub trait DeclaredTrait {
     type Type;
 }
diff --git a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs
index 3b6c9791722..ffe297a5a6a 100644
--- a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs
+++ b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs
@@ -1,3 +1,4 @@
+// ignore-compare-mode-chalk
 use std::fmt::Debug;
 
 type Foo = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
diff --git a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr
index 8bab0d0c4a9..b32cf949854 100644
--- a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr
+++ b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr
@@ -1,5 +1,5 @@
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:3:12
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:4:12
    |
 LL | type Foo = impl Debug;
    |            ^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | type Foo = impl Debug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:11:16
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:12:16
    |
 LL |     type Baa = impl Debug;
    |                ^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     type Baa = impl Debug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: associated type defaults are unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:22:5
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:23:5
    |
 LL |     type Assoc = impl Debug;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL |     type Assoc = impl Debug;
    = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:22:18
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
    |
 LL |     type Assoc = impl Debug;
    |                  ^^^^^^^^^^
@@ -35,7 +35,7 @@ LL |     type Assoc = impl Debug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:28:24
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:24
    |
 LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
    |                        ^^^^^^^^^^
@@ -44,7 +44,7 @@ LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl D
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:28:37
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:37
    |
 LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
    |                                     ^^^^^^^^^^
@@ -53,7 +53,7 @@ LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl D
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:28:49
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:49
    |
 LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -62,7 +62,7 @@ LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl D
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:28:70
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:70
    |
 LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
    |                                                                      ^^^^^^^^^^
@@ -71,7 +71,7 @@ LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl D
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:39:21
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:40:21
    |
 LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
    |                     ^^^^^^^^^^
@@ -80,7 +80,7 @@ LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debu
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:39:34
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:40:34
    |
 LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
    |                                  ^^^^^^^^^^
@@ -89,7 +89,7 @@ LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debu
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:39:46
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:40:46
    |
 LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -98,7 +98,7 @@ LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debu
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:39:67
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:40:67
    |
 LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
    |                                                                   ^^^^^^^^^^
@@ -107,7 +107,7 @@ LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debu
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:22:18
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
    |
 LL |     type Assoc = impl Debug;
    |                  ^^^^^^^^^^
diff --git a/src/test/ui/impl-trait/example-calendar.rs b/src/test/ui/impl-trait/example-calendar.rs
index fafab8a102a..238f3fa31ed 100644
--- a/src/test/ui/impl-trait/example-calendar.rs
+++ b/src/test/ui/impl-trait/example-calendar.rs
@@ -1,4 +1,5 @@
 // run-pass
+// ignore-compare-mode-chalk
 
 #![feature(fn_traits,
            step_trait,
diff --git a/src/test/ui/impl-trait/issue-55872-2.rs b/src/test/ui/impl-trait/issue-55872-2.rs
index 7708576ae78..ee09a66ef53 100644
--- a/src/test/ui/impl-trait/issue-55872-2.rs
+++ b/src/test/ui/impl-trait/issue-55872-2.rs
@@ -1,5 +1,6 @@
 // edition:2018
 // ignore-tidy-linelength
+// ignore-compare-mode-chalk
 
 #![feature(type_alias_impl_trait)]
 
diff --git a/src/test/ui/impl-trait/issue-55872-2.stderr b/src/test/ui/impl-trait/issue-55872-2.stderr
index 58c5ee45051..f954ce9f090 100644
--- a/src/test/ui/impl-trait/issue-55872-2.stderr
+++ b/src/test/ui/impl-trait/issue-55872-2.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the trait bound `impl Future: Copy` is not satisfied
-  --> $DIR/issue-55872-2.rs:13:14
+  --> $DIR/issue-55872-2.rs:14:14
    |
 LL |     type E = impl std::marker::Copy;
    |              ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future`
 
 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-55872-2.rs:15:28
+  --> $DIR/issue-55872-2.rs:16:28
    |
 LL |       fn foo<T>() -> Self::E {
    |  ____________________________^
diff --git a/src/test/ui/impl-trait/issue-55872.rs b/src/test/ui/impl-trait/issue-55872.rs
index bc91aae70c7..b12bfbcda9d 100644
--- a/src/test/ui/impl-trait/issue-55872.rs
+++ b/src/test/ui/impl-trait/issue-55872.rs
@@ -1,4 +1,5 @@
 // ignore-tidy-linelength
+// ignore-compare-mode-chalk
 #![feature(type_alias_impl_trait)]
 
 pub trait Bar {
diff --git a/src/test/ui/impl-trait/issue-55872.stderr b/src/test/ui/impl-trait/issue-55872.stderr
index 60654ec3461..41d7beb22fa 100644
--- a/src/test/ui/impl-trait/issue-55872.stderr
+++ b/src/test/ui/impl-trait/issue-55872.stderr
@@ -1,5 +1,5 @@
 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-55872.rs:13:28
+  --> $DIR/issue-55872.rs:14:28
    |
 LL |       fn foo<T>() -> Self::E {
    |  ____________________________^
diff --git a/src/test/ui/issues/issue-23122-1.rs b/src/test/ui/issues/issue-23122-1.rs
index 0937e029ef4..efa4e614be5 100644
--- a/src/test/ui/issues/issue-23122-1.rs
+++ b/src/test/ui/issues/issue-23122-1.rs
@@ -1,3 +1,5 @@
+// ignore-compare-mode-chalk
+
 trait Next {
     type Next: Next;
 }
diff --git a/src/test/ui/issues/issue-23122-1.stderr b/src/test/ui/issues/issue-23122-1.stderr
index 1f78b0d152d..8613c1ef8c2 100644
--- a/src/test/ui/issues/issue-23122-1.stderr
+++ b/src/test/ui/issues/issue-23122-1.stderr
@@ -1,5 +1,5 @@
 error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next == _`
-  --> $DIR/issue-23122-1.rs:8:5
+  --> $DIR/issue-23122-1.rs:10:5
    |
 LL |     type Next = <GetNext<T> as Next>::Next;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-23122-2.rs b/src/test/ui/issues/issue-23122-2.rs
index 84abebf6b74..7866b931ec4 100644
--- a/src/test/ui/issues/issue-23122-2.rs
+++ b/src/test/ui/issues/issue-23122-2.rs
@@ -1,3 +1,4 @@
+// ignore-compare-mode-chalk
 trait Next {
     type Next: Next;
 }
diff --git a/src/test/ui/issues/issue-23122-2.stderr b/src/test/ui/issues/issue-23122-2.stderr
index 7ed04519b69..ce3bffe602c 100644
--- a/src/test/ui/issues/issue-23122-2.stderr
+++ b/src/test/ui/issues/issue-23122-2.stderr
@@ -1,5 +1,5 @@
 error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
-  --> $DIR/issue-23122-2.rs:8:5
+  --> $DIR/issue-23122-2.rs:9:5
    |
 LL |     type Next = <GetNext<T::Next> as Next>::Next;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-28561.rs b/src/test/ui/issues/issue-28561.rs
index 1241fb0b1f8..184f5cb26c5 100644
--- a/src/test/ui/issues/issue-28561.rs
+++ b/src/test/ui/issues/issue-28561.rs
@@ -1,4 +1,5 @@
 // check-pass
+// ignore-compare-mode-chalk
 #[derive(Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
 struct Array<T> {
     f00: [T; 00],
diff --git a/src/test/ui/issues/issue-33187.rs b/src/test/ui/issues/issue-33187.rs
index 5226f9faf56..f6b56610ec7 100644
--- a/src/test/ui/issues/issue-33187.rs
+++ b/src/test/ui/issues/issue-33187.rs
@@ -1,4 +1,5 @@
 // run-pass
+// ignore-compare-mode-chalk
 struct Foo<A: Repr>(<A as Repr>::Data);
 
 impl<A> Copy for Foo<A> where <A as Repr>::Data: Copy { }
diff --git a/src/test/ui/issues/issue-37051.rs b/src/test/ui/issues/issue-37051.rs
index 9cae6cf5e76..e0c47197eaa 100644
--- a/src/test/ui/issues/issue-37051.rs
+++ b/src/test/ui/issues/issue-37051.rs
@@ -1,4 +1,5 @@
 // check-pass
+// ignore-compare-mode-chalk
 
 #![feature(associated_type_defaults)]
 
diff --git a/src/test/ui/issues/issue-50301.rs b/src/test/ui/issues/issue-50301.rs
index 47ee3e7ad70..4fcb41485d0 100644
--- a/src/test/ui/issues/issue-50301.rs
+++ b/src/test/ui/issues/issue-50301.rs
@@ -1,5 +1,6 @@
 // Tests that HRTBs are correctly accepted -- https://github.com/rust-lang/rust/issues/50301
 // check-pass
+// ignore-compare-mode-chalk
 trait Trait
 where
     for<'a> &'a Self::IntoIter: IntoIterator<Item = u32>,
diff --git a/src/test/ui/issues/issue-55796.nll.stderr b/src/test/ui/issues/issue-55796.nll.stderr
index baa0e6c29bf..61d4070d485 100644
--- a/src/test/ui/issues/issue-55796.nll.stderr
+++ b/src/test/ui/issues/issue-55796.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/issue-55796.rs:16:9
+  --> $DIR/issue-55796.rs:18:9
    |
 LL | pub trait Graph<'a> {
    |                 -- lifetime `'a` defined here
@@ -10,7 +10,7 @@ LL |         Box::new(self.out_edges(u).map(|e| e.target()))
    = help: consider replacing `'a` with `'static`
 
 error: lifetime may not live long enough
-  --> $DIR/issue-55796.rs:21:9
+  --> $DIR/issue-55796.rs:23:9
    |
 LL | pub trait Graph<'a> {
    |                 -- lifetime `'a` defined here
diff --git a/src/test/ui/issues/issue-55796.rs b/src/test/ui/issues/issue-55796.rs
index 088d4301c51..1086669ee74 100644
--- a/src/test/ui/issues/issue-55796.rs
+++ b/src/test/ui/issues/issue-55796.rs
@@ -1,3 +1,5 @@
+// ignore-compare-mode-chalk
+
 pub trait EdgeTrait<N> {
     fn target(&self) -> N;
 }
diff --git a/src/test/ui/issues/issue-55796.stderr b/src/test/ui/issues/issue-55796.stderr
index 1aa0050336e..ffe3bb737ad 100644
--- a/src/test/ui/issues/issue-55796.stderr
+++ b/src/test/ui/issues/issue-55796.stderr
@@ -1,22 +1,22 @@
 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
-  --> $DIR/issue-55796.rs:16:9
+  --> $DIR/issue-55796.rs:18:9
    |
 LL |         Box::new(self.out_edges(u).map(|e| e.target()))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 5:17...
-  --> $DIR/issue-55796.rs:5:17
+note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 7:17...
+  --> $DIR/issue-55796.rs:7:17
    |
 LL | pub trait Graph<'a> {
    |                 ^^
-note: ...so that the type `Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:16:40: 16:54]>` will meet its required lifetime bounds
-  --> $DIR/issue-55796.rs:16:9
+note: ...so that the type `Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:18:40: 18:54]>` will meet its required lifetime bounds
+  --> $DIR/issue-55796.rs:18:9
    |
 LL |         Box::new(self.out_edges(u).map(|e| e.target()))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: but, the lifetime must be valid for the static lifetime...
 note: ...so that the expression is assignable
-  --> $DIR/issue-55796.rs:16:9
+  --> $DIR/issue-55796.rs:18:9
    |
 LL |         Box::new(self.out_edges(u).map(|e| e.target()))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,24 +24,24 @@ LL |         Box::new(self.out_edges(u).map(|e| e.target()))
               found `Box<dyn Iterator<Item = <Self as Graph<'a>>::Node>>`
 
 error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
-  --> $DIR/issue-55796.rs:21:9
+  --> $DIR/issue-55796.rs:23:9
    |
 LL |         Box::new(self.in_edges(u).map(|e| e.target()))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 5:17...
-  --> $DIR/issue-55796.rs:5:17
+note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 7:17...
+  --> $DIR/issue-55796.rs:7:17
    |
 LL | pub trait Graph<'a> {
    |                 ^^
-note: ...so that the type `Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:21:39: 21:53]>` will meet its required lifetime bounds
-  --> $DIR/issue-55796.rs:21:9
+note: ...so that the type `Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:23:39: 23:53]>` will meet its required lifetime bounds
+  --> $DIR/issue-55796.rs:23:9
    |
 LL |         Box::new(self.in_edges(u).map(|e| e.target()))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: but, the lifetime must be valid for the static lifetime...
 note: ...so that the expression is assignable
-  --> $DIR/issue-55796.rs:21:9
+  --> $DIR/issue-55796.rs:23:9
    |
 LL |         Box::new(self.in_edges(u).map(|e| e.target()))
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs b/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs
index 36e9932602f..44ea9f12d38 100644
--- a/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs
+++ b/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs
@@ -1,5 +1,6 @@
 // build-pass
 // ignore-tidy-filelength
+// ignore-compare-mode-chalk
 #![crate_type = "rlib"]
 
 fn banana(v: &str) -> u32 {
diff --git a/src/test/ui/nll/ty-outlives/issue-53789-2.rs b/src/test/ui/nll/ty-outlives/issue-53789-2.rs
index 7dcdd58bb24..d15e4024607 100644
--- a/src/test/ui/nll/ty-outlives/issue-53789-2.rs
+++ b/src/test/ui/nll/ty-outlives/issue-53789-2.rs
@@ -1,6 +1,7 @@
 // Regression test for #53789.
 //
 // check-pass
+// ignore-compare-mode-chalk
 
 use std::collections::BTreeMap;
 use std::ops::Range;
diff --git a/src/test/ui/specialization/deafult-associated-type-bound-1.rs b/src/test/ui/specialization/deafult-associated-type-bound-1.rs
index c043114b565..6eb2aa980d1 100644
--- a/src/test/ui/specialization/deafult-associated-type-bound-1.rs
+++ b/src/test/ui/specialization/deafult-associated-type-bound-1.rs
@@ -1,5 +1,6 @@
 // Check that we check that default associated types satisfy the required
 // bounds on them.
+// ignore-compare-mode-chalk
 
 #![feature(specialization)]
 //~^ WARNING `specialization` is incomplete
diff --git a/src/test/ui/specialization/deafult-associated-type-bound-1.stderr b/src/test/ui/specialization/deafult-associated-type-bound-1.stderr
index 4c21f8db8fa..337972ea2b7 100644
--- a/src/test/ui/specialization/deafult-associated-type-bound-1.stderr
+++ b/src/test/ui/specialization/deafult-associated-type-bound-1.stderr
@@ -1,5 +1,5 @@
 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/deafult-associated-type-bound-1.rs:4:12
+  --> $DIR/deafult-associated-type-bound-1.rs:5:12
    |
 LL | #![feature(specialization)]
    |            ^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #![feature(specialization)]
    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
 
 error[E0277]: the trait bound `str: Clone` is not satisfied
-  --> $DIR/deafult-associated-type-bound-1.rs:18:5
+  --> $DIR/deafult-associated-type-bound-1.rs:19:5
    |
 LL |     type U: Clone;
    |             ----- required by this bound in `X::U`
diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.rs b/src/test/ui/type-alias-impl-trait/issue-53598.rs
index 61dff79d07b..add96629380 100644
--- a/src/test/ui/type-alias-impl-trait/issue-53598.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-53598.rs
@@ -1,4 +1,5 @@
 // ignore-tidy-linelength
+// ignore-compare-mode-chalk
 #![feature(type_alias_impl_trait)]
 
 use std::fmt::Debug;
diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.stderr
index 4c8144a2359..79e2682da3e 100644
--- a/src/test/ui/type-alias-impl-trait/issue-53598.stderr
+++ b/src/test/ui/type-alias-impl-trait/issue-53598.stderr
@@ -1,5 +1,5 @@
 error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-53598.rs:20:42
+  --> $DIR/issue-53598.rs:21:42
    |
 LL |       fn foo<T: Debug>(_: T) -> Self::Item {
    |  __________________________________________^
diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.rs b/src/test/ui/type-alias-impl-trait/issue-57700.rs
index bfabef54724..c785ea2ee57 100644
--- a/src/test/ui/type-alias-impl-trait/issue-57700.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-57700.rs
@@ -1,4 +1,5 @@
 // ignore-tidy-linelength
+// ignore-compare-mode-chalk
 #![feature(arbitrary_self_types)]
 #![feature(type_alias_impl_trait)]
 
diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.stderr
index c701e3e74ef..dc6be87ee93 100644
--- a/src/test/ui/type-alias-impl-trait/issue-57700.stderr
+++ b/src/test/ui/type-alias-impl-trait/issue-57700.stderr
@@ -1,5 +1,5 @@
 error: type parameter `impl Deref<Target = Self>` is part of concrete type but not used in parameter list for the `impl Trait` type alias
-  --> $DIR/issue-57700.rs:16:58
+  --> $DIR/issue-57700.rs:17:58
    |
 LL |       fn foo(self: impl Deref<Target = Self>) -> Self::Bar {
    |  __________________________________________________________^
diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.rs b/src/test/ui/type-alias-impl-trait/issue-60371.rs
index 50b9d1ac793..14d21418ae8 100644
--- a/src/test/ui/type-alias-impl-trait/issue-60371.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-60371.rs
@@ -1,3 +1,5 @@
+// ignore-compare-mode-chalk
+
 trait Bug {
     type Item: Bug;
 
diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.stderr b/src/test/ui/type-alias-impl-trait/issue-60371.stderr
index 905248fb337..d8e514a2cf4 100644
--- a/src/test/ui/type-alias-impl-trait/issue-60371.stderr
+++ b/src/test/ui/type-alias-impl-trait/issue-60371.stderr
@@ -1,5 +1,5 @@
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/issue-60371.rs:8:17
+  --> $DIR/issue-60371.rs:10:17
    |
 LL |     type Item = impl Bug;
    |                 ^^^^^^^^
@@ -8,7 +8,7 @@ LL |     type Item = impl Bug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `(): Bug` is not satisfied
-  --> $DIR/issue-60371.rs:8:17
+  --> $DIR/issue-60371.rs:10:17
    |
 LL |     type Item = impl Bug;
    |                 ^^^^^^^^ the trait `Bug` is not implemented for `()`
@@ -17,7 +17,7 @@ LL |     type Item = impl Bug;
              <&() as Bug>
 
 error: could not find defining uses
-  --> $DIR/issue-60371.rs:8:17
+  --> $DIR/issue-60371.rs:10:17
    |
 LL |     type Item = impl Bug;
    |                 ^^^^^^^^