-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-driverArea: rustc_driver that ties everything together into the `rustc` compilerArea: rustc_driver that ties everything together into the `rustc` compilerA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityMedium prioritymetabugIssues about issues themselves ("bugs about bugs")Issues about issues themselves ("bugs about bugs")
Description
It would be really nice to have the pretty printer be good enough to use it as a code formatter, ala gofmt. It still has some issues (I've been working on it), but it is reasonably close to being usable in that way.
But, the commandline invocation is kind of unwieldy (and feels redundant). It seems like --pretty should just pretty print, and other stuff should be handled secondarily, ie with:
--pretty-expanded
--pretty-typed
--pretty-expanded-identified
--pretty-identified
Alternatively, perhaps it would make more sense to actually split it into a separate binary, called rustfmt (or, in longer-keyword land, rustformat).
Thoughts?
Metadata
Metadata
Assignees
Labels
A-driverArea: rustc_driver that ties everything together into the `rustc` compilerArea: rustc_driver that ties everything together into the `rustc` compilerA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityMedium prioritymetabugIssues about issues themselves ("bugs about bugs")Issues about issues themselves ("bugs about bugs")