]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir_build/hair/pattern/const_to_pat.rs
Helper method for whether type has structural equality
[rust.git] / src / librustc_mir_build / hair / pattern / const_to_pat.rs
index 9e3f75fdc078c41fffc64006e2b9821a7bc20b7a..46b687d76e50431e89e1c1c33f43e10bfd769ebc 100644 (file)
@@ -80,7 +80,7 @@ fn search_for_structural_match_violation(
     }
 
     fn type_marked_structural(&self, ty: Ty<'tcx>) -> bool {
-        traits::type_marked_structural(self.id, self.span, &self.infcx, ty)
+        ty.is_structural_eq_shallow(self.infcx.tcx)
     }
 
     fn to_pat(