diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 6aa7251b5..27e94b7fe 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -27,9 +27,9 @@ use hir_ty::{ | |||
27 | display::{HirDisplayError, HirFormatter}, | 27 | display::{HirDisplayError, HirFormatter}, |
28 | expr::ExprValidator, | 28 | expr::ExprValidator, |
29 | method_resolution, | 29 | method_resolution, |
30 | method_resolution, ApplicationTy, Canonical, InEnvironment, Substs, TraitEnvironment, Ty, | ||
31 | TyDefId, TypeCtor, | ||
32 | unsafe_validation::UnsafeValidator, | 30 | unsafe_validation::UnsafeValidator, |
31 | ApplicationTy, Canonical, GenericPredicate, InEnvironment, Substs, TraitEnvironment, Ty, | ||
32 | TyDefId, TypeCtor, | ||
33 | }; | 33 | }; |
34 | use ra_db::{CrateId, CrateName, Edition, FileId}; | 34 | use ra_db::{CrateId, CrateName, Edition, FileId}; |
35 | use ra_prof::profile; | 35 | use ra_prof::profile; |
@@ -671,6 +671,10 @@ impl Function { | |||
671 | db.function_data(self.id).params.clone() | 671 | db.function_data(self.id).params.clone() |
672 | } | 672 | } |
673 | 673 | ||
674 | pub fn is_unsafe(self, db: &dyn HirDatabase) -> bool { | ||
675 | db.function_data(self.id).is_unsafe | ||
676 | } | ||
677 | |||
674 | pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { | 678 | pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { |
675 | let _p = profile("Function::diagnostics"); | 679 | let _p = profile("Function::diagnostics"); |
676 | let infer = db.infer(self.id.into()); | 680 | let infer = db.infer(self.id.into()); |