diff --git a/tests/ui/excessive_precision.fixed b/tests/ui/excessive_precision.fixed index 65096d6b219e..b74bda182be9 100644 --- a/tests/ui/excessive_precision.fixed +++ b/tests/ui/excessive_precision.fixed @@ -63,4 +63,7 @@ fn main() { // issue #7744 let _ = 2.225_073_858_507_201e-308_f64; + + // issue #7745 + let _ = 0_f64; } diff --git a/tests/ui/excessive_precision.rs b/tests/ui/excessive_precision.rs index 4db6e4d48317..6e84a71f24cb 100644 --- a/tests/ui/excessive_precision.rs +++ b/tests/ui/excessive_precision.rs @@ -63,4 +63,7 @@ fn main() { // issue #7744 let _ = 2.225_073_858_507_201_1e-308_f64; + + // issue #7745 + let _ = 1.000_000_000_000_001e-324_f64; } diff --git a/tests/ui/excessive_precision.stderr b/tests/ui/excessive_precision.stderr index c9418f73d987..42d9d4de193c 100644 --- a/tests/ui/excessive_precision.stderr +++ b/tests/ui/excessive_precision.stderr @@ -84,5 +84,11 @@ error: float has excessive precision LL | let _ = 2.225_073_858_507_201_1e-308_f64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.225_073_858_507_201e-308_f64` -error: aborting due to 14 previous errors +error: float has excessive precision + --> $DIR/excessive_precision.rs:68:13 + | +LL | let _ = 1.000_000_000_000_001e-324_f64; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0_f64` + +error: aborting due to 15 previous errors