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

20 lines
276 B
Rust
Raw Normal View History

#[forbid(implicit_copies)];
import dvec::dvec;
type parser = {
tokens: dvec<int>,
};
trait parse {
fn parse() -> ~[mut int];
}
2012-08-07 18:10:06 -07:00
impl parser: parse {
2012-07-14 12:19:36 -07:00
fn parse() -> ~[mut int] {
dvec::unwrap(self.tokens) //~ ERROR implicitly copying
}
}
fn main() {}