rust/tests/ui/extern/issue-36122-accessing-externed-dst.rs

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

8 lines
179 B
Rust
Raw Normal View History

2019-11-14 07:50:32 +00:00
fn main() {
2020-09-01 21:12:52 +00:00
extern "C" {
2019-11-14 07:50:32 +00:00
static symbol: [usize]; //~ ERROR: the size for values of type
}
println!("{}", symbol[0]);
//~^ ERROR: extern static is unsafe
2019-11-14 07:50:32 +00:00
}