Skip to content

Commit c1bee66

Browse files
author
Henri Lunnikivi
committed
Add lint declaration for field_reassign_with_default
1 parent ee289cc commit c1bee66

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)