Skip to content

Commit d3e6fef

Browse files
author
Henri Lunnikivi
committed
Add lint declaration for field_reassign_with_default
1 parent 247e0b5 commit d3e6fef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use rustc::lint::{EarlyLintPass, LintArray, LintPass};
2+
use rustc::{declare_lint_pass, declare_tool_lint};
3+
4+
declare_clippy_lint! {
5+
pub FIELD_REASSIGN_WITH_DEFAULT,
6+
pedantic,
7+
"instance initialized with Default should have its fields set in the initializer"
8+
}
9+
10+
declare_lint_pass!(FieldReassignWithDefault => [FIELD_REASSIGN_WITH_DEFAULT]);
11+
12+
impl EarlyLintPass for FieldReassignWithDefault {}

0 commit comments

Comments
 (0)