@@ -317,7 +317,7 @@ pub fn Parser(sess: @mut ParseSess, cfg: ast::CrateConfig, rdr: @mut reader)
317
317
restriction : UNRESTRICTED ,
318
318
quote_depth : 0 ,
319
319
obsolete_set : HashSet :: new ( ) ,
320
- mod_path_stack : @ mut ~[ ] ,
320
+ mod_path_stack : ~[ ] ,
321
321
open_braces : @mut ~[ ] ,
322
322
non_copyable : util:: NonCopyable
323
323
}
@@ -347,7 +347,7 @@ pub struct Parser {
347
347
/// extra detail when the same error is seen twice
348
348
obsolete_set : HashSet < ObsoleteSyntax > ,
349
349
/// Used to determine the path to externally loaded source files
350
- mod_path_stack : @ mut ~[ @str ] ,
350
+ mod_path_stack : ~[ @str ] ,
351
351
/// Stack of spans of open delimiters. Used for error message.
352
352
open_braces : @mut ~[ Span ] ,
353
353
/* do not copy the parser; its state is tied to outside state */
@@ -4223,8 +4223,7 @@ impl Parser {
4223
4223
-> ( ast:: item_ , ~[ ast:: Attribute ] ) {
4224
4224
let mut prefix = Path :: new ( self . sess . cm . span_to_filename ( self . span ) ) ;
4225
4225
prefix. pop ( ) ;
4226
- let mod_path_stack = & * self . mod_path_stack ;
4227
- let mod_path = Path :: new ( "." ) . join_many ( * mod_path_stack) ;
4226
+ let mod_path = Path :: new ( "." ) . join_many ( self . mod_path_stack ) ;
4228
4227
let dir_path = prefix. join ( & mod_path) ;
4229
4228
let file_path = match :: attr:: first_attr_value_str_by_name (
4230
4229
outer_attrs, "path" ) {
0 commit comments