From 697491c14dc841d6f34809ad6522f0ccff4905f4 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Wed, 19 Jul 2017 03:22:45 +0100 Subject: Fix overflowing_literals lint for large f32s Float literals need to be parsed as the correct type so they can be rounded correctly. --- src/libcore/num/f32.rs | 3 +-- src/libcore/num/f64.rs | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libcore') 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; -- cgit 1.4.1-3-g733a5