Skip to content

Commit df4bb02

Browse files
committed
minor: don't drop binders when doing autoderef
1 parent b21f15a commit df4bb02

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/hir/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,8 +2504,7 @@ impl Type {
25042504

25052505
pub fn autoderef<'a>(&'a self, db: &'a dyn HirDatabase) -> impl Iterator<Item = Type> + 'a {
25062506
// There should be no inference vars in types passed here
2507-
let ty = hir_ty::replace_errors_with_variables(&self.ty).value;
2508-
let canonical = Canonical { value: ty, binders: CanonicalVarKinds::empty(&Interner) };
2507+
let canonical = hir_ty::replace_errors_with_variables(&self.ty);
25092508
let environment = self.env.env.clone();
25102509
let ty = InEnvironment { goal: canonical, environment };
25112510
autoderef(db, Some(self.krate), ty)

0 commit comments

Comments
 (0)