summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorInokentiy Babushkin <twk@twki.de>2017-06-10 21:08:32 +0200
committerInokentiy Babushkin <twk@twki.de>2017-06-10 21:08:32 +0200
commitc2c31b2db33e0d0b5356a0c9e032269034cdc70a (patch)
tree4a2ddeafa8e6ff5a359c2bd954831adfbb60663f /src/librustc_errors
parentdd8f7cd126403955295c8b0cdbccc5ca5cbef763 (diff)
downloadrust-c2c31b2db33e0d0b5356a0c9e032269034cdc70a.tar.gz
rust-c2c31b2db33e0d0b5356a0c9e032269034cdc70a.zip
Added external crates' sources to FileMap.
They are now handled in their own member to prevent mutating access to
the `src` member. This way, we can safely load external sources, while
keeping the mutation of local source strings off-limits.
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 8d5e9e776ed..545a485732e 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -103,6 +103,7 @@ pub trait CodeMapper {
     fn span_to_filename(&self, sp: Span) -> FileName;
     fn merge_spans(&self, sp_lhs: Span, sp_rhs: Span) -> Option<Span>;
     fn call_span_if_macro(&self, sp: Span) -> Span;
+    fn load_source_for_filemap(&mut self, file: FileName) -> bool;
 }
 
 impl CodeSuggestion {