-
Notifications
You must be signed in to change notification settings - Fork 1k
Rustfmt deletes comments in first position of trait bound #6051
Copy link
Copy link
Open
Labels
A-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: 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 removingIssue: unexpectedly removes code that we should not be removing
Metadata
Metadata
Assignees
Labels
A-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: 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 removingIssue: unexpectedly removes code that we should not be removing
Type
Fields
Give feedbackNo fields configured for issues without a type.
Example code:
Running this through rustfmt deletes the
// Explanatory comment about the bounds.Workaround: move the
?Sizedinto the first position. If your bound is not?Sized, you can useSized. The comment is retained:Possibly related to #3669, #4666, #5059 but the examples are in different contexts so I thought I would file a new issue with this test case.
CC @Manishearth