Skip to content
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

Allow cfg-attributes in where clauses #3399

Merged
merged 5 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
threw on unresolved question about what rustfmt should do here
pnkfelix committed Sep 6, 2023
commit 57f1df98977b93a0b4fa8ec0ef89b101eee83b7b
4 changes: 3 additions & 1 deletion text/3399-cfg-attribute-in-where.md
Original file line number Diff line number Diff line change
@@ -148,11 +148,13 @@ but that's not the way I would expect Rust to provide this kind of functionality
# Unresolved questions
[unresolved-questions]: #unresolved-questions

In theory, I don't see any harm in cfg-attributes decorating individual bounds on the right hand side of the colon. Is it worth adding that
* In theory, I don't see any harm in cfg-attributes decorating individual bounds on the right hand side of the colon. Is it worth adding that
potential feature as well? Personally, I don't see it as being worth the added complexity given that you can have multiple individual bound
declarations for the same item. Doing so would also create an inconsistency, given that this isn't currently allowed in angle-bracketed
bounds either.

* rustfmt is supposed to be able to format the where clause somehow, do we expect it to (try to) put the attribute on the same line, or would it always prefer the attribute on separate lines?

# Future possibilities
[future-possibilities]: #future-possibilities