Skip to content

Commit fc604b1

Browse files
committed
Add regression test for #21562
Closes #21562.
1 parent 5b8a486 commit fc604b1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/run-pass/issue-21562.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#![feature(core)]
2+
3+
extern crate core;
4+
use core::marker::Sync;
5+
6+
static SARRAY: [i32; 1] = [11];
7+
8+
struct MyStruct {
9+
pub arr: *const [i32],
10+
}
11+
unsafe impl Sync for MyStruct {}
12+
13+
static mystruct: MyStruct = MyStruct {
14+
arr: &SARRAY
15+
};
16+
17+
fn main() {}

0 commit comments

Comments
 (0)