about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-09-12 10:38:17 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-09-12 13:29:31 -0700
commit5d540de76993eb6dac9893138e45d0324c23e631 (patch)
tree067007dea6fa0428c80b913a10730ab3323a40f0 /src/libsyntax/parse
parent8fbe4b58412b2818d4ef3d92259bdf5f88f61606 (diff)
downloadrust-5d540de76993eb6dac9893138e45d0324c23e631.tar.gz
rust-5d540de76993eb6dac9893138e45d0324c23e631.zip
fixup mutability of vec::each, make iter_bytes pure
also, change DVec() to work with imm vectors rather than mut ones
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/obsolete.rs2
-rw-r--r--src/libsyntax/parse/parser.rs4
2 files changed, 3 insertions, 3 deletions
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