diff options
Diffstat (limited to 'tests/ui/unsafe-pointer-assignability.rs')
-rw-r--r-- | tests/ui/unsafe-pointer-assignability.rs | 11 |
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); +} |