about summary refs log tree commit diff
path: root/tests/ui/unsafe/unsafe-pointer-assignability.rs
diff options
context:
space:
mode:
authorjyn <jyn.nelson@redjack.com>2023-04-02 19:30:32 -0400
committerjyn <jyn.nelson@redjack.com>2023-04-02 19:42:30 -0400
commit01b75e20f2f92e3086bc004cd2f4430bf41ccdc0 (patch)
tree757e8c283825445ecae6a3ccc0c32500bb7aca14 /tests/ui/unsafe/unsafe-pointer-assignability.rs
parenteb3e9c1f45981b47160543cfd882ca00e69bbfab (diff)
downloadrust-01b75e20f2f92e3086bc004cd2f4430bf41ccdc0.tar.gz
rust-01b75e20f2f92e3086bc004cd2f4430bf41ccdc0.zip
Move some UI tests into subdirectories
to avoid going over the existing limit now that the ui-fulldeps tests have
been moved to ui.
Diffstat (limited to 'tests/ui/unsafe/unsafe-pointer-assignability.rs')
-rw-r--r--tests/ui/unsafe/unsafe-pointer-assignability.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/unsafe/unsafe-pointer-assignability.rs b/tests/ui/unsafe/unsafe-pointer-assignability.rs
new file mode 100644
index 00000000000..db822bb6a02
--- /dev/null
+++ b/tests/ui/unsafe/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);
+}