aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_ty/src/diagnostics/unsafe_check.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir_ty/src/diagnostics/unsafe_check.rs b/crates/hir_ty/src/diagnostics/unsafe_check.rs
index a4054cef9..777f347b8 100644
--- a/crates/hir_ty/src/diagnostics/unsafe_check.rs
+++ b/crates/hir_ty/src/diagnostics/unsafe_check.rs
@@ -13,7 +13,6 @@ use crate::{db::HirDatabase, InferenceResult, Interner, TyExt, TyKind};
13pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> Vec<ExprId> { 13pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> Vec<ExprId> {
14 let infer = db.infer(def); 14 let infer = db.infer(def);
15 15
16 // let unsafe_expressions = ;
17 let is_unsafe = match def { 16 let is_unsafe = match def {
18 DefWithBodyId::FunctionId(it) => db.function_data(it).is_unsafe(), 17 DefWithBodyId::FunctionId(it) => db.function_data(it).is_unsafe(),
19 DefWithBodyId::StaticId(_) | DefWithBodyId::ConstId(_) => false, 18 DefWithBodyId::StaticId(_) | DefWithBodyId::ConstId(_) => false,
@@ -29,12 +28,12 @@ pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> Vec<ExprId> {
29 .collect() 28 .collect()
30} 29}
31 30
32pub(crate) struct UnsafeExpr { 31struct UnsafeExpr {
33 pub(crate) expr: ExprId, 32 pub(crate) expr: ExprId,
34 pub(crate) inside_unsafe_block: bool, 33 pub(crate) inside_unsafe_block: bool,
35} 34}
36 35
37pub(crate) fn unsafe_expressions( 36fn unsafe_expressions(
38 db: &dyn HirDatabase, 37 db: &dyn HirDatabase,
39 infer: &InferenceResult, 38 infer: &InferenceResult,
40 def: DefWithBodyId, 39 def: DefWithBodyId,