diff options
Diffstat (limited to 'src/test/ui/unsafe-pointer-assignability.rs')
-rw-r--r-- | src/test/ui/unsafe-pointer-assignability.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/unsafe-pointer-assignability.rs b/src/test/ui/unsafe-pointer-assignability.rs new file mode 100644 index 000000000..db822bb6a --- /dev/null +++ b/src/test/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); +} |