about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-07-25 04:00:19 +0000
committerbors <bors@rust-lang.org>2017-07-25 04:00:19 +0000
commit917260ebc28acbe162bc2d91c0b3c28b9b2ebfc3 (patch)
tree4673ad746cd66aae3877d163234c5f75bdd8ff77 /src/libcore
parent7c46c6c59dbee8d6385f8924fe27cc5a7893841f (diff)
parent697491c14dc841d6f34809ad6522f0ccff4905f4 (diff)
downloadrust-917260ebc28acbe162bc2d91c0b3c28b9b2ebfc3.tar.gz
rust-917260ebc28acbe162bc2d91c0b3c28b9b2ebfc3.zip
Auto merge of #43325 - ollie27:overflowing_literals, r=arielb1
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')
-rw-r--r--src/libcore/num/f32.rs3
-rw-r--r--src/libcore/num/f64.rs3
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;