From 5d540de76993eb6dac9893138e45d0324c23e631 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 12 Sep 2012 10:38:17 -0700 Subject: fixup mutability of vec::each, make iter_bytes pure also, change DVec() to work with imm vectors rather than mut ones --- src/libsyntax/parse/obsolete.rs | 2 +- src/libsyntax/parse/parser.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index 724c824d5cd..5b0fd67ae50 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -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); } } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index b8d55fb1055..1089431d810 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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 -- cgit 1.4.1-3-g733a5