summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/recover-invalid-float.fixed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/suggestions/recover-invalid-float.fixed10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/recover-invalid-float.fixed b/src/test/ui/suggestions/recover-invalid-float.fixed
new file mode 100644
index 000000000..62389ba61
--- /dev/null
+++ b/src/test/ui/suggestions/recover-invalid-float.fixed
@@ -0,0 +1,10 @@
+// run-rustfix
+
+fn main() {
+ let _: f32 = 0.3;
+ //~^ ERROR float literals must have an integer part
+ let _: f32 = 0.42f32;
+ //~^ ERROR float literals must have an integer part
+ let _: f64 = 0.5f64;
+ //~^ ERROR float literals must have an integer part
+}