Skip to content

Commit b301ffd

Browse files
committed
Move useless_transmute back to complexity
1 parent fb07e9c commit b301ffd

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
@@ -287,6 +287,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
287287
LintId::of(transmute::TRANSMUTE_NUM_TO_BYTES),
288288
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
289289
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
290+
LintId::of(transmute::USELESS_TRANSMUTE),
290291
LintId::of(transmute::WRONG_TRANSMUTE),
291292
LintId::of(transmuting_null::TRANSMUTING_NULL),
292293
LintId::of(types::BORROWED_BOX),

clippy_lints/src/lib.register_complexity.rs

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ store.register_group(true, "clippy::complexity", Some("clippy_complexity"), vec!
8888
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
8989
LintId::of(transmute::TRANSMUTE_NUM_TO_BYTES),
9090
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
91+
LintId::of(transmute::USELESS_TRANSMUTE),
9192
LintId::of(types::BORROWED_BOX),
9293
LintId::of(types::TYPE_COMPLEXITY),
9394
LintId::of(types::VEC_BOX),

clippy_lints/src/lib.register_nursery.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
2828
LintId::of(suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS),
2929
LintId::of(trailing_empty_array::TRAILING_EMPTY_ARRAY),
3030
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
31-
LintId::of(transmute::USELESS_TRANSMUTE),
3231
LintId::of(use_self::USE_SELF),
3332
])

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)