Skip to content

Commit 34190cd

Browse files
Move mem_replace_with_default out of nursery
1 parent 9f5eb07 commit 34190cd

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

clippy_lints/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
11831183
LintId::of(&matches::SINGLE_MATCH),
11841184
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
11851185
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1186+
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
11861187
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
11871188
LintId::of(&methods::CHARS_LAST_CMP),
11881189
LintId::of(&methods::CHARS_NEXT_CMP),
@@ -1370,6 +1371,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
13701371
LintId::of(&matches::MATCH_WILD_ERR_ARM),
13711372
LintId::of(&matches::SINGLE_MATCH),
13721373
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1374+
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
13731375
LintId::of(&methods::CHARS_LAST_CMP),
13741376
LintId::of(&methods::INTO_ITER_ON_REF),
13751377
LintId::of(&methods::ITER_CLONED_COLLECT),
@@ -1595,7 +1597,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
15951597
store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
15961598
LintId::of(&attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
15971599
LintId::of(&fallible_impl_from::FALLIBLE_IMPL_FROM),
1598-
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
15991600
LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
16001601
LintId::of(&mul_add::MANUAL_MUL_ADD),
16011602
LintId::of(&mutex_atomic::MUTEX_INTEGER),

clippy_lints/src/mem_replace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ declare_clippy_lint! {
8787
/// let taken = std::mem::take(&mut text);
8888
/// ```
8989
pub MEM_REPLACE_WITH_DEFAULT,
90-
nursery,
90+
style,
9191
"replacing a value of type `T` with `T::default()` instead of using `std::mem::take`"
9292
}
9393

src/lintlist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ pub const ALL_LINTS: [Lint; 342] = [
11011101
},
11021102
Lint {
11031103
name: "mem_replace_with_default",
1104-
group: "nursery",
1104+
group: "style",
11051105
desc: "replacing a value of type `T` with `T::default()` instead of using `std::mem::take`",
11061106
deprecation: None,
11071107
module: "mem_replace",

0 commit comments

Comments
 (0)