File tree 2 files changed +13
-2
lines changed
compiler/rustc_next_trait_solver/src/solve
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use rustc_type_ir::{
14
14
use tracing:: instrument;
15
15
16
16
use super :: trait_goals:: TraitGoalProvenVia ;
17
- use super :: { has_only_region_constraints, has_only_region_constraints , inspect, inspect} ;
17
+ use super :: { has_only_region_constraints, inspect, inspect} ;
18
18
use crate :: delegate:: SolverDelegate ;
19
19
use crate :: solve:: inspect:: ProbeKind ;
20
20
use crate :: solve:: {
Original file line number Diff line number Diff line change @@ -1115,7 +1115,18 @@ where
1115
1115
self . delegate
1116
1116
. clone_opaque_types_for_query_response ( )
1117
1117
. 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
+ } )
1119
1130
. map ( |( key, _) | ty:: AliasTy :: new_from_args ( self . cx ( ) , key. def_id . into ( ) , key. args ) )
1120
1131
}
1121
1132
}
You can’t perform that action at this time.
0 commit comments