aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r--crates/ra_hir/src/code_model_api.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index 45fa4cd11..58481e715 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -17,6 +17,7 @@ use crate::{
17 ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeId}, 17 ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeId},
18 impl_block::ImplBlock, 18 impl_block::ImplBlock,
19 resolve::Resolver, 19 resolve::Resolver,
20 diagnostics::FunctionDiagnostic,
20}; 21};
21 22
22/// hir::Crate describes a single crate. It's the main interface with which 23/// hir::Crate describes a single crate. It's the main interface with which
@@ -519,6 +520,10 @@ impl Function {
519 let r = if !p.params.is_empty() { r.push_generic_params_scope(p) } else { r }; 520 let r = if !p.params.is_empty() { r.push_generic_params_scope(p) } else { r };
520 r 521 r
521 } 522 }
523
524 pub fn diagnostics(&self, db: &impl HirDatabase) -> Vec<FunctionDiagnostic> {
525 self.infer(db).diagnostics()
526 }
522} 527}
523 528
524impl Docs for Function { 529impl Docs for Function {