fixup mutability of vec::each, make iter_bytes pure

also, change DVec() to work with imm vectors rather than mut ones
This commit is contained in:
Niko Matsakis
2012-09-12 10:38:17 -07:00
parent 8fbe4b5841
commit 5d540de769
34 changed files with 357 additions and 186 deletions

View File

@@ -35,7 +35,7 @@ impl ObsoleteSyntax : cmp::Eq {
impl ObsoleteSyntax: to_bytes::IterBytes {
#[inline(always)]
fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
pure fn iter_bytes(lsb0: bool, f: to_bytes::Cb) {
(self as uint).iter_bytes(lsb0, f);
}
}

View File

@@ -3556,8 +3556,8 @@ impl parser {
}
{attrs_remaining: attrs,
view_items: vec::from_mut(dvec::unwrap(move view_items)),
items: vec::from_mut(dvec::unwrap(move items))}
view_items: dvec::unwrap(move view_items),
items: dvec::unwrap(move items)}
}
// Parses a source module as a crate