diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-32805.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-32805.rs b/src/test/ui/issues/issue-32805.rs new file mode 100644 index 000000000..23c194739 --- /dev/null +++ b/src/test/ui/issues/issue-32805.rs @@ -0,0 +1,10 @@ +// run-pass +fn const_mir() -> f32 { 9007199791611905.0 } + +fn main() { + let original = "9007199791611905.0"; // (1<<53)+(1<<29)+1 + let expected = "9007200000000000"; + + assert_eq!(const_mir().to_string(), expected); + assert_eq!(original.parse::<f32>().unwrap().to_string(), expected); +} |