about summary refs log tree commit diff
path: root/tests/ui/integral-variable-unification-error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/integral-variable-unification-error.rs')
-rw-r--r--tests/ui/integral-variable-unification-error.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/integral-variable-unification-error.rs b/tests/ui/integral-variable-unification-error.rs
new file mode 100644
index 00000000000..8d1621321e8
--- /dev/null
+++ b/tests/ui/integral-variable-unification-error.rs
@@ -0,0 +1,8 @@
+fn main() {
+    let mut x //~ NOTE expected due to the type of this binding
+        =
+        2; //~ NOTE expected due to this value
+    x = 5.0;
+    //~^ ERROR mismatched types
+    //~| NOTE expected integer, found floating-point number
+}