aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-12 15:41:25 +0100
committerAleksey Kladov <[email protected]>2021-06-12 15:41:47 +0100
commit1b1e3de988ed835b9469360d584963684d1c8ff6 (patch)
treea97a9010ec65f7653e5673d3dbde7ce19559cdce /crates/hir_ty/src/diagnostics
parent0413d51317a2470c94f82d93e66a3d009fce41a3 (diff)
minor: reduce visibility
Diffstat (limited to 'crates/hir_ty/src/diagnostics')
-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,