Skip to content

Commit 0c6ebf1

Browse files
committed
Move useless_transmute back to complexity
1 parent 9c9cca3 commit 0c6ebf1

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed

clippy_lints/src/lib.register_all.rs

+1
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
305305
LintId::of(transmute::TRANSMUTE_NUM_TO_BYTES),
306306
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
307307
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
308+
LintId::of(transmute::USELESS_TRANSMUTE),
308309
LintId::of(transmute::WRONG_TRANSMUTE),
309310
LintId::of(transmuting_null::TRANSMUTING_NULL),
310311
LintId::of(types::BORROWED_BOX),

clippy_lints/src/lib.register_complexity.rs

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ store.register_group(true, "clippy::complexity", Some("clippy_complexity"), vec!
9090
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
9191
LintId::of(transmute::TRANSMUTE_NUM_TO_BYTES),
9292
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
93+
LintId::of(transmute::USELESS_TRANSMUTE),
9394
LintId::of(types::BORROWED_BOX),
9495
LintId::of(types::TYPE_COMPLEXITY),
9596
LintId::of(types::VEC_BOX),

clippy_lints/src/lib.register_nursery.rs

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
3131
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
3232
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
3333
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
34-
LintId::of(transmute::USELESS_TRANSMUTE),
3534
LintId::of(unused_rounding::UNUSED_ROUNDING),
3635
LintId::of(use_self::USE_SELF),
3736
])

clippy_lints/src/transmute/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ declare_clippy_lint! {
5959
/// ```
6060
#[clippy::version = "pre 1.29.0"]
6161
pub USELESS_TRANSMUTE,
62-
nursery,
62+
complexity,
6363
"transmutes that have the same to and from types or could be a cast/coercion"
6464
}
6565

tests/ui/transmute_undefined_repr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::transmute_undefined_repr)]
2-
#![allow(clippy::unit_arg, clippy::transmute_ptr_to_ref)]
2+
#![allow(clippy::unit_arg, clippy::transmute_ptr_to_ref, clippy::useless_transmute)]
33

44
use core::any::TypeId;
55
use core::ffi::c_void;

0 commit comments

Comments
 (0)