df90a54662
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 |
||
---|---|---|
.. | ||
deriving | ||
asm.rs | ||
Cargo.toml | ||
cfg.rs | ||
compile_error.rs | ||
concat_idents.rs | ||
concat.rs | ||
env.rs | ||
format_foreign.rs | ||
format.rs | ||
global_asm.rs | ||
lib.rs | ||
log_syntax.rs | ||
proc_macro_impl.rs | ||
proc_macro_registrar.rs | ||
trace_macros.rs |