diff options
author | Igor Aleksanov <[email protected]> | 2020-10-04 07:26:39 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-10-12 09:05:00 +0100 |
commit | 9ea57cac0e9779ac0749ef568eeb3977fe3adacd (patch) | |
tree | c1a89dce0d234c6b193f3145c84779d229e27404 /crates/hir_ty/src/diagnostics | |
parent | 50a147dcdfd0df462f0c24e5d7bcfe60abadac32 (diff) |
Fix code style issues
Diffstat (limited to 'crates/hir_ty/src/diagnostics')
-rw-r--r-- | crates/hir_ty/src/diagnostics/decl_check.rs | 8 |
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 | ||
8 | mod str_helpers; | 13 | mod 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), |