aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/decl_check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/diagnostics/decl_check.rs')
-rw-r--r--crates/hir_ty/src/diagnostics/decl_check.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/hir_ty/src/diagnostics/decl_check.rs b/crates/hir_ty/src/diagnostics/decl_check.rs
index 28ce15773..4c20921e5 100644
--- a/crates/hir_ty/src/diagnostics/decl_check.rs
+++ b/crates/hir_ty/src/diagnostics/decl_check.rs
@@ -1,9 +1,14 @@
1//! Provides validators for the item declarations. 1//! Provides validators for the item declarations.
2//!
2//! This includes the following items: 3//! This includes the following items:
4//!
3//! - variable bindings (e.g. `let x = foo();`) 5//! - variable bindings (e.g. `let x = foo();`)
4//! - struct fields (e.g. `struct Foo { field: u8 }`) 6//! - struct fields (e.g. `struct Foo { field: u8 }`)
5//! - enum fields (e.g. `enum Foo { Variant { field: u8 } }`) 7//! - enum variants (e.g. `enum Foo { Variant { field: u8 } }`)
6//! - function/method arguments (e.g. `fn foo(arg: u8)`) 8//! - function/method arguments (e.g. `fn foo(arg: u8)`)
9//! - constants (e.g. `const FOO: u8 = 10;`)
10//! - static items (e.g. `static FOO: u8 = 10;`)
11//! - match arm bindings (e.g. `foo @ Some(_)`)
7 12
8mod str_helpers; 13mod str_helpers;
9 14
@@ -48,7 +53,6 @@ impl<'a, 'b> DeclValidator<'a, 'b> {
48 } 53 }
49 54
50 pub(super) fn validate_item(&mut self, db: &dyn HirDatabase) { 55 pub(super) fn validate_item(&mut self, db: &dyn HirDatabase) {
51 // let def = self.owner.into();
52 match self.owner { 56 match self.owner {
53 ModuleDefId::FunctionId(func) => self.validate_func(db, func), 57 ModuleDefId::FunctionId(func) => self.validate_func(db, func),
54 ModuleDefId::AdtId(adt) => self.validate_adt(db, adt), 58 ModuleDefId::AdtId(adt) => self.validate_adt(db, adt),