We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efbfd37 commit f5e6816Copy full SHA for f5e6816
compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs
@@ -1115,7 +1115,18 @@ where
1115
self.delegate
1116
.clone_opaque_types_for_query_response()
1117
.into_iter()
1118
- .find(|(_, hidden_ty)| *hidden_ty == self_ty)
+ .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
+ })
1130
.map(|(key, _)| ty::AliasTy::new_from_args(self.cx(), key.def_id.into(), key.args))
1131
}
1132
0 commit comments