From 1b1e3de988ed835b9469360d584963684d1c8ff6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 12 Jun 2021 17:41:25 +0300 Subject: minor: reduce visibility --- crates/hir_ty/src/diagnostics/unsafe_check.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty') 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}; pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> Vec { let infer = db.infer(def); - // let unsafe_expressions = ; let is_unsafe = match def { DefWithBodyId::FunctionId(it) => db.function_data(it).is_unsafe(), DefWithBodyId::StaticId(_) | DefWithBodyId::ConstId(_) => false, @@ -29,12 +28,12 @@ pub fn missing_unsafe(db: &dyn HirDatabase, def: DefWithBodyId) -> Vec { .collect() } -pub(crate) struct UnsafeExpr { +struct UnsafeExpr { pub(crate) expr: ExprId, pub(crate) inside_unsafe_block: bool, } -pub(crate) fn unsafe_expressions( +fn unsafe_expressions( db: &dyn HirDatabase, infer: &InferenceResult, def: DefWithBodyId, -- cgit v1.2.3