summaryrefslogtreecommitdiffstats
path: root/tests/ui/cast/cast-int-to-char.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cast/cast-int-to-char.rs')
-rw-r--r--tests/ui/cast/cast-int-to-char.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/cast/cast-int-to-char.rs b/tests/ui/cast/cast-int-to-char.rs
new file mode 100644
index 000000000..379956968
--- /dev/null
+++ b/tests/ui/cast/cast-int-to-char.rs
@@ -0,0 +1,9 @@
+fn foo<T>(_t: T) {}
+
+fn main() {
+ foo::<u32>('0'); //~ ERROR
+ foo::<i32>('0'); //~ ERROR
+ foo::<u64>('0'); //~ ERROR
+ foo::<i64>('0'); //~ ERROR
+ foo::<char>(0u32); //~ ERROR
+}