mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
Add a test written by jdm that tests repeated vector self appending.
This commit is contained in:
parent
8ad7f3b56b
commit
ec80918865
12
src/test/run-pass/vec-self-append.rs
Normal file
12
src/test/run-pass/vec-self-append.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// xfail-stage0
|
||||
|
||||
fn main()
|
||||
{
|
||||
// Make sure we properly handle repeated self-appends.
|
||||
let vec[int] a = [0];
|
||||
auto i = 20;
|
||||
while (i > 0) {
|
||||
a += a;
|
||||
i -= 1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user