From a2f4877862b35b2dc4b089339b8147d255a8b516 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 30 Dec 2013 15:38:02 -0800 Subject: [PATCH] libsyntax: De-`@mut` `Parser::mod_path_stack` --- src/libsyntax/parse/parser.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 96f3b4b58467..e055c584b91c 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, /// 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") {