summaryrefslogtreecommitdiffstats
path: root/tests/ui/uninhabited/uninhabited-enum-cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/uninhabited/uninhabited-enum-cast.rs')
-rw-r--r--tests/ui/uninhabited/uninhabited-enum-cast.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/uninhabited/uninhabited-enum-cast.rs b/tests/ui/uninhabited/uninhabited-enum-cast.rs
new file mode 100644
index 000000000..5a75c94c4
--- /dev/null
+++ b/tests/ui/uninhabited/uninhabited-enum-cast.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+enum E {}
+
+fn f(e: E) {
+ println!("{}", (e as isize).to_string());
+}
+
+fn main() {}