Skip to content

Commit

Permalink
Add an explicit test for let _ = *ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Oct 28, 2023
1 parent 2588ce1 commit 069805c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ui/mir/alignment/place_without_read.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// run-pass
// compile-flags: -C debug-assertions

fn main() {
let ptr = 1 as *const u16;
unsafe {
let _ = *ptr;
}
}

0 comments on commit 069805c

Please sign in to comment.