diff options
| author | bors <bors@rust-lang.org> | 2014-03-10 12:27:05 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-10 12:27:05 -0700 |
| commit | d75a6ab56a0783eb668e4f67b28370e31d4f64b4 (patch) | |
| tree | bbc49082113a10574ed8dabe6a3f726bf25145a7 /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | 62f1d68439dcfd509eaca29887afa97f22938373 (diff) | |
| parent | 43a8f7b3e90784ae9e4237a07913f2c5d2bd1631 (diff) | |
| download | rust-d75a6ab56a0783eb668e4f67b28370e31d4f64b4.tar.gz rust-d75a6ab56a0783eb668e4f67b28370e31d4f64b4.zip | |
auto merge of #12670 : dmski/rust/master, r=nick29581
CodeMap.span_to_* perform a lookup of a BytePos(sp.hi), which lands into the next filemap if the last byte of range denoted by Span is also the last byte of the filemap, which results in ICEs or incorrect error reports.
Example:
````
pub fn main() {
let mut num = 3;
let refe = &mut num;
*refe = 5;
println!("{}", num);
}````
(note the empty line in the beginning and the absence of newline at the end)
The above would have caused ICE when trying to report where "refe" borrow ends.
The above without an empty line in the beginning would have reported borrow end to be the first line.
Most probably, this is also responsible for (at least some occurrences of) issue #8256.
The issue is fixed by always adding a newline at the end of non-empty filemaps in case there isn't a new line there already.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
