File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ impl HirDisplay for ProjectionTy {
251
251
}
252
252
253
253
let trait_ = f. db . trait_data ( self . trait_ ( f. db ) ) ;
254
- let first_parameter = self . self_type_parameter ( ) . into_displayable (
254
+ let first_parameter = self . self_type_parameter ( & Interner ) . into_displayable (
255
255
f. db ,
256
256
f. max_size ,
257
257
f. omit_verbose_types ,
@@ -602,7 +602,7 @@ impl HirDisplay for Ty {
602
602
WhereClause :: AliasEq ( AliasEq {
603
603
alias : AliasTy :: Projection ( proj) ,
604
604
ty : _,
605
- } ) => proj. self_type_parameter ( ) == self ,
605
+ } ) => proj. self_type_parameter ( & Interner ) == self ,
606
606
_ => false ,
607
607
} )
608
608
. collect :: < Vec < _ > > ( ) ;
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ impl ProjectionTy {
78
78
}
79
79
}
80
80
81
- pub fn self_type_parameter ( & self ) -> & Ty {
82
- & self . substitution . interned ( ) [ 0 ] . assert_ty_ref ( & Interner )
81
+ pub fn self_type_parameter ( & self , interner : & Interner ) -> & Ty {
82
+ & self . substitution . interned ( ) [ 0 ] . assert_ty_ref ( interner )
83
83
}
84
84
85
85
fn trait_ ( & self , db : & dyn HirDatabase ) -> TraitId {
@@ -477,7 +477,7 @@ impl Ty {
477
477
WhereClause :: AliasEq ( AliasEq {
478
478
alias : AliasTy :: Projection ( proj) ,
479
479
ty : _,
480
- } ) => proj. self_type_parameter ( ) == self ,
480
+ } ) => proj. self_type_parameter ( & Interner ) == self ,
481
481
_ => false ,
482
482
} )
483
483
. collect_vec ( ) ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ pub(crate) fn trait_solve_query(
89
89
..
90
90
} ) ) = & goal. value . goal
91
91
{
92
- if let TyKind :: BoundVar ( _) = projection_ty. self_type_parameter ( ) . kind ( & Interner ) {
92
+ if let TyKind :: BoundVar ( _) = projection_ty. self_type_parameter ( & Interner ) . kind ( & Interner ) {
93
93
// Hack: don't ask Chalk to normalize with an unknown self type, it'll say that's impossible
94
94
return Some ( Solution :: Ambig ( Guidance :: Unknown ) ) ;
95
95
}
Original file line number Diff line number Diff line change @@ -552,7 +552,7 @@ pub(super) fn generic_predicate_to_inline_bound(
552
552
Some ( make_binders ( rust_ir:: InlineBound :: TraitBound ( trait_bound) , pred. num_binders ) )
553
553
}
554
554
WhereClause :: AliasEq ( AliasEq { alias : AliasTy :: Projection ( projection_ty) , ty } ) => {
555
- if projection_ty. self_type_parameter ( ) != & self_ty_shifted_in {
555
+ if projection_ty. self_type_parameter ( & Interner ) != & self_ty_shifted_in {
556
556
return None ;
557
557
}
558
558
let trait_ = projection_ty. trait_ ( db) ;
You can’t perform that action at this time.
0 commit comments