Skip to content

Rustfmt ate a single line comment in a long list of trait bounds #3669

Description

@Lokathor

I ran a rustfmt cleanup as a commit on a repo, found this in the diff.

Lokathor/randomize@103992e#diff-b316dc9cf67a100913b39ef102078235L48

Particularly:

-    + Into<u128> // Note(Evrey): Because Rust is drunk.
+    + Into<u128>

Now, in this particular case the comment was just a joke, but it could have been very important, and it might have even applied to that particular line in the chain of bounds, so the comment should stay in, and it should stay with that exact bound in the bound list.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-binary-opsArea: binary operatorsA-commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICEI-unexpectedly-removes-codeIssue: unexpectedly removes code that we should not be removing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions