]> git.lizzy.rs Git - rust.git/commit
Auto merge of #75137 - Aaron1011:fix/hygiene-skip-expndata, r=petrochenkov
authorbors <bors@rust-lang.org>
Sun, 9 Aug 2020 18:19:34 +0000 (18:19 +0000)
committerbors <bors@rust-lang.org>
Sun, 9 Aug 2020 18:19:34 +0000 (18:19 +0000)
commit39e593ab14c53fda63c3f2756716c5ad3cbb6465
treeeb47a430c721ac4c8c0702b2295fe821289c60b3
parent543f03d24118d3af784aa98c507c00e30c796a0e
parentef49032297b90e7010b08db04d569dd8a5f0a8f2
Auto merge of #75137 - Aaron1011:fix/hygiene-skip-expndata, r=petrochenkov

Don't serialize ExpnData for foreign crates

When we encode an ExpnId into the crate metadata, we write out the
CrateNum of the crate that 'owns' the corresponding `ExpnData`, which
is later used to decode the `ExpnData` from its owning crate.

However, we current serialize the `ExpnData` for all `ExpnIds` that we
serialize, even if the `ExpnData` was already serialized into a foreign
crate. This commit skips encoding this kind of `ExpnData`, which should
hopefully speed up metadata encoding and reduce the total metadata size.
src/librustc_metadata/rmeta/encoder.rs
src/librustc_span/hygiene.rs