From 496cc4c0d4a06047c4f78965c8bc6e2c812c7812 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 23 Sep 2014 16:07:21 -0700 Subject: librustc: Fix up mutability in method autoderefs if incorrect, and prefer `Deref` over `DerefMut` in all other circumstances. Closes #12825. --- src/libsyntax/codemap.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index e9b2556c53e..cd215c1d68c 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -290,6 +290,9 @@ impl FileMap { } /// get a line from the list of pre-computed line-beginnings + /// + /// NOTE(stage0, pcwalton): Remove `#[allow(unused_mut)]` after snapshot. + #[allow(unused_mut)] pub fn get_line(&self, line: int) -> String { let mut lines = self.lines.borrow_mut(); let begin: BytePos = *lines.get(line as uint) - self.start_pos; @@ -512,6 +515,8 @@ impl CodeMap { return a; } + // NOTE(stage0, pcwalton): Remove `#[allow(unused_mut)]` after snapshot. + #[allow(unused_mut)] fn lookup_line(&self, pos: BytePos) -> FileMapAndLine { let idx = self.lookup_filemap_idx(pos); -- cgit 1.4.1-3-g733a5