You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For historical reasons we have a crate that looks like it would be part of the standard library, but it's really just a parser for the implementation of format_args!.
❤️ I would also deeply appreciate the removal/merge of this crate. It's what I always hit when trying to find the "real" formatting piece of the compiler, and it's essentially never what I want.
Unfortunately, fmt_macros is also used from rustc_trait_selection due to implementation of the #[on_unimplemented] attribute, and it's undesirable to introduce the dependency rustc_builtin_macros -> rustc_trait_selection.
Possible solutions:
Keep it as a separate crate, rename to rustc_parse_format.
Merge it into rustc_parse if it doesn't add extra dependencies (need to check).
Turn #[rustc_on_unimplemented] into an built-in attribute macro so it does formatting during expansion and trait selection works with some lowered form of it, #[rustc_on_unimplemented_impl] or whatever. Then the crate can be merged into rustc_builtin_macros.
Activity
Mark-Simulacrum commentedon Apr 15, 2020
❤️ I would also deeply appreciate the removal/merge of this crate. It's what I always hit when trying to find the "real" formatting piece of the compiler, and it's essentially never what I want.
petrochenkov commentedon Apr 16, 2020
Unfortunately,
fmt_macros
is also used fromrustc_trait_selection
due to implementation of the#[on_unimplemented]
attribute, and it's undesirable to introduce the dependencyrustc_builtin_macros
->rustc_trait_selection
.Possible solutions:
rustc_parse_format
.rustc_parse
if it doesn't add extra dependencies (need to check).#[rustc_on_unimplemented]
into an built-in attribute macro so it does formatting during expansion and trait selection works with some lowered form of it,#[rustc_on_unimplemented_impl]
or whatever. Then the crate can be merged intorustc_builtin_macros
.eddyb commentedon May 31, 2020
Either of these seem fine with me, anything else would be overkill, IMO.
rustc_foo
pattern #72927Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum
Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrum