summaryrefslogtreecommitdiffstats
path: root/tests/ui/unsafe-pointer-assignability.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unsafe-pointer-assignability.rs')
-rw-r--r--tests/ui/unsafe-pointer-assignability.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/unsafe-pointer-assignability.rs b/tests/ui/unsafe-pointer-assignability.rs
new file mode 100644
index 000000000..db822bb6a
--- /dev/null
+++ b/tests/ui/unsafe-pointer-assignability.rs
@@ -0,0 +1,11 @@
+// run-pass
+
+fn f(x: *const isize) {
+ unsafe {
+ assert_eq!(*x, 3);
+ }
+}
+
+pub fn main() {
+ f(&3);
+}