From 87599ddd86afc706f424870ca1a6f8dc4ae0aa8e Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 21 May 2024 19:30:26 +0000 Subject: add debug_assert to alias-relate --- compiler/rustc_trait_selection/src/solve/alias_relate.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler') diff --git a/compiler/rustc_trait_selection/src/solve/alias_relate.rs b/compiler/rustc_trait_selection/src/solve/alias_relate.rs index 43e61de955a..33b30bef683 100644 --- a/compiler/rustc_trait_selection/src/solve/alias_relate.rs +++ b/compiler/rustc_trait_selection/src/solve/alias_relate.rs @@ -28,6 +28,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> { ) -> QueryResult<'tcx> { let tcx = self.tcx(); let Goal { param_env, predicate: (lhs, rhs, direction) } = goal; + debug_assert!(lhs.to_alias_term().is_some() || rhs.to_alias_term().is_some()); // Structurally normalize the lhs. let lhs = if let Some(alias) = lhs.to_alias_term() { -- cgit 1.4.1-3-g733a5