Move mem_replace_with_default out of nursery

This commit is contained in:
Krishna Veera Reddy 2019-12-18 22:15:55 -08:00
parent 26812f733d
commit 78b4dfc57c
3 changed files with 4 additions and 3 deletions

View file

@ -1183,6 +1183,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),
@ -1370,6 +1371,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),
@ -1595,7 +1597,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),

View file

@ -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`"
}

View file

@ -1101,7 +1101,7 @@ pub const ALL_LINTS: [Lint; 342] = [
},
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",