Skip to content

Commit

Permalink
Update tests to remove old numeric constants
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bstrie committed Nov 29, 2020
1 parent 5d585ec commit d55d791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ui/float_cmp_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit d55d791

Please sign in to comment.