about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-04 20:16:09 +0000
committerbors <bors@rust-lang.org>2021-04-04 20:16:09 +0000
commitc755ee4ce8cae6ea977d65a0288480940db721d9 (patch)
tree7d40dd25433d17501e1f352a464c8534dcb9a189 /compiler/rustc_llvm/llvm-wrapper
parent8ad6a443cfee83e1f7d29c9ec0de26143c54a617 (diff)
parentb96584485a43c561d90eb262651ecb87d1d98d2a (diff)
downloadrust-c755ee4ce8cae6ea977d65a0288480940db721d9.tar.gz
rust-c755ee4ce8cae6ea977d65a0288480940db721d9.zip
Auto merge of #82907 - petrochenkov:dercache, r=Aaron1011
resolve/expand: Cache intermediate results of `#[derive]` expansion

Expansion function for `#[derive]` (`rustc_builtin_macros::derive::Expander::expand`) may return an indeterminate result, and therefore can be called multiple times.
Previously we parsed the `#[derive(Foo, Bar)]`'s input and tried to resolve `Foo` and `Bar` on every such call.

Now we maintain a cache `Resolver::derive_data` and take all the necessary data from it if it was computed previously.
So `Foo, Bar` is now parsed at most once, and `Foo` and `Bar` are successfully resolved at most once.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions