Skip to content

Commit b4c7234

Browse files
Move mem_replace_with_default out of nursery
1 parent 998548a commit b4c7234

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
@@ -1176,6 +1176,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
11761176
LintId::of(&matches::SINGLE_MATCH),
11771177
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
11781178
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1179+
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
11791180
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
11801181
LintId::of(&methods::CHARS_LAST_CMP),
11811182
LintId::of(&methods::CHARS_NEXT_CMP),
@@ -1362,6 +1363,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
13621363
LintId::of(&matches::MATCH_WILD_ERR_ARM),
13631364
LintId::of(&matches::SINGLE_MATCH),
13641365
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
1366+
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
13651367
LintId::of(&methods::CHARS_LAST_CMP),
13661368
LintId::of(&methods::INTO_ITER_ON_REF),
13671369
LintId::of(&methods::ITER_CLONED_COLLECT),
@@ -1586,7 +1588,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
15861588
store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
15871589
LintId::of(&attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
15881590
LintId::of(&fallible_impl_from::FALLIBLE_IMPL_FROM),
1589-
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
15901591
LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
15911592
LintId::of(&mul_add::MANUAL_MUL_ADD),
15921593
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; 340] = [
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)