diff options
| author | bors <bors@rust-lang.org> | 2021-04-04 20:16:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-04 20:16:09 +0000 |
| commit | c755ee4ce8cae6ea977d65a0288480940db721d9 (patch) | |
| tree | 7d40dd25433d17501e1f352a464c8534dcb9a189 /library/std/src | |
| parent | 8ad6a443cfee83e1f7d29c9ec0de26143c54a617 (diff) | |
| parent | b96584485a43c561d90eb262651ecb87d1d98d2a (diff) | |
| download | rust-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 'library/std/src')
0 files changed, 0 insertions, 0 deletions
