summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0512.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0512.rs')
-rw-r--r--tests/ui/error-codes/E0512.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0512.rs b/tests/ui/error-codes/E0512.rs
new file mode 100644
index 000000000..e70992aee
--- /dev/null
+++ b/tests/ui/error-codes/E0512.rs
@@ -0,0 +1,5 @@
+fn takes_u8(_: u8) {}
+
+fn main() {
+ unsafe { takes_u8(::std::mem::transmute(0u16)); } //~ ERROR E0512
+}