Skip to content

Commit 39092cc

Browse files
authored
Update dangling_pointer_to_raw_pointer.rs
1 parent 3a34dac commit 39092cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn direct_raw(x: *const (i32, i32)) -> *const i32 {
66

77
// Ensure that if a raw pointer is created via an intermediate
88
// reference, we catch that. (Just in case someone decides to
9-
// desugar this differenly or so.)
9+
// desugar this differently or so.)
1010
fn via_ref(x: *const (i32, i32)) -> *const i32 {
1111
unsafe { &(*x).0 as *const i32 } //~ERROR: dangling pointer
1212
}

0 commit comments

Comments
 (0)