Skip to content

Commit 5c225e1

Browse files
Move mem_replace_with_default out of nursery
1 parent 3eb36c1 commit 5c225e1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

clippy_lints/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
11701170
LintId::of(&matches::SINGLE_MATCH),
11711171
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
11721172
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1173+
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
11731174
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
11741175
LintId::of(&methods::CHARS_LAST_CMP),
11751176
LintId::of(&methods::CHARS_NEXT_CMP),
@@ -1357,6 +1358,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
13571358
LintId::of(&matches::MATCH_WILD_ERR_ARM),
13581359
LintId::of(&matches::SINGLE_MATCH),
13591360
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1361+
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
13601362
LintId::of(&methods::CHARS_LAST_CMP),
13611363
LintId::of(&methods::INTO_ITER_ON_REF),
13621364
LintId::of(&methods::ITER_CLONED_COLLECT),
@@ -1582,7 +1584,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
15821584
store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
15831585
LintId::of(&attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
15841586
LintId::of(&fallible_impl_from::FALLIBLE_IMPL_FROM),
1585-
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
15861587
LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
15871588
LintId::of(&mul_add::MANUAL_MUL_ADD),
15881589
LintId::of(&mutex_atomic::MUTEX_INTEGER),

clippy_lints/src/mem_replace.rs

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ pub const ALL_LINTS: [Lint; 341] = [
10941094
},
10951095
Lint {
10961096
name: "mem_replace_with_default",
1097-
group: "nursery",
1097+
group: "style",
10981098
desc: "replacing a value of type `T` with `T::default()` instead of using `std::mem::take`",
10991099
deprecation: None,
11001100
module: "mem_replace",

0 commit comments

Comments
 (0)