]> git.lizzy.rs Git - rust.git/commitdiff
Move `transmute_float_to_int` lint to `complexity`
authorKrishna Sai Veera Reddy <veerareddy@email.arizona.edu>
Tue, 7 Jan 2020 23:53:19 +0000 (15:53 -0800)
committerKrishna Sai Veera Reddy <veerareddy@email.arizona.edu>
Tue, 7 Jan 2020 23:53:19 +0000 (15:53 -0800)
`transmute_float_to_int` lint was accidentally added to nursery
so moving it to the complexity group.

clippy_lints/src/lib.rs
clippy_lints/src/transmute.rs
src/lintlist/mod.rs

index 6846730a41561ce5b476c0060b073315108d79c4..0ba1bf6008c93841cd0490ad7a61c895ef37f886 100644 (file)
@@ -1296,6 +1296,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
         LintId::of(&to_digit_is_some::TO_DIGIT_IS_SOME),
         LintId::of(&transmute::CROSSPOINTER_TRANSMUTE),
         LintId::of(&transmute::TRANSMUTE_BYTES_TO_STR),
+        LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
         LintId::of(&transmute::TRANSMUTE_INT_TO_BOOL),
         LintId::of(&transmute::TRANSMUTE_INT_TO_CHAR),
         LintId::of(&transmute::TRANSMUTE_INT_TO_FLOAT),
@@ -1494,6 +1495,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
         LintId::of(&temporary_assignment::TEMPORARY_ASSIGNMENT),
         LintId::of(&transmute::CROSSPOINTER_TRANSMUTE),
         LintId::of(&transmute::TRANSMUTE_BYTES_TO_STR),
+        LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
         LintId::of(&transmute::TRANSMUTE_INT_TO_BOOL),
         LintId::of(&transmute::TRANSMUTE_INT_TO_CHAR),
         LintId::of(&transmute::TRANSMUTE_INT_TO_FLOAT),
@@ -1612,7 +1614,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
         LintId::of(&mutex_atomic::MUTEX_INTEGER),
         LintId::of(&needless_borrow::NEEDLESS_BORROW),
         LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),
-        LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
         LintId::of(&use_self::USE_SELF),
     ]);
 }
index 7e87a285eba975903e313734bbfccda33783ebe3..30ea81125c526d2f684c2c3fb6e3ff0617c8df4a 100644 (file)
     /// let _: u32 = 1f32.to_bits();
     /// ```
     pub TRANSMUTE_FLOAT_TO_INT,
-    nursery,
+    complexity,
     "transmutes from a float to an integer"
 }
 
index 1086f5e48f9ad728db69e0a607cebdf63b7a4987..f237809d920a596b4bee5dc6eb87e015375ff986 100644 (file)
     },
     Lint {
         name: "transmute_float_to_int",
-        group: "nursery",
+        group: "complexity",
         desc: "transmutes from a float to an integer",
         deprecation: None,
         module: "transmute",