about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJP Sugarbroad <taralx@gmail.com>2021-04-16 14:29:23 -0700
committerJP Sugarbroad <taralx@gmail.com>2021-04-16 14:29:23 -0700
commit8b5faf4ab0cfc54bc9cc23b6f013bc571c62c360 (patch)
treee70bcdf6748f3ddcfefa4c86d2939f3803348873
parenteaf0f3df1509e8d0312895afbda94cf821b5f4c2 (diff)
downloadrust-8b5faf4ab0cfc54bc9cc23b6f013bc571c62c360.tar.gz
rust-8b5faf4ab0cfc54bc9cc23b6f013bc571c62c360.zip
Switch transmute_ptr_to_ptr to "pedantic" class.
Per discussion in https://github.com/rust-lang/rust-clippy/issues/6372, this lint has significant false positives.
-rw-r--r--clippy_lints/src/lib.rs3
-rw-r--r--clippy_lints/src/transmute/mod.rs2
2 files changed, 2 insertions, 3 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index 0f48799d339..f7255d32c99 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -1405,6 +1405,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(strings::STRING_ADD_ASSIGN),
         LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
         LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
+        LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
         LintId::of(types::LINKEDLIST),
         LintId::of(types::OPTION_OPTION),
         LintId::of(unicode::NON_ASCII_LITERAL),
@@ -1693,7 +1694,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
         LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
         LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
-        LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
         LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
         LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
         LintId::of(transmute::WRONG_TRANSMUTE),
@@ -1927,7 +1927,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(transmute::TRANSMUTE_INT_TO_BOOL),
         LintId::of(transmute::TRANSMUTE_INT_TO_CHAR),
         LintId::of(transmute::TRANSMUTE_INT_TO_FLOAT),
-        LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
         LintId::of(transmute::TRANSMUTE_PTR_TO_REF),
         LintId::of(types::BORROWED_BOX),
         LintId::of(types::TYPE_COMPLEXITY),
diff --git a/clippy_lints/src/transmute/mod.rs b/clippy_lints/src/transmute/mod.rs
index 86ac916df6c..569113910c9 100644
--- a/clippy_lints/src/transmute/mod.rs
+++ b/clippy_lints/src/transmute/mod.rs
@@ -274,7 +274,7 @@ declare_clippy_lint! {
     /// let _ = unsafe{ &*(&1u32 as *const u32 as *const f32) };
     /// ```
     pub TRANSMUTE_PTR_TO_PTR,
-    complexity,
+    pedantic,
     "transmutes from a pointer to a pointer / a reference to a reference"
 }