aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorPaul Daniel Faria <[email protected]>2020-06-27 16:20:02 +0100
committerPaul Daniel Faria <[email protected]>2020-06-27 16:38:34 +0100
commitb1992b469cae689f7de01ea9031962735a409198 (patch)
treebd7cc9c0a70266ab3afac7a082bdd15a9c03fe68 /crates/ra_hir
parent28bb8ed9cb0aa9f1efad252748ea189716355157 (diff)
Remove unneeded code, filename from tests, fix rebasing issues
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs8
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};
34use ra_db::{CrateId, CrateName, Edition, FileId}; 34use ra_db::{CrateId, CrateName, Edition, FileId};
35use ra_prof::profile; 35use 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());