File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2504,9 +2504,8 @@ impl Type {
2504
2504
2505
2505
pub fn autoderef < ' a > ( & ' a self , db : & ' a dyn HirDatabase ) -> impl Iterator < Item = Type > + ' a {
2506
2506
// There should be no inference vars in types passed here
2507
- // FIXME check that?
2508
- let canonical =
2509
- Canonical { value : self . ty . clone ( ) , binders : CanonicalVarKinds :: empty ( & Interner ) } ;
2507
+ let ty = hir_ty:: replace_errors_with_variables ( & self . ty ) . value ;
2508
+ let canonical = Canonical { value : ty, binders : CanonicalVarKinds :: empty ( & Interner ) } ;
2510
2509
let environment = self . env . env . clone ( ) ;
2511
2510
let ty = InEnvironment { goal : canonical, environment } ;
2512
2511
autoderef ( db, Some ( self . krate ) , ty)
@@ -2600,7 +2599,6 @@ impl Type {
2600
2599
callback : & mut dyn FnMut ( & Ty , AssocItemId ) -> ControlFlow < ( ) > ,
2601
2600
) {
2602
2601
// There should be no inference vars in types passed here
2603
- // FIXME check that?
2604
2602
let canonical = hir_ty:: replace_errors_with_variables ( & self . ty ) ;
2605
2603
2606
2604
let env = self . env . clone ( ) ;
You can’t perform that action at this time.
0 commit comments