rust/src/test/run-pass/iter-to-vec.rs
Niko Matsakis 2db4259b35 Stop inferring bot/static when types/regions are unconstrained.
Also, some other changes that came up along the way:
- add a 'blk' region for the current block.
- detect unused type/region variables.
2012-04-30 19:53:02 -07:00

8 lines
224 B
Rust

fn main() {
assert [1u, 3u].to_vec() == [1u, 3u];
let e: [uint] = [];
assert e.to_vec() == [];
assert none::<uint>.to_vec() == [];
assert some(1u).to_vec() == [1u];
assert some(2u).to_vec() == [2u];
}