mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
Move mem_replace_with_default
out of nursery
This commit is contained in:
parent
26812f733d
commit
78b4dfc57c
3 changed files with 4 additions and 3 deletions
|
@ -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),
|
||||
|
|
|
@ -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`"
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue