Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/borrowck.rs')
-rw-r--r--crates/hir-ty/src/mir/borrowck.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir-ty/src/mir/borrowck.rs b/crates/hir-ty/src/mir/borrowck.rs
index c5367f630e..31a75d6ab0 100644
--- a/crates/hir-ty/src/mir/borrowck.rs
+++ b/crates/hir-ty/src/mir/borrowck.rs
@@ -133,7 +133,7 @@ fn all_mir_bodies<'db>(
}
}
-#[salsa_macros::tracked(returns(ref), lru = 2024)]
+#[salsa_macros::tracked(returns(as_deref), lru = 2024)]
pub fn borrowck_query(
db: &dyn HirDatabase,
def: InferBodyId,
@@ -144,7 +144,7 @@ pub fn borrowck_query(
let env = db.trait_environment(def.generic_def(db));
// This calculates opaques defining scope which is a bit costly therefore is put outside `all_mir_bodies()`.
let typing_mode = TypingMode::borrowck(interner, def.into());
- let res = all_mir_bodies(
+ all_mir_bodies(
db,
def,
|body, owner| {
@@ -184,8 +184,7 @@ pub fn borrowck_query(
}
}
},
- )?;
- Ok(res)
+ )
}
fn moved_out_of_ref<'db>(