summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/float-literal-inference-restrictions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/mismatched_types/float-literal-inference-restrictions.rs')
-rw-r--r--src/test/ui/mismatched_types/float-literal-inference-restrictions.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/ui/mismatched_types/float-literal-inference-restrictions.rs b/src/test/ui/mismatched_types/float-literal-inference-restrictions.rs
new file mode 100644
index 000000000..34079b61e
--- /dev/null
+++ b/src/test/ui/mismatched_types/float-literal-inference-restrictions.rs
@@ -0,0 +1,4 @@
+fn main() {
+ let x: f32 = 1; //~ ERROR mismatched types
+ let y: f32 = 1f64; //~ ERROR mismatched types
+}