mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
19 lines
195 B
Rust
19 lines
195 B
Rust
//@ 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();
|
|
}
|