Skip to content

Commit 1f7aef3

Browse files
committed
Auto merge of rust-lang#7102 - taralx:taralx-patch-1, r=flip1995
Switch transmute_ptr_to_ptr to "pedantic" class. Per discussion in rust-lang/rust-clippy#6372, this lint has significant false positives. changelog: transmute_ptr_to_ptr defaults to "allow".
2 parents 79b9eb5 + 8b5faf4 commit 1f7aef3

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
@@ -1414,6 +1414,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14141414
LintId::of(strings::STRING_ADD_ASSIGN),
14151415
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
14161416
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
1417+
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
14171418
LintId::of(types::LINKEDLIST),
14181419
LintId::of(types::OPTION_OPTION),
14191420
LintId::of(unicode::NON_ASCII_LITERAL),
@@ -1703,7 +1704,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
17031704
LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
17041705
LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
17051706
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
1706-
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
17071707
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
17081708
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
17091709
LintId::of(transmute::WRONG_TRANSMUTE),
@@ -1938,7 +1938,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
19381938
LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
19391939
LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
19401940
LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
1941-
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
19421941
LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
19431942
LintId::of(types::BORROWED_BOX),
19441943
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)