Skip to content

Commit 8b5faf4

Browse files
committed
Switch transmute_ptr_to_ptr to "pedantic" class.
Per discussion in rust-lang/rust-clippy#6372, this lint has significant false positives.
1 parent eaf0f3d commit 8b5faf4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14051405
LintId::of(strings::STRING_ADD_ASSIGN),
14061406
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
14071407
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
1408+
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
14081409
LintId::of(types::LINKEDLIST),
14091410
LintId::of(types::OPTION_OPTION),
14101411
LintId::of(unicode::NON_ASCII_LITERAL),
@@ -1693,7 +1694,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16931694
LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
16941695
LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
16951696
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
1696-
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
16971697
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
16981698
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
16991699
LintId::of(transmute::WRONG_TRANSMUTE),
@@ -1927,7 +1927,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
19271927
LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
19281928
LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
19291929
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
1930-
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
19311930
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
19321931
LintId::of(types::BORROWED_BOX),
19331932
LintId::of(types::TYPE_COMPLEXITY),

clippy_lints/src/transmute/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ declare_clippy_lint! {
274274
/// let _ = unsafe{ &*(&1u32 as *const u32 as *const f32) };
275275
/// ```
276276
pub TRANSMUTE_PTR_TO_PTR,
277-
complexity,
277+
pedantic,
278278
"transmutes from a pointer to a pointer / a reference to a reference"
279279
}
280280

0 commit comments

Comments
 (0)