Skip to content

Commit ca109af

Browse files
amanjeevoli-obk
authored andcommitted
Add regression test
1 parent bd6b336 commit ca109af

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// check-pass
2+
3+
use std::cell::Cell;
4+
use std::ptr::NonNull;
5+
6+
struct ChunkFooter {
7+
prev: Cell<NonNull<ChunkFooter>>,
8+
}
9+
10+
struct EmptyChunkFooter(ChunkFooter);
11+
12+
unsafe impl Sync for EmptyChunkFooter {}
13+
14+
static EMPTY_CHUNK: EmptyChunkFooter = EmptyChunkFooter(ChunkFooter {
15+
prev: Cell::new(unsafe {
16+
NonNull::new_unchecked(&EMPTY_CHUNK as *const EmptyChunkFooter as *mut ChunkFooter)
17+
}),
18+
});
19+
20+
fn main() {}

0 commit comments

Comments
 (0)