Skip to content

Commit

Permalink
Deprecate mem_discriminant_non_enum
Browse files Browse the repository at this point in the history
This lint has been uplifted and is now included in
enum_intrinsics_non_enums.
  • Loading branch information
flip1995 committed Oct 11, 2021
1 parent 59b186d commit f483676
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 314 deletions.
5 changes: 2 additions & 3 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,10 +1873,10 @@ Released 2019-01-17

[2e26fdc2...b2601be](https://github.com/rust-lang/rust-clippy/compare/2e26fdc2...b2601be)

* New lints: [`slow_vector_initialization`], [`mem_discriminant_non_enum`],
* New lints: [`slow_vector_initialization`], `mem_discriminant_non_enum`,
[`redundant_clone`], [`wildcard_dependencies`],
[`into_iter_on_ref`], `into_iter_on_array`, [`deprecated_cfg_attr`],
[`mem_discriminant_non_enum`], [`cargo_common_metadata`]
[`cargo_common_metadata`]
* Add support for `u128` and `i128` to integer related lints
* Add float support to `mistyped_literal_suffixes`
* Fix false positives in `use_self`
Expand Down Expand Up @@ -2839,7 +2839,6 @@ Released 2018-09-13
[`match_wild_err_arm`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm
[`match_wildcard_for_single_variants`]: https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
[`maybe_infinite_iter`]: https://rust-lang.github.io/rust-clippy/master/index.html#maybe_infinite_iter
[`mem_discriminant_non_enum`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_discriminant_non_enum
[`mem_forget`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_forget
[`mem_replace_option_with_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none
[`mem_replace_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/clippy_lints/src/lib.register_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
LintId::of(matches::REDUNDANT_PATTERN_MATCHING),
LintId::of(matches::SINGLE_MATCH),
LintId::of(matches::WILDCARD_IN_OR_PATTERNS),
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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ store.register_group(true, "clippy::correctness", Some("clippy_correctness"), ve
LintId::of(loops::ITER_NEXT_LOOP),
LintId::of(loops::NEVER_LOOP),
LintId::of(loops::WHILE_IMMUTABLE_CONDITION),
LintId::of(mem_discriminant::MEM_DISCRIMINANT_NON_ENUM),
LintId::of(mem_replace::MEM_REPLACE_WITH_UNINIT),
LintId::of(methods::CLONE_DOUBLE_REF),
LintId::of(methods::ITERATOR_STEP_BY_ZERO),
Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/clippy_lints/src/lib.register_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ store.register_lints(&[
matches::SINGLE_MATCH_ELSE,
matches::WILDCARD_ENUM_MATCH_ARM,
matches::WILDCARD_IN_OR_PATTERNS,
mem_discriminant::MEM_DISCRIMINANT_NON_ENUM,
mem_forget::MEM_FORGET,
mem_replace::MEM_REPLACE_OPTION_WITH_NONE,
mem_replace::MEM_REPLACE_WITH_DEFAULT,
Expand Down
3 changes: 1 addition & 2 deletions src/tools/clippy/clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ mod map_unit_fn;
mod match_on_vec_items;
mod match_result_ok;
mod matches;
mod mem_discriminant;
mod mem_forget;
mod mem_replace;
mod methods;
Expand Down Expand Up @@ -600,7 +599,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
let doc_valid_idents = conf.doc_valid_idents.iter().cloned().collect::<FxHashSet<_>>();
store.register_late_pass(move || Box::new(doc::DocMarkdown::new(doc_valid_idents.clone())));
store.register_late_pass(|| Box::new(neg_multiply::NegMultiply));
store.register_late_pass(|| Box::new(mem_discriminant::MemDiscriminant));
store.register_late_pass(|| Box::new(mem_forget::MemForget));
store.register_late_pass(|| Box::new(arithmetic::Arithmetic::default()));
store.register_late_pass(|| Box::new(assign_ops::AssignOps));
Expand Down Expand Up @@ -850,6 +848,7 @@ pub fn register_renamed(ls: &mut rustc_lint::LintStore) {
ls.register_renamed("clippy::panic_params", "non_fmt_panics");
ls.register_renamed("clippy::unknown_clippy_lints", "unknown_lints");
ls.register_renamed("clippy::invalid_atomic_ordering", "invalid_atomic_ordering");
ls.register_renamed("clippy::mem_discriminant_non_enum", "enum_intrinsics_non_enums");
}

// only exists to let the dogfood integration test works.
Expand Down
82 changes: 0 additions & 82 deletions src/tools/clippy/clippy_lints/src/mem_discriminant.rs

This file was deleted.

45 changes: 0 additions & 45 deletions src/tools/clippy/tests/ui/mem_discriminant.fixed

This file was deleted.

45 changes: 0 additions & 45 deletions src/tools/clippy/tests/ui/mem_discriminant.rs

This file was deleted.

94 changes: 0 additions & 94 deletions src/tools/clippy/tests/ui/mem_discriminant.stderr

This file was deleted.

16 changes: 0 additions & 16 deletions src/tools/clippy/tests/ui/mem_discriminant_unfixable.rs

This file was deleted.

20 changes: 0 additions & 20 deletions src/tools/clippy/tests/ui/mem_discriminant_unfixable.stderr

This file was deleted.

1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/rename.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#![allow(clippy::redundant_static_lifetimes)]
// warn for the old lint name here, to test if the renaming worked
#![warn(clippy::cognitive_complexity)]
#![warn(enum_intrinsics_non_enums)]

#[warn(clippy::module_name_repetitions)]
fn main() {}
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#![allow(clippy::redundant_static_lifetimes)]
// warn for the old lint name here, to test if the renaming worked
#![warn(clippy::cyclomatic_complexity)]
#![warn(clippy::mem_discriminant_non_enum)]

#[warn(clippy::stutter)]
fn main() {}
Expand Down
Loading

0 comments on commit f483676

Please sign in to comment.