rust/tests/ui/nll/borrow-use-issue-46875.rs

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

19 lines
194 B
Rust
Raw Normal View History

// run-pass
fn vec() {
let mut _x = vec!['c'];
let _y = &_x;
_x = Vec::new();
}
fn int() {
let mut _x = 5;
let _y = &_x;
_x = 7;
}
fn main() {
vec();
int();
}