Skip to content

Commit c789caa

Browse files
committed
Auto merge of #5015 - krishna-veerareddy:change-float-to-int-transmute-category, r=flip1995
Move `transmute_float_to_int` lint to `complexity` `transmute_float_to_int` lint was accidentally added to nursery so moving it to the complexity group. changelog: Move `transmute_float_to_int` out of nursery
2 parents e03a32f + b793cf0 commit c789caa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

clippy_lints/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
12961296
LintId::of(&to_digit_is_some::TO_DIGIT_IS_SOME),
12971297
LintId::of(&transmute::CROSSPOINTER_TRANSMUTE),
12981298
LintId::of(&transmute::TRANSMUTE_BYTES_TO_STR),
1299+
LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
12991300
LintId::of(&transmute::TRANSMUTE_INT_TO_BOOL),
13001301
LintId::of(&transmute::TRANSMUTE_INT_TO_CHAR),
13011302
LintId::of(&transmute::TRANSMUTE_INT_TO_FLOAT),
@@ -1494,6 +1495,7 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
14941495
LintId::of(&temporary_assignment::TEMPORARY_ASSIGNMENT),
14951496
LintId::of(&transmute::CROSSPOINTER_TRANSMUTE),
14961497
LintId::of(&transmute::TRANSMUTE_BYTES_TO_STR),
1498+
LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
14971499
LintId::of(&transmute::TRANSMUTE_INT_TO_BOOL),
14981500
LintId::of(&transmute::TRANSMUTE_INT_TO_CHAR),
14991501
LintId::of(&transmute::TRANSMUTE_INT_TO_FLOAT),
@@ -1612,7 +1614,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
16121614
LintId::of(&mutex_atomic::MUTEX_INTEGER),
16131615
LintId::of(&needless_borrow::NEEDLESS_BORROW),
16141616
LintId::of(&path_buf_push_overwrite::PATH_BUF_PUSH_OVERWRITE),
1615-
LintId::of(&transmute::TRANSMUTE_FLOAT_TO_INT),
16161617
LintId::of(&use_self::USE_SELF),
16171618
]);
16181619
}

clippy_lints/src/transmute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ declare_clippy_lint! {
210210
/// let _: u32 = 1f32.to_bits();
211211
/// ```
212212
pub TRANSMUTE_FLOAT_TO_INT,
213-
nursery,
213+
complexity,
214214
"transmutes from a float to an integer"
215215
}
216216

src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ pub const ALL_LINTS: [Lint; 345] = [
19971997
},
19981998
Lint {
19991999
name: "transmute_float_to_int",
2000-
group: "nursery",
2000+
group: "complexity",
20012001
desc: "transmutes from a float to an integer",
20022002
deprecation: None,
20032003
module: "transmute",

0 commit comments

Comments
 (0)