diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-12-27 11:51:18 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-01-03 14:01:56 -0800 |
| commit | f553701da64dd70d1fa6b757208f012dbad118d7 (patch) | |
| tree | d0740b11dff63e3a883bbd4ac7273b74966044d7 /src/libsyntax/parse/mod.rs | |
| parent | 08321f1c49d75e60a2c56320a3f1483e7bf79a91 (diff) | |
| download | rust-f553701da64dd70d1fa6b757208f012dbad118d7.tar.gz rust-f553701da64dd70d1fa6b757208f012dbad118d7.zip | |
libsyntax: De-`@mut` `ParseSess::included_mod_stack`
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 5a8444518aa..b6139f0ae99 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -19,6 +19,7 @@ use parse::attr::parser_attr; use parse::lexer::reader; use parse::parser::Parser; +use std::cell::RefCell; use std::io; use std::io::File; use std::str; @@ -43,7 +44,7 @@ pub struct ParseSess { cm: @codemap::CodeMap, // better be the same as the one in the reader! span_diagnostic: @mut SpanHandler, // better be the same as the one in the reader! /// Used to determine and report recursive mod inclusions - included_mod_stack: ~[Path], + included_mod_stack: RefCell<~[Path]>, } pub fn new_parse_sess(demitter: Option<@Emitter>) -> @mut ParseSess { @@ -51,7 +52,7 @@ pub fn new_parse_sess(demitter: Option<@Emitter>) -> @mut ParseSess { @mut ParseSess { cm: cm, span_diagnostic: mk_span_handler(mk_handler(demitter), cm), - included_mod_stack: ~[], + included_mod_stack: RefCell::new(~[]), } } @@ -61,7 +62,7 @@ pub fn new_parse_sess_special_handler(sh: @mut SpanHandler, @mut ParseSess { cm: cm, span_diagnostic: sh, - included_mod_stack: ~[], + included_mod_stack: RefCell::new(~[]), } } |
