]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir-ty/src/interner.rs
Auto merge of #13223 - lowr:fix/hir-proj-normalization, r=flodiebold
[rust.git] / crates / hir-ty / src / interner.rs
index 07197d8a190e47d5c9592298ef18a87b008b18af..ca76e08fddb915ee1b10597a6149ab3295177c77 100644 (file)
@@ -168,7 +168,7 @@ fn debug_substitution(
     }
 
     fn debug_separator_trait_ref(
-        separator_trait_ref: &chalk_ir::SeparatorTraitRef<Interner>,
+        separator_trait_ref: &chalk_ir::SeparatorTraitRef<'_, Interner>,
         fmt: &mut fmt::Formatter<'_>,
     ) -> Option<fmt::Result> {
         Some(write!(fmt, "{:?}", separator_trait_ref.debug(Interner)))
@@ -257,12 +257,7 @@ fn const_eq(
         c1: &Self::InternedConcreteConst,
         c2: &Self::InternedConcreteConst,
     ) -> bool {
-        match (c1, c2) {
-            (&ConstScalar::Usize(a), &ConstScalar::Usize(b)) => a == b,
-            // we were previously assuming this to be true, I'm not whether true or false on
-            // unknown values is safer.
-            (_, _) => true,
-        }
+        (c1 == &ConstScalar::Unknown) || (c2 == &ConstScalar::Unknown) || (c1 == c2)
     }
 
     fn intern_generic_arg(