-
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
Add trait bound styles #29137
Add trait bound styles #29137
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Where does the recommendation to not use where clauses for single bounds come from? |
@bluss Because it is short, so you could write them in the front. |
If we make style recommendations it must be discussed more widely. I don't agree with the recommendation here, where clauses should be ok in all cases. |
Maybe I should change the word, you could alway use the where clause, but if you decide to write them in the front, then it should be 1-3 type parameters with single bound |
☔ The latest upstream changes (presumably #29144) made this pull request unmergeable. Please resolve the merge conflicts. |
@bluss Is that able to merge? :) |
Need wider feedback. By the way, you have some submodule bumps in the PR by mistake, those need to be rebased out. |
1. Add normal trait bound styles 2. Add `where` clause trait bound styles
I don't think we should be modifying the style guide with new recommendations without using the RFC process, or going through the RFC process to define one. As such, I'm going to give this one a close for now. Modifying the style guide will become a really big, important topic once rustfmt is further along. |
where
clause trait bound styles