rust/src/test/compile-fail/issue-2590.rs

18 lines
252 B
Rust
Raw Normal View History

2012-09-05 12:32:05 -07:00
use dvec::DVec;
type parser = {
2012-08-14 16:54:13 -07:00
tokens: DVec<int>,
};
trait parse {
fn parse() -> ~[int];
}
2012-08-07 18:10:06 -07:00
impl parser: parse {
fn parse() -> ~[int] {
dvec::unwrap(move self.tokens) //~ ERROR moving out of immutable field
}
}
fn main() {}