diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2017-07-19 03:22:45 +0100 |
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2017-07-19 03:22:45 +0100 |
| commit | 697491c14dc841d6f34809ad6522f0ccff4905f4 (patch) | |
| tree | 55b5b09d9b459719171ca60765db6963d3aa1c53 /src/libcore/num | |
| parent | 83c659ef655b1f740777f83eb415fd7ebe5a3fe5 (diff) | |
| download | rust-697491c14dc841d6f34809ad6522f0ccff4905f4.tar.gz rust-697491c14dc841d6f34809ad6522f0ccff4905f4.zip | |
Fix overflowing_literals lint for large f32s
Float literals need to be parsed as the correct type so they can be rounded correctly.
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/f32.rs | 3 | ||||
| -rw-r--r-- | src/libcore/num/f64.rs | 3 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index ebc30dc8b61..50683753684 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -10,8 +10,7 @@ //! Operations and constants for 32-bits floats (`f32` type) -// FIXME: MIN_VALUE and MAX_VALUE literals are parsed as -inf and inf #14353 -#![allow(overflowing_literals)] +#![cfg_attr(stage0, allow(overflowing_literals))] #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 1a1fe4d86e0..4ff80a2f05d 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -10,9 +10,6 @@ //! Operations and constants for 64-bits floats (`f64` type) -// FIXME: MIN_VALUE and MAX_VALUE literals are parsed as -inf and inf #14353 -#![allow(overflowing_literals)] - #![stable(feature = "rust1", since = "1.0.0")] use intrinsics; |
