]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #19357 : michaelwoerister/rust/fix-issue-18791, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 2 Dec 2014 10:06:58 +0000 (10:06 +0000)
committerbors <bors@rust-lang.org>
Tue, 2 Dec 2014 10:06:58 +0000 (10:06 +0000)
One negative side-effect of this change is that there might be quite a bit of copying strings out of the codemap, i.e. one copy for every block that gets translated, just for taking a look at the last character of the block. If this turns out to cause a performance problem then `CodeMap::span_to_snippet()` could be changed return `Option<&str>` instead of `Option<String>`.

Fixes #18791

1  2 
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/controlflow.rs
src/librustc_trans/trans/expr.rs

Simple merge
Simple merge