rust/tests/ui/consts/issue-21562.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
301 B
Rust
Raw Normal View History

// build-pass
#![allow(dead_code)]
#![allow(non_upper_case_globals)]
extern crate core;
use core::marker::Sync;
static SARRAY: [i32; 1] = [11];
struct MyStruct {
pub arr: *const [i32],
}
unsafe impl Sync for MyStruct {}
static mystruct: MyStruct = MyStruct {
arr: &SARRAY
};
fn main() {}