From 4c85cf7a40b4a63e7629d39d2a2ad0f348c1459c Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 30 Dec 2013 16:30:33 -0800 Subject: libsyntax: De-`@mut` `CodeMap::files` --- src/libsyntax/parse/lexer.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index 5882749cdf1..3b81b09112b 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -361,7 +361,10 @@ fn consume_any_line_comment(rdr: @StringReader) // I guess this is the only way to figure out if // we're at the beginning of the file... let cmap = @CodeMap::new(); - (*cmap).files.push(rdr.filemap); + { + let mut files = cmap.files.borrow_mut(); + files.get().push(rdr.filemap); + } let loc = cmap.lookup_char_pos_adj(rdr.last_pos.get()); if loc.line == 1u && loc.col == CharPos(0u) { while rdr.curr.get() != '\n' && !is_eof(rdr) { bump(rdr); } -- cgit 1.4.1-3-g733a5