-
Notifications
You must be signed in to change notification settings - Fork 882
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
Rustfmt misaligns comments #4151
Labels
Comments
ayazhafiz
added a commit
to ayazhafiz/rustfmt
that referenced
this issue
May 10, 2020
For an end user, the number of characters in a string is most likely interpreted as the number of [grapheme cluster](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)s in the string, which may be different than either the number of unicode codepoints or bytes. Use the number of graphemes to determine list comment alignment rather than the byte length of the line. Closes rust-lang#4151
topecongiro
added a commit
that referenced
this issue
May 12, 2020
For an end user, the number of characters in a string is most likely interpreted as the number of [grapheme cluster](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)s in the string, which may be different than either the number of unicode codepoints or bytes. Use the number of graphemes to determine list comment alignment rather than the byte length of the line. Closes #4151
bradleypmartin
pushed a commit
to bradleypmartin/rustfmt
that referenced
this issue
May 25, 2020
For an end user, the number of characters in a string is most likely interpreted as the number of [grapheme cluster](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)s in the string, which may be different than either the number of unicode codepoints or bytes. Use the number of graphemes to determine list comment alignment rather than the byte length of the line. Closes rust-lang#4151
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rustfmt causes two of these comments to be misaligned. Removing
// Questionable: IPA voiced velar stop? Or is it math?
causes the two misaligned lines be even more misaligned upon another run of rustfmt (via cargo fmt). Then removing// sqrt
causes both lines to resume normal alignment.Tested with Rust 1.43 stable (
rustfmt 1.4.12-stable (a828ffea 2020-03-11)
) and Rust nightly (rustfmt 1.4.14-nightly (a5cb5d26 2020-04-14)
)The text was updated successfully, but these errors were encountered: