about summary refs log tree commit diff
path: root/library/std/src/sys/unix/process/process_fuchsia.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-26 20:57:31 +0000
committerbors <bors@rust-lang.org>2020-09-26 20:57:31 +0000
commit623fb90b5a1f324e0ec44085116bf858cef19a00 (patch)
tree0c05ab1775fed4ee4dc141fd443a6d0d1c952bed /library/std/src/sys/unix/process/process_fuchsia.rs
parente37c99fa1ca2341d652a1b1859ea9aa2ae993e1e (diff)
parentb9653568a78ff3936ce78a1c65b6c83ff53702a4 (diff)
downloadrust-623fb90b5a1f324e0ec44085116bf858cef19a00.tar.gz
rust-623fb90b5a1f324e0ec44085116bf858cef19a00.zip
Auto merge of #76897 - Aaron1011:feature/min-proc-macro-metadata, r=petrochenkov
Encode less metadata for proc-macro crates

Currently, we serialize the same crate metadata for proc-macro crates as
we do for normal crates. This is quite wasteful - almost none of this
metadata is ever used, and much of it can't even be deserialized (if it
contains a foreign `CrateNum`).

This PR changes metadata encoding to skip encoding the majority of crate
metadata for proc-macro crates. Most of the `Lazy<[T]>` fields are left
completetly empty, while the non-lazy fields are left as-is.

Additionally, proc-macros now have a def span that does not include
their body. This was done for normal functions in #75465, but was missed
for proc-macros.

As a result of this PR, we should only ever encode local `CrateNum`s
when encoding proc-macro crates. I've added a specialized serialization
impl for `CrateNum` to assert this.
Diffstat (limited to 'library/std/src/sys/unix/process/process_fuchsia.rs')
0 files changed, 0 insertions, 0 deletions