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
error[internal]: left behind trailing whitespace
--> \\?\C:\Users\eurydice\Desktop\folders\osumapchecker\src\test.rs:108:108:12
|
108 | if true
| ^
|
warning: rustfmt has failed to format. See previous 1 errors.
There must be a space after true, and the comment needs to be on a newline.
I discovered this while writing the safety document on an unsafe function called on || control flow:
fnr#match(&mutself,expected:u8) -> bool{ifself.is_at_end()// Safety: control flow of the `||` operator guarantees that we are not at the end
|| unsafe{*self.source.get_unchecked(self.index)} != expected
{false}else{self.index += 1;true}}
so it is pretty elementary.
The text was updated successfully, but these errors were encountered:
rustfmt doesn't handle comments between binary operators well, and won't format binary expression that contain comments (See #3591). The left behind trailing whitespace message you're seeing means there's trailing whitespace in the source code that rustfmt can't remove.
There must be a space after
true
, and the comment needs to be on a newline.I discovered this while writing the safety document on an unsafe function called on
||
control flow:so it is pretty elementary.
The text was updated successfully, but these errors were encountered: