-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Clarify internal programming style #49567
Copy link
Copy link
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Every so often someone will submit a pull request that is the result of running
rustfmton a particular file, or set of files (examples: #49360, #38567, #30684).Presumably we want to encourage fixing mistakes in the code style, though at the moment
rustfmtcan produce undesirable changes (e.g. see the comments in #37349). Without guidelines, these can either be merged directly, or it left up to the individual reviewer to decide which changes are preferred.It seems to me it would be better to do one of two things:
rustfmttotidyand ensure code always adheres to one style.rustfmtis too strict or not good enough). I.e. not changing style choices that were the original intention of the author if they're not specified by the style guide.At the moment, I think style changes are being made, through blind use of
rustfmt, that leave the code in a worse state than before. I think it'd be preferable if we could avoid this; does anyone else have thoughts?