about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-01 03:52:14 +0000
committerbors <bors@rust-lang.org>2017-08-01 03:52:14 +0000
commitdf90a546624c965fb2f859ed665049dbf824f40a (patch)
treead03779a87d7a44db1dadb6bcba7b4fdf700b015 /src/rustllvm/RustWrapper.cpp
parentebf74d99b0bc25b5a4e35b0a2865580224ed0ef8 (diff)
parent27b9182d5bc07d87a34c3a1ffda99d54ca2fec69 (diff)
downloadrust-df90a546624c965fb2f859ed665049dbf824f40a.tar.gz
rust-df90a546624c965fb2f859ed665049dbf824f40a.zip
Auto merge of #43533 - nrc:macro-save, r=jseyfried,
Three small fixes for save-analysis

First commit does some naive deduplication of macro uses. We end up with lots of duplication here because of the weird way we get this data (we extract a use for every span generated by a macro use).

Second commit is basically a typo fix.

Third commit is a bit interesting, it partially reverts a change from #40939 where temporary variables in format! (and thus println!) got a span with the primary pointing at the value stored into the temporary (e.g., `x` in `println!("...", x)`). If `format!` had a definition it should point at the temporary in the macro def, but since it is built-in, that is not possible (for now), so `DUMMY_SP` is the best we can do (using the span in the callee really breaks save-analysis because it thinks `x` is a definition as well as a reference).

There aren't a test for this stuff because: the deduplication is filtered by any of the users of save-analysis, so it is purely an efficiency change. I couldn't actually find an example for the second commit that we have any machinery to test, and the third commit is tested by the RLS, so there will be a test once I update the RLS version and and uncomment the previously failing tests).

r? @jseyfried
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions