-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 whitespace in assert!
s in core::char
#101231
Conversation
when `assert!`-ing an expression prefixed with `!`, it moves the relevant expression by 1 character. to make such expressions contrast with `assert!`ions on expressions that are not prefixed with `!`, i suggest adding a space. this is in alignment with the docs for `std::ops::Range`.
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
I don't think this is a desirable change. We don't perform this sort of code alignment anywhere else in the code, and this does not match up with what I suppose this could be something the proposed style team could decide on, but it goes against existing Rust convention (as enforced by |
Regarding the issue you have with x.py on NixOS, I'm out of my depth there. You should file a separate issue about that, since I believe it should be supported. |
as mentioned in the commit message, this spacing is present in the docs for
no worries, thanks for the pointer! |
I can confirm that this kind of visual-alignment is not the standard Rust style. If you observe that style in documentation, please feel free to send a patch reformatting that code using rustfmt. |
@joshtriplett personally, i find it a lot easier to parse and understand the docs when written in the style it has been written in for |
@nerdypepper I agree; this is a case where consistency and case-by-case formatting suggest different answers. |
when
assert!
-ing an expression prefixed with!
, it moves therelevant expression by 1 character. to make such expressions contrast
with
assert!
ions on expressions that are not prefixed with!
, isuggest adding a space. this is in alignment with the docs for
std::ops::Range
.i was not able to run
./x.py doc library
or./x.py test tidy
, i got the following error on NixOS:which is strange because:
full logs here
any help on that front would be great, unless it is not required for this PR.