Skip to content

Commit 4bee3a0

Browse files
Henri Lunnikivihegza
authored andcommitted
Run update_lints
1 parent a77b934 commit 4bee3a0

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,7 @@ Released 2018-09-13
17141714
[`extend_from_slice`]: https://rust-lang.github.io/rust-clippy/master/index.html#extend_from_slice
17151715
[`extra_unused_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
17161716
[`fallible_impl_from`]: https://rust-lang.github.io/rust-clippy/master/index.html#fallible_impl_from
1717+
[`field_reassign_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
17171718
[`filetype_is_file`]: https://rust-lang.github.io/rust-clippy/master/index.html#filetype_is_file
17181719
[`filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map
17191720
[`filter_map_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_next

clippy_lints/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ mod excessive_bools;
198198
mod exit;
199199
mod explicit_write;
200200
mod fallible_impl_from;
201+
mod field_reassign_with_default;
201202
mod float_equality_without_abs;
202203
mod float_literal;
203204
mod floating_point_arithmetic;
@@ -575,6 +576,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
575576
&exit::EXIT,
576577
&explicit_write::EXPLICIT_WRITE,
577578
&fallible_impl_from::FALLIBLE_IMPL_FROM,
579+
&field_reassign_with_default::FIELD_REASSIGN_WITH_DEFAULT,
578580
&float_equality_without_abs::FLOAT_EQUALITY_WITHOUT_ABS,
579581
&float_literal::EXCESSIVE_PRECISION,
580582
&float_literal::LOSSY_FLOAT_LITERAL,
@@ -1223,6 +1225,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12231225
LintId::of(&eta_reduction::REDUNDANT_CLOSURE_FOR_METHOD_CALLS),
12241226
LintId::of(&excessive_bools::FN_PARAMS_EXCESSIVE_BOOLS),
12251227
LintId::of(&excessive_bools::STRUCT_EXCESSIVE_BOOLS),
1228+
LintId::of(&field_reassign_with_default::FIELD_REASSIGN_WITH_DEFAULT),
12261229
LintId::of(&functions::MUST_USE_CANDIDATE),
12271230
LintId::of(&functions::TOO_MANY_LINES),
12281231
LintId::of(&if_not_else::IF_NOT_ELSE),

src/lintlist/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,13 @@ vec![
627627
deprecation: None,
628628
module: "fallible_impl_from",
629629
},
630+
Lint {
631+
name: "field_reassign_with_default",
632+
group: "pedantic",
633+
desc: "instance initialized with Default should have its fields set in the initializer",
634+
deprecation: None,
635+
module: "field_reassign_with_default",
636+
},
630637
Lint {
631638
name: "filetype_is_file",
632639
group: "restriction",

0 commit comments

Comments
 (0)