Skip to content

Commit d55d791

Browse files
author
bstrie
committed
Update tests to remove old numeric constants
Part of rust-lang#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.
1 parent 5d585ec commit d55d791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ui/float_cmp_const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn main() {
4848
v != 1.0;
4949

5050
const ZERO_ARRAY: [f32; 3] = [0.0, 0.0, 0.0];
51-
const ZERO_INF_ARRAY: [f32; 3] = [0.0, ::std::f32::INFINITY, ::std::f32::NEG_INFINITY];
51+
const ZERO_INF_ARRAY: [f32; 3] = [0.0, f32::INFINITY, f32::NEG_INFINITY];
5252
const NON_ZERO_ARRAY: [f32; 3] = [0.0, 0.1, 0.2];
5353
const NON_ZERO_ARRAY2: [f32; 3] = [0.2, 0.1, 0.0];
5454

0 commit comments

Comments
 (0)