diff --git a/tests/ui/absurd-extreme-comparisons.rs b/tests/ui/absurd-extreme-comparisons.rs index ae0727fe2ba3..d205b383d1ff 100644 --- a/tests/ui/absurd-extreme-comparisons.rs +++ b/tests/ui/absurd-extreme-comparisons.rs @@ -16,17 +16,17 @@ fn main() { u < Z; Z >= u; Z > u; - u > std::u32::MAX; - u >= std::u32::MAX; - std::u32::MAX < u; - std::u32::MAX <= u; + u > u32::MAX; + u >= u32::MAX; + u32::MAX < u; + u32::MAX <= u; 1-1 > u; u >= !0; u <= 12 - 2*6; let i: i8 = 0; i < -127 - 1; - std::i8::MAX >= i; - 3-7 < std::i32::MIN; + i8::MAX >= i; + 3-7 < i32::MIN; let b = false; b >= true; false > b; @@ -52,10 +52,10 @@ impl PartialOrd for U { } pub fn foo(val: U) -> bool { - val > std::u32::MAX + val > u32::MAX } pub fn bar(len: u64) -> bool { // This is OK as we are casting from target sized to fixed size - len >= std::usize::MAX as u64 + len >= usize::MAX as u64 } diff --git a/tests/ui/absurd-extreme-comparisons.stderr b/tests/ui/absurd-extreme-comparisons.stderr index 4ef364148cda..6de554378aaa 100644 --- a/tests/ui/absurd-extreme-comparisons.stderr +++ b/tests/ui/absurd-extreme-comparisons.stderr @@ -42,34 +42,34 @@ LL | Z > u; error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:19:5 | -LL | u > std::u32::MAX; - | ^^^^^^^^^^^^^^^^^ +LL | u > u32::MAX; + | ^^^^^^^^^^^^ | - = help: because `std::u32::MAX` is the maximum value for this type, this comparison is always false + = help: because `u32::MAX` is the maximum value for this type, this comparison is always false error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:20:5 | -LL | u >= std::u32::MAX; - | ^^^^^^^^^^^^^^^^^^ +LL | u >= u32::MAX; + | ^^^^^^^^^^^^^ | - = help: because `std::u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u == std::u32::MAX` instead + = help: because `u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u == u32::MAX` instead error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:21:5 | -LL | std::u32::MAX < u; - | ^^^^^^^^^^^^^^^^^ +LL | u32::MAX < u; + | ^^^^^^^^^^^^ | - = help: because `std::u32::MAX` is the maximum value for this type, this comparison is always false + = help: because `u32::MAX` is the maximum value for this type, this comparison is always false error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:22:5 | -LL | std::u32::MAX <= u; - | ^^^^^^^^^^^^^^^^^^ +LL | u32::MAX <= u; + | ^^^^^^^^^^^^^ | - = help: because `std::u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `std::u32::MAX == u` instead + = help: because `u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u32::MAX == u` instead error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:23:5 @@ -106,18 +106,18 @@ LL | i < -127 - 1; error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:28:5 | -LL | std::i8::MAX >= i; - | ^^^^^^^^^^^^^^^^^ +LL | i8::MAX >= i; + | ^^^^^^^^^^^^ | - = help: because `std::i8::MAX` is the maximum value for this type, this comparison is always true + = help: because `i8::MAX` is the maximum value for this type, this comparison is always true error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:29:5 | -LL | 3-7 < std::i32::MIN; - | ^^^^^^^^^^^^^^^^^^^ +LL | 3-7 < i32::MIN; + | ^^^^^^^^^^^^^^ | - = help: because `std::i32::MIN` is the minimum value for this type, this comparison is always false + = help: because `i32::MIN` is the minimum value for this type, this comparison is always false error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> $DIR/absurd-extreme-comparisons.rs:31:5 diff --git a/tests/ui/crashes/mut_mut_macro.rs b/tests/ui/crashes/mut_mut_macro.rs index 14219f574c59..d8fbaa541466 100644 --- a/tests/ui/crashes/mut_mut_macro.rs +++ b/tests/ui/crashes/mut_mut_macro.rs @@ -16,7 +16,7 @@ const BAA: *const i32 = 0 as *const i32; static mut BAR: *const i32 = BAA; static mut FOO: *const i32 = 0 as *const i32; -static mut BUH: bool = 42.0 < std::f32::NAN; +static mut BUH: bool = 42.0 < f32::NAN; #[allow(unused_variables, unused_mut)] fn main() { @@ -32,5 +32,5 @@ fn main() { assert_eq!(*MUT_COUNT, 1); */ // FIXME: don't lint in array length, requires `check_body` - //let _ = [""; (42.0 < std::f32::NAN) as usize]; + //let _ = [""; (42.0 < f32::NAN) as usize]; } diff --git a/tests/ui/enum_clike_unportable_variant.rs b/tests/ui/enum_clike_unportable_variant.rs index 7379ad99f4af..7d6842f5b542 100644 --- a/tests/ui/enum_clike_unportable_variant.rs +++ b/tests/ui/enum_clike_unportable_variant.rs @@ -24,8 +24,8 @@ enum NonPortableSigned { Y = 0x7FFF_FFFF, Z = 0xFFFF_FFFF, A = 0x1_0000_0000, - B = std::i32::MIN as isize, - C = (std::i32::MIN as isize) - 1, + B = i32::MIN as isize, + C = (i32::MIN as isize) - 1, } enum NonPortableSignedNoHint { diff --git a/tests/ui/enum_clike_unportable_variant.stderr b/tests/ui/enum_clike_unportable_variant.stderr index bd729683e4ce..71f3f5e083e0 100644 --- a/tests/ui/enum_clike_unportable_variant.stderr +++ b/tests/ui/enum_clike_unportable_variant.stderr @@ -33,8 +33,8 @@ LL | A = 0x1_0000_0000, error: Clike enum variant discriminant is not portable to 32-bit targets --> $DIR/enum_clike_unportable_variant.rs:28:5 | -LL | C = (std::i32::MIN as isize) - 1, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | C = (i32::MIN as isize) - 1, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Clike enum variant discriminant is not portable to 32-bit targets --> $DIR/enum_clike_unportable_variant.rs:34:5 diff --git a/tests/ui/float_cmp.rs b/tests/ui/float_cmp.rs index 207c1bcbbc67..c8248723bc9d 100644 --- a/tests/ui/float_cmp.rs +++ b/tests/ui/float_cmp.rs @@ -45,8 +45,8 @@ impl PartialEq for X { fn main() { ZERO == 0f32; //no error, comparison with zero is ok - 1.0f32 != ::std::f32::INFINITY; // also comparison with infinity - 1.0f32 != ::std::f32::NEG_INFINITY; // and negative infinity + 1.0f32 != f32::INFINITY; // also comparison with infinity + 1.0f32 != f32::NEG_INFINITY; // and negative infinity ZERO == 0.0; //no error, comparison with zero is ok ZERO + ZERO != 1.0; //no error, comparison with zero is ok diff --git a/tests/ui/float_cmp_const.rs b/tests/ui/float_cmp_const.rs index 8f4ad15720b0..a338040e19be 100644 --- a/tests/ui/float_cmp_const.rs +++ b/tests/ui/float_cmp_const.rs @@ -37,8 +37,8 @@ fn main() { // no errors, zero and infinity values ONE != 0f32; TWO == 0f32; - ONE != ::std::f32::INFINITY; - ONE == ::std::f32::NEG_INFINITY; + ONE != f32::INFINITY; + ONE == f32::NEG_INFINITY; // no errors, but will warn clippy::float_cmp if '#![allow(float_cmp)]' above is removed let w = 1.1; diff --git a/tests/ui/if_same_then_else.rs b/tests/ui/if_same_then_else.rs index 67b4c311085e..6bbf79edfcf7 100644 --- a/tests/ui/if_same_then_else.rs +++ b/tests/ui/if_same_then_else.rs @@ -78,7 +78,7 @@ fn if_same_then_else() { let _ = if true { 0.0 } else { -0.0 }; // Different NaNs - let _ = if true { 0.0 / 0.0 } else { std::f32::NAN }; + let _ = if true { 0.0 / 0.0 } else { f32::NAN }; if true { foo(); diff --git a/tests/ui/if_same_then_else2.rs b/tests/ui/if_same_then_else2.rs index 8e61bf3830be..cbec56324dca 100644 --- a/tests/ui/if_same_then_else2.rs +++ b/tests/ui/if_same_then_else2.rs @@ -87,10 +87,10 @@ fn if_same_then_else2() -> Result<&'static str, ()> { // Same NaNs let _ = if true { - std::f32::NAN + f32::NAN } else { //~ ERROR same body as `if` block - std::f32::NAN + f32::NAN }; if true { diff --git a/tests/ui/if_same_then_else2.stderr b/tests/ui/if_same_then_else2.stderr index c6da3c6be645..da2be6c8aa5a 100644 --- a/tests/ui/if_same_then_else2.stderr +++ b/tests/ui/if_same_then_else2.stderr @@ -69,7 +69,7 @@ error: this `if` has identical blocks LL | } else { | ____________^ LL | | //~ ERROR same body as `if` block -LL | | std::f32::NAN +LL | | f32::NAN LL | | }; | |_____^ | @@ -78,7 +78,7 @@ note: same as this | LL | let _ = if true { | _____________________^ -LL | | std::f32::NAN +LL | | f32::NAN LL | | } else { | |_____^