about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-30 15:38:02 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-01-02 14:16:08 -0800
commita2f4877862b35b2dc4b089339b8147d255a8b516 (patch)
treea7b347f4be48158a7bf49bfcdbe1fa7f346a8ede /src/libsyntax/parse
parente0a5460e946b496ab9b47072e45fa0eb96e7db5e (diff)
downloadrust-a2f4877862b35b2dc4b089339b8147d255a8b516.tar.gz
rust-a2f4877862b35b2dc4b089339b8147d255a8b516.zip
libsyntax: De-`@mut` `Parser::mod_path_stack`
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 96f3b4b5846..e055c584b91 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -317,7 +317,7 @@ pub fn Parser(sess: @mut ParseSess, cfg: ast::CrateConfig, rdr: @mut reader)
         restriction: UNRESTRICTED,
         quote_depth: 0,
         obsolete_set: HashSet::new(),
-        mod_path_stack: @mut ~[],
+        mod_path_stack: ~[],
         open_braces: @mut ~[],
         non_copyable: util::NonCopyable
     }
@@ -347,7 +347,7 @@ pub struct Parser {
     /// extra detail when the same error is seen twice
     obsolete_set: HashSet<ObsoleteSyntax>,
     /// Used to determine the path to externally loaded source files
-    mod_path_stack: @mut ~[@str],
+    mod_path_stack: ~[@str],
     /// Stack of spans of open delimiters. Used for error message.
     open_braces: @mut ~[Span],
     /* do not copy the parser; its state is tied to outside state */
@@ -4223,8 +4223,7 @@ impl Parser {
                     -> (ast::item_, ~[ast::Attribute]) {
         let mut prefix = Path::new(self.sess.cm.span_to_filename(self.span));
         prefix.pop();
-        let mod_path_stack = &*self.mod_path_stack;
-        let mod_path = Path::new(".").join_many(*mod_path_stack);
+        let mod_path = Path::new(".").join_many(self.mod_path_stack);
         let dir_path = prefix.join(&mod_path);
         let file_path = match ::attr::first_attr_value_str_by_name(
                 outer_attrs, "path") {