Rollup merge of #94014 - flip1995:clippy_transmute_lint_regroup, r=dtolnay

Move transmute_undefined_repr back to nursery

There's still open discussion if this lint is ready to be enabled by
default. We want to give us more time to figure this out and prevent
this lint from getting to stable as an enabled-by-default lint.

cc https://github.com/rust-lang/rust-clippy/pull/8432

r? `@Manishearth` `@dtolnay`

I think this is the way to go here. We can re-enable this lint with the next sync, if we should decide to do so. But I would hold of for this release.

We have until Friday (beta branching) to decide if we want to merge this.
This commit is contained in:
Matthias Krüger 2022-02-15 16:02:37 +01:00 committed by GitHub
commit e713288791
4 changed files with 2 additions and 3 deletions

View file

@ -277,7 +277,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT), LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
LintId::of(transmute::TRANSMUTE_NUM_TO_BYTES), LintId::of(transmute::TRANSMUTE_NUM_TO_BYTES),
LintId::of(transmute::TRANSMUTE_PTR_TO_REF), LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE), LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
LintId::of(transmute::WRONG_TRANSMUTE), LintId::of(transmute::WRONG_TRANSMUTE),
LintId::of(transmuting_null::TRANSMUTING_NULL), LintId::of(transmuting_null::TRANSMUTING_NULL),

View file

@ -58,7 +58,6 @@ store.register_group(true, "clippy::correctness", Some("clippy_correctness"), ve
LintId::of(size_of_in_element_count::SIZE_OF_IN_ELEMENT_COUNT), LintId::of(size_of_in_element_count::SIZE_OF_IN_ELEMENT_COUNT),
LintId::of(swap::ALMOST_SWAPPED), LintId::of(swap::ALMOST_SWAPPED),
LintId::of(to_string_in_display::TO_STRING_IN_DISPLAY), LintId::of(to_string_in_display::TO_STRING_IN_DISPLAY),
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE), LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
LintId::of(transmute::WRONG_TRANSMUTE), LintId::of(transmute::WRONG_TRANSMUTE),
LintId::of(transmuting_null::TRANSMUTING_NULL), LintId::of(transmuting_null::TRANSMUTING_NULL),

View file

@ -26,6 +26,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
LintId::of(strings::STRING_LIT_AS_BYTES), LintId::of(strings::STRING_LIT_AS_BYTES),
LintId::of(suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS), LintId::of(suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS),
LintId::of(trailing_empty_array::TRAILING_EMPTY_ARRAY), LintId::of(trailing_empty_array::TRAILING_EMPTY_ARRAY),
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
LintId::of(transmute::USELESS_TRANSMUTE), LintId::of(transmute::USELESS_TRANSMUTE),
LintId::of(use_self::USE_SELF), LintId::of(use_self::USE_SELF),
]) ])

View file

@ -376,7 +376,7 @@ declare_clippy_lint! {
/// ``` /// ```
#[clippy::version = "1.60.0"] #[clippy::version = "1.60.0"]
pub TRANSMUTE_UNDEFINED_REPR, pub TRANSMUTE_UNDEFINED_REPR,
correctness, nursery,
"transmute to or from a type with an undefined representation" "transmute to or from a type with an undefined representation"
} }