You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*!
* * Hello
* * Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia
* ullamcorper lorem, non hendrerit enim convallis ut. Curabitur id sem
*
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia
* ullamcorper lorem, non hendrerit enim convallis ut. Curabitur id sem volutpat
*/
I know that's a little strange, but I've tried to minimize the original test case.
I've got this config file:
$ cat rustfmt.toml
wrap_comments = true
$
When I run rustfmt (nightly, in order use wrap_comments), it wants to add a leading space on the second-to-last line of the comment:
$ rustfmt +nightly --version
rustfmt 1.4.12-nightly (9f53665f 2020-02-10)
$ rustfmt +nightly --check rustfmt-issue.rs
Diff in /Users/dap/experiments/rust-issue/rustfmt-issue.rs at line 1:
/*!
* * Hello
* * Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia
- * ullamcorper lorem, non hendrerit enim convallis ut. Curabitur id sem
+ * ullamcorper lorem, non hendrerit enim convallis ut. Curabitur id
+ * sem
*
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia
- * ullamcorper lorem, non hendrerit enim convallis ut. Curabitur id sem volutpat
+ * ullamcorper lorem, non hendrerit enim convallis ut. Curabitur id sem
+ * volutpat
*/
$
The changed line wrapping is surprising, but I'm filing this issue about the extra space added at line 7 (the last line with text in the comment). That's obviously strange, and actually breaks the program because it runs into rust issue 69905. So running rustfmt on this file causes cargo test to fail (although that's only partly rustfmt's fault).
The text was updated successfully, but these errors were encountered:
I've got a file with this contents:
I know that's a little strange, but I've tried to minimize the original test case.
I've got this config file:
When I run
rustfmt
(nightly, in order usewrap_comments
), it wants to add a leading space on the second-to-last line of the comment:The changed line wrapping is surprising, but I'm filing this issue about the extra space added at line 7 (the last line with text in the comment). That's obviously strange, and actually breaks the program because it runs into rust issue 69905. So running
rustfmt
on this file causescargo test
to fail (although that's only partlyrustfmt
's fault).The text was updated successfully, but these errors were encountered: