-
Notifications
You must be signed in to change notification settings - Fork 55
Clarify nightly style policy #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
compiler-errors
merged 6 commits into
rust-lang:master
from
compiler-errors:nightly-style
Jul 5, 2023
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ebdff2a
Clarify nightly style policy
compiler-errors 9863dcd
caleb's applicable suggestions
compiler-errors af1b043
policy -> procedure
compiler-errors 3559725
tweaks
compiler-errors f78907f
Update nightly-style-procedure.md
compiler-errors 468570a
Clarify "nightly" style guide chapter
compiler-errors File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
The style guide may or may not prescribe formatting behavior for nightly syntax | ||
in preparation for a feature's eventual stabilization, and to record in | ||
principal the behavior implemented by rustfmt around nightly syntax, but that | ||
behavior is not binding until the feature is stabilized. | ||
|
||
Initial PR(s) implementing new syntax filed against rust-lang/rust should | ||
generally leave the rustfmt subtree untouched. In cases that that need to | ||
modify rustfmt (for example, to fix compiler errors that come from adding | ||
new variants to AST representation), they should modify rustfmt in such a | ||
way to keep existing formatting verbatim. | ||
|
||
Rustfmt is allowed to implement nightly-only formatting behavior without that | ||
syntax being specified by the style guide. The initial authors of PRs | ||
implementing new features in rust-lang/rust are encouraged, but not | ||
required, to open a PR against | ||
[rustfmt](https://github.com/rust-lang/rustfmt) suggesting an initial | ||
formatting behavior, or formatting may later be implemented as a PR by anyone, | ||
pending approval of the implementation from T-rustfmt. T-style should be | ||
notified to approve the interim style proposed by these PRs, but this decision | ||
is not binding and may be revisited until the feature is stabilized and the | ||
formatting is codified in the style guide. | ||
|
||
Much like breaking nightly feature changes in the Rust compiler, any changes | ||
to formatting behavior for nightly syntax should be made cautiously and with | ||
thorough consideration to avoid churn. Changes should not be done unnecessarily, | ||
and should take into account the feature's adoption | ||
and readiness for stabilization. However, changes may be done until the feature | ||
is stabilized for various reasons: new understanding of the feature's usage in | ||
the language, recommendation from T-style, or changes in the implementation of | ||
the feature. | ||
|
||
Feature stabilization should be blocked on confirmation and codification of | ||
formatting behavior. At this point, T-style may also propose alternative | ||
formatting at the time of stabilization, with any breaking changes weighted | ||
according to the breaking changes principle stated above. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.