This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
compiler/rustc_next_trait_solver/src/solve Expand file tree Collapse file tree 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::{
1414use tracing:: instrument;
1515
1616use 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} ;
1818use crate :: delegate:: SolverDelegate ;
1919use crate :: solve:: inspect:: ProbeKind ;
2020use crate :: solve:: {
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments