diff options
| author | Inokentiy Babushkin <twk@twki.de> | 2017-06-10 21:08:32 +0200 |
|---|---|---|
| committer | Inokentiy Babushkin <twk@twki.de> | 2017-06-10 21:08:32 +0200 |
| commit | c2c31b2db33e0d0b5356a0c9e032269034cdc70a (patch) | |
| tree | 4a2ddeafa8e6ff5a359c2bd954831adfbb60663f /src/librustc_errors | |
| parent | dd8f7cd126403955295c8b0cdbccc5ca5cbef763 (diff) | |
| download | rust-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.rs | 1 |
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 { |
