-
Notifications
You must be signed in to change notification settings - Fork 996
Closed
Labels
C-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-ICE
Description
When formatting the following code,
mod test {
extern "C" {fn test();}
}The first diff suggested by rustfmt is
- extern "C" {fn test();}
+ extern "C" {
+ fn test(); }After running this formatting, the next suggestion is
- fn test(); }
+ fn test();
+ }The final result seems to be correct, but should most likely be applied at once, not in two steps.
Additionally, removing the mod block causes the changes to look like this:
extern "C" {fn test();}-extern "C" {fn test();}
+extern "C" {
+ fn test();}This change is idempotent, but I would expect the closing } to be moved to the next line (which is what happens if a whitespace is put in between the final ; and }).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-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-ICE