rust/tests/ui/nll/promotable-mutable-zst-doesnt-conflict.rs

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

12 lines
215 B
Rust
Raw Normal View History

// Check that mutable promoted length zero arrays don't check for conflicting
// access
//@ check-pass
pub fn main() {
let mut x: Vec<&[i32; 0]> = Vec::new();
for _ in 0..10 {
x.push(&[]);
}
}