-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-metadataArea: Crate metadataArea: Crate metadataC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.
Description
Look at this place: this Stability
value looks like const, but still inserted multiple times into *.rmeta file.
rust/compiler/rustc_passes/src/stability.rs
Lines 716 to 728 in 9ccf661
if tcx.sess.opts.debugging_opts.force_unstable_if_unmarked { | |
let reason = "this crate is being loaded from the sysroot, an \ | |
unstable location; did you mean to load this crate \ | |
from crates.io via `Cargo.toml` instead?"; | |
let stability = tcx.intern_stability(Stability { | |
level: attr::StabilityLevel::Unstable { | |
reason: Some(Symbol::intern(reason)), | |
issue: NonZeroU32::new(27812), | |
is_soft: false, | |
}, | |
feature: sym::rustc_private, | |
}); | |
annotator.parent_stab = Some(stability); |
For example, text from reason
(and other fields from Stability
):
found 172 times in libaddr2line.rmeta
found 911 times in libhashbrown.rmeta
found 9590 times in libobject.rmeta
rustc 1.56.0-nightly (5a19ffe1c 2021-08-13)
binary: rustc
commit-hash: 5a19ffe1c2b99d9e09706cc286aad1ec0868eddb
commit-date: 2021-08-13
host: x86_64-pc-windows-msvc
release: 1.56.0-nightly
LLVM version: 12.0.1
@rustbot label: +I-heavy
Metadata
Metadata
Assignees
Labels
A-metadataArea: Crate metadataArea: Crate metadataC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.