From d55d791a3a5b1fb67966099ccb4a961d546e4ad6 Mon Sep 17 00:00:00 2001 From: bstrie Date: Sat, 24 Oct 2020 19:21:40 -0400 Subject: [PATCH] Update tests to remove old numeric constants Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed. --- tests/ui/float_cmp_const.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ui/float_cmp_const.rs b/tests/ui/float_cmp_const.rs index dfc025558a2..263d9a7b92d 100644 --- a/tests/ui/float_cmp_const.rs +++ b/tests/ui/float_cmp_const.rs @@ -48,7 +48,7 @@ fn main() { v != 1.0; const ZERO_ARRAY: [f32; 3] = [0.0, 0.0, 0.0]; - const ZERO_INF_ARRAY: [f32; 3] = [0.0, ::std::f32::INFINITY, ::std::f32::NEG_INFINITY]; + const ZERO_INF_ARRAY: [f32; 3] = [0.0, f32::INFINITY, f32::NEG_INFINITY]; const NON_ZERO_ARRAY: [f32; 3] = [0.0, 0.1, 0.2]; const NON_ZERO_ARRAY2: [f32; 3] = [0.2, 0.1, 0.0];