metadata: Span data and SourceFile
s for macro-only dependencies can be inlined
#74731
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-metadata
Area: Crate metadata
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Some crates are only used for their macros (which are only expanded, but not reexported), but are still required to be loaded (for their spans) when loading non-macro library crates that were produced using those macros.
(It doesn't matter whether the macros are declarative or procedural.)
#73706 implemented a way to inline span data from such macro crates into library crates.
As a result #69432 can be reverted now and span data from macro-only dependencies can be inlined on as-needed basis.
The usual downside is that the same data can be inlined into multiple libraries and duplicated, instead of existing as a separate crate that is shared, however #73706 showed that such inlining is a cumulative improvement and can also be useful for other purposes (#73047).
cc @Aaron1011
The text was updated successfully, but these errors were encountered: