mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-02 19:06:05 +00:00
11 lines
203 B
Rust
11 lines
203 B
Rust
fn test(-foo: @[int]) { assert (foo[0] == 10); }
|
|
|
|
fn main() {
|
|
let x = @[10];
|
|
// Test forgetting a local by move-in
|
|
test(x);
|
|
|
|
// Test forgetting a temporary by move-in.
|
|
test(@[10]);
|
|
}
|