|
| 1 | +Initial PR(s) implementing new syntax filed against rust-lang/rust should |
| 2 | +generally leave the rustfmt subtree untouched. In cases that that need to |
| 3 | +modify rustfmt (for example, to fix compiler errors that come from adding |
| 4 | +new variants to AST representation), they should modify rustfmt in such a |
| 5 | +way to keep existing formatting verbatim. |
| 6 | + |
| 7 | +Rustfmt is allowed to implement nightly-only formatting behavior without that |
| 8 | +syntax being specified by the style guide. Initial PR implementors are |
| 9 | +encouraged but not required to open a PR against rustfmt suggesting an initial |
| 10 | +formatting behavior, or formatting may later be implemented as a PR by anyone, |
| 11 | +pending approval of the implementation from T-rustfmt. T-style should be |
| 12 | +notified to approve the interim style proposed by these PRs, but this decision |
| 13 | +is not binding and may be revisited until the feature is stabilized and the |
| 14 | +formatting is codified in the style guide. |
| 15 | + |
| 16 | +Much like breaking nightly feature changes in the Rust compiler, changes should |
| 17 | +be not done unnecessarily, and should take into account the feature's adoption |
| 18 | +and readiness for stabilization. However, changes may be done until the feature |
| 19 | +is stabilized for various reasons: new understanding of the feature's usage in |
| 20 | +the language, recommendation from T-style, or changes in the implementation of |
| 21 | +the feature. |
| 22 | + |
| 23 | +Feature stabilization should be blocked on confirmation and codification of |
| 24 | +formatting bheavior. At this point, T-style may also propose alternative |
| 25 | +formatting at the time of stabilization, with any breaking changes weighted |
| 26 | +according to the principle stated above. |
0 commit comments