]> git.lizzy.rs Git - rust.git/commitdiff
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)
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.

1  2 
src/librustc_metadata/rmeta/encoder.rs
src/librustc_span/hygiene.rs

Simple merge