Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 08df828

Browse files
compiler-errorslcnr
authored andcommitted
Merge the sub and incompleteness
1 parent 063cdf8 commit 08df828

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,18 @@ where
11071107
self.delegate
11081108
.clone_opaque_types_for_query_response()
11091109
.into_iter()
1110-
.find(|(_, hidden_ty)| *hidden_ty == self_ty)
1110+
.find(|(_, hidden_ty)| {
1111+
if let ty::Infer(ty::TyVar(self_vid)) = self_ty.kind() {
1112+
if let ty::Infer(ty::TyVar(hidden_vid)) = hidden_ty.kind() {
1113+
if self.delegate.sub_root_ty_var(self_vid)
1114+
== self.delegate.sub_root_ty_var(hidden_vid)
1115+
{
1116+
return true;
1117+
}
1118+
}
1119+
}
1120+
false
1121+
})
11111122
.map(|(key, _)| ty::AliasTy::new_from_args(self.cx(), key.def_id.into(), key.args))
11121123
}
11131124
}

0 commit comments

Comments
 (0)