about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2024-05-21 19:30:26 +0000
committerlcnr <rust@lcnr.de>2024-05-28 04:44:45 +0000
commit87599ddd86afc706f424870ca1a6f8dc4ae0aa8e (patch)
tree4db5b54ee8c8b529171878c30a44c1f2b1e1e938
parent71213fd60700478ac9ddef2cb4ef43b7bb660a5b (diff)
downloadrust-87599ddd86afc706f424870ca1a6f8dc4ae0aa8e.tar.gz
rust-87599ddd86afc706f424870ca1a6f8dc4ae0aa8e.zip
add debug_assert to alias-relate
-rw-r--r--compiler/rustc_trait_selection/src/solve/alias_relate.rs1
1 files changed, 1 insertions, 0 deletions
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() {