Skip to content

Commit 87599dd

Browse files
committed
add debug_assert to alias-relate
1 parent 71213fd commit 87599dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_trait_selection/src/solve/alias_relate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ impl<'tcx> EvalCtxt<'_, InferCtxt<'tcx>> {
2828
) -> QueryResult<'tcx> {
2929
let tcx = self.tcx();
3030
let Goal { param_env, predicate: (lhs, rhs, direction) } = goal;
31+
debug_assert!(lhs.to_alias_term().is_some() || rhs.to_alias_term().is_some());
3132

3233
// Structurally normalize the lhs.
3334
let lhs = if let Some(alias) = lhs.to_alias_term() {

0 commit comments

Comments
 (0)