-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tracking Issue for Rust 2024: rustfmt single line where clauses #132381
Comments
Similar to my comment in #132380 (comment), I will note that we have already done the development for this and have been testing and reviewing the testing results with the style team. Going to keep the impl-incomplete label until implementation is merged though |
@calebcartwright was the plan to default - WhereSingleLine, bool, _ => false;
+ WhereSingleLine, bool, Edition2024 => true, _ => false; That said, I took a look at #119515, and rustfmt doesn't yet format single line where clauses for associated types:
|
Reminder: There are only 12 days left until the branch date for Rust 1.85. Anything not in master at that point will not make it into Rust 2024 unless it is accepted by compiler according to the conventions for backports to beta. I.e., this item is in jeopardy. |
This item unfortunately isn't going to make Rust 2024 (or, equivalently, the Style Edition 2024), given that it's not implemented in nightly and the branch date for Rust 1.85 (and Rust 2024) is 2025-01-03. Hopefully this item can be included in a future edition. We'll be reverting this chapter in the Edition Guide, and the relevant changes will also need to be reverted in the Style Guide. |
…compiler-errors Revert rust-lang#119515 single line where clause style guide This did not get implemented for the style edition in 2024, so this PR removes it from the documentation. See tracking issue rust-lang#132381. This can be added back in the next edition if it gets implemented. I'm a little unclear on what the style team intends for how future changes are documented. For example, the current style-guide documented behavior that rustfmt does not support. I'm not sure who the audience for this document is, or how this is intended to stay in sync with rustfmt. For example, if I read this and assume this is how it is supposed to work, and then rustfmt breaks that, it seems like that is confusing. Similarly, if I'm staying on an older edition, this documentation would be incorrect for my crate. Perhaps changes like this could be "teed-up" in a PR, but not merged until the edition is stabilized (similar to how the reference works)? And include notes for parts that are edition-specific (so if I am using an older edition, I can see that something is different). In general, I'm a little confused on how this is intended to work. Reverts: - rust-lang#119515
…compiler-errors Revert rust-lang#119515 single line where clause style guide This did not get implemented for the style edition in 2024, so this PR removes it from the documentation. See tracking issue rust-lang#132381. This can be added back in the next edition if it gets implemented. I'm a little unclear on what the style team intends for how future changes are documented. For example, the current style-guide documented behavior that rustfmt does not support. I'm not sure who the audience for this document is, or how this is intended to stay in sync with rustfmt. For example, if I read this and assume this is how it is supposed to work, and then rustfmt breaks that, it seems like that is confusing. Similarly, if I'm staying on an older edition, this documentation would be incorrect for my crate. Perhaps changes like this could be "teed-up" in a PR, but not merged until the edition is stabilized (similar to how the reference works)? And include notes for parts that are edition-specific (so if I am using an older edition, I can see that something is different). In general, I'm a little confused on how this is intended to work. Reverts: - rust-lang#119515
Rollup merge of rust-lang#134974 - ehuss:revert-single-line-where, r=compiler-errors Revert rust-lang#119515 single line where clause style guide This did not get implemented for the style edition in 2024, so this PR removes it from the documentation. See tracking issue rust-lang#132381. This can be added back in the next edition if it gets implemented. I'm a little unclear on what the style team intends for how future changes are documented. For example, the current style-guide documented behavior that rustfmt does not support. I'm not sure who the audience for this document is, or how this is intended to stay in sync with rustfmt. For example, if I read this and assume this is how it is supposed to work, and then rustfmt breaks that, it seems like that is confusing. Similarly, if I'm staying on an older edition, this documentation would be incorrect for my crate. Perhaps changes like this could be "teed-up" in a PR, but not merged until the edition is stabilized (similar to how the reference works)? And include notes for parts that are edition-specific (so if I am using an older edition, I can see that something is different). In general, I'm a little confused on how this is intended to work. Reverts: - rust-lang#119515
This is a tracking issue for changing the formatting of where clauses to be formatted on a single line in some additional contexts, provided they meet certain constraints (short, single bound, and no
=
on aliases)About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
where
clauses edition-guide#340where
clauses" edition-guide#344where
clauses on the same line #119515Unresolved Questions
None.
Implementation history
where
clauses on the same line #119515cc @rust-lang/rustfmt @rust-lang/style
The text was updated successfully, but these errors were encountered: