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

Commit 9ecbe22

Browse files
compiler-errorslcnr
authored andcommitted
Merge the sub and incompleteness
1 parent 3a7b04c commit 9ecbe22

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
@@ -1094,7 +1094,18 @@ where
10941094
self.delegate
10951095
.clone_opaque_types_for_query_response()
10961096
.into_iter()
1097-
.find(|(_, hidden_ty)| *hidden_ty == self_ty)
1097+
.find(|(_, hidden_ty)| {
1098+
if let ty::Infer(ty::TyVar(self_vid)) = self_ty.kind() {
1099+
if let ty::Infer(ty::TyVar(hidden_vid)) = hidden_ty.kind() {
1100+
if self.delegate.sub_root_ty_var(self_vid)
1101+
== self.delegate.sub_root_ty_var(hidden_vid)
1102+
{
1103+
return true;
1104+
}
1105+
}
1106+
}
1107+
false
1108+
})
10981109
.map(|(key, _)| ty::AliasTy::new_from_args(self.cx(), key.def_id.into(), key.args))
10991110
}
11001111
}

0 commit comments

Comments
 (0)