We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eb4ba0 commit bcaf761Copy full SHA for bcaf761
rustfmt-core/src/reorder.rs
@@ -233,7 +233,7 @@ impl ReorderableItemKind {
233
match item.node {
234
_ if contains_macro_use_attr(item) => ReorderableItemKind::Other,
235
ast::ItemKind::ExternCrate(..) => ReorderableItemKind::ExternCrate,
236
- ast::ItemKind::Mod(..) => ReorderableItemKind::Mod,
+ ast::ItemKind::Mod(ref m) if m.inner.hi() != item.span.hi() => ReorderableItemKind::Mod,
237
ast::ItemKind::Use(..) => ReorderableItemKind::Use,
238
_ => ReorderableItemKind::Other,
239
}
0 commit comments