Skip to content

Commit

Permalink
Move mem_replace_with_default out of nursery
Browse files Browse the repository at this point in the history
  • Loading branch information
krishna-veerareddy committed Dec 19, 2019
1 parent 3eb36c1 commit 5c225e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
LintId::of(&matches::SINGLE_MATCH),
LintId::of(&mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
LintId::of(&mem_replace::MEM_REPLACE_WITH_UNINIT),
LintId::of(&methods::CHARS_LAST_CMP),
LintId::of(&methods::CHARS_NEXT_CMP),
Expand Down Expand Up @@ -1357,6 +1358,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
LintId::of(&matches::MATCH_WILD_ERR_ARM),
LintId::of(&matches::SINGLE_MATCH),
LintId::of(&mem_replace::MEM_REPLACE_OPTION_WITH_NONE),
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
LintId::of(&methods::CHARS_LAST_CMP),
LintId::of(&methods::INTO_ITER_ON_REF),
LintId::of(&methods::ITER_CLONED_COLLECT),
Expand Down Expand Up @@ -1582,7 +1584,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
LintId::of(&attrs::EMPTY_LINE_AFTER_OUTER_ATTR),
LintId::of(&fallible_impl_from::FALLIBLE_IMPL_FROM),
LintId::of(&mem_replace::MEM_REPLACE_WITH_DEFAULT),
LintId::of(&missing_const_for_fn::MISSING_CONST_FOR_FN),
LintId::of(&mul_add::MANUAL_MUL_ADD),
LintId::of(&mutex_atomic::MUTEX_INTEGER),
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/mem_replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ declare_clippy_lint! {
/// let taken = std::mem::take(&mut text);
/// ```
pub MEM_REPLACE_WITH_DEFAULT,
nursery,
style,
"replacing a value of type `T` with `T::default()` instead of using `std::mem::take`"
}

Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ pub const ALL_LINTS: [Lint; 341] = [
},
Lint {
name: "mem_replace_with_default",
group: "nursery",
group: "style",
desc: "replacing a value of type `T` with `T::default()` instead of using `std::mem::take`",
deprecation: None,
module: "mem_replace",
Expand Down

0 comments on commit 5c225e1

Please sign in to comment.