mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
minor: don't drop binders when doing autoderef
This commit is contained in:
parent
b21f15a237
commit
df4bb02b6f
1 changed files with 1 additions and 2 deletions
|
@ -2504,8 +2504,7 @@ impl Type {
|
||||||
|
|
||||||
pub fn autoderef<'a>(&'a self, db: &'a dyn HirDatabase) -> impl Iterator<Item = Type> + 'a {
|
pub fn autoderef<'a>(&'a self, db: &'a dyn HirDatabase) -> impl Iterator<Item = Type> + 'a {
|
||||||
// There should be no inference vars in types passed here
|
// There should be no inference vars in types passed here
|
||||||
let ty = hir_ty::replace_errors_with_variables(&self.ty).value;
|
let canonical = hir_ty::replace_errors_with_variables(&self.ty);
|
||||||
let canonical = Canonical { value: ty, binders: CanonicalVarKinds::empty(&Interner) };
|
|
||||||
let environment = self.env.env.clone();
|
let environment = self.env.env.clone();
|
||||||
let ty = InEnvironment { goal: canonical, environment };
|
let ty = InEnvironment { goal: canonical, environment };
|
||||||
autoderef(db, Some(self.krate), ty)
|
autoderef(db, Some(self.krate), ty)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue