mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
diagnostics
This commit is contained in:
parent
4132fbf3a0
commit
7e8f17188e
6 changed files with 74 additions and 6 deletions
|
@ -17,6 +17,7 @@ use crate::{
|
|||
ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeId},
|
||||
impl_block::ImplBlock,
|
||||
resolve::Resolver,
|
||||
diagnostics::FunctionDiagnostic,
|
||||
};
|
||||
|
||||
/// hir::Crate describes a single crate. It's the main interface with which
|
||||
|
@ -519,6 +520,10 @@ impl Function {
|
|||
let r = if !p.params.is_empty() { r.push_generic_params_scope(p) } else { r };
|
||||
r
|
||||
}
|
||||
|
||||
pub fn diagnostics(&self, db: &impl HirDatabase) -> Vec<FunctionDiagnostic> {
|
||||
self.infer(db).diagnostics()
|
||||
}
|
||||
}
|
||||
|
||||
impl Docs for Function {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue