summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-13359.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-13359.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-13359.rs b/src/test/ui/issues/issue-13359.rs
new file mode 100644
index 000000000..9129790c5
--- /dev/null
+++ b/src/test/ui/issues/issue-13359.rs
@@ -0,0 +1,13 @@
+fn foo(_s: i16) { }
+
+fn bar(_s: u32) { }
+
+fn main() {
+ foo(1*(1 as isize));
+ //~^ ERROR mismatched types
+ //~| expected `i16`, found `isize`
+
+ bar(1*(1 as usize));
+ //~^ ERROR mismatched types
+ //~| expected `u32`, found `usize`
+}