rust/tests/ui/borrowck/borrowck-assignment-to-static-mut.rs

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

12 lines
185 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
// Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641)
static mut Y: u32 = 0;
unsafe fn should_ok() {
Y = 1;
}
fn main() {}