summaryrefslogtreecommitdiffstats
path: root/tests/ui/cast/unsupported-cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cast/unsupported-cast.rs')
-rw-r--r--tests/ui/cast/unsupported-cast.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/cast/unsupported-cast.rs b/tests/ui/cast/unsupported-cast.rs
new file mode 100644
index 000000000..1384ecc6e
--- /dev/null
+++ b/tests/ui/cast/unsupported-cast.rs
@@ -0,0 +1,5 @@
+struct A;
+
+fn main() {
+ println!("{:?}", 1.0 as *const A); //~ERROR casting `f64` as `*const A` is invalid
+}