Skip to content

Commit f5e6816

Browse files
compiler-errorslcnr
authored andcommitted
Merge the sub and incompleteness
1 parent efbfd37 commit f5e6816

File tree

1 file changed

+12
-1
lines changed
  • compiler/rustc_next_trait_solver/src/solve/eval_ctxt

1 file changed

+12
-1
lines changed

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,18 @@ where
11151115
self.delegate
11161116
.clone_opaque_types_for_query_response()
11171117
.into_iter()
1118-
.find(|(_, hidden_ty)| *hidden_ty == self_ty)
1118+
.find(|(_, hidden_ty)| {
1119+
if let ty::Infer(ty::TyVar(self_vid)) = self_ty.kind() {
1120+
if let ty::Infer(ty::TyVar(hidden_vid)) = hidden_ty.kind() {
1121+
if self.delegate.sub_root_ty_var(self_vid)
1122+
== self.delegate.sub_root_ty_var(hidden_vid)
1123+
{
1124+
return true;
1125+
}
1126+
}
1127+
}
1128+
false
1129+
})
11191130
.map(|(key, _)| ty::AliasTy::new_from_args(self.cx(), key.def_id.into(), key.args))
11201131
}
11211132
}

0 commit comments

Comments
 (0)