File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use attr::filter_inline_attrs;
23
23
use codemap:: LineRangeUtils ;
24
24
use comment:: combine_strs_with_missing_comments;
25
25
use imports:: { path_to_imported_ident, rewrite_import} ;
26
- use items:: { rewrite_extern_crate, rewrite_mod} ;
26
+ use items:: { is_mod_decl , rewrite_extern_crate, rewrite_mod} ;
27
27
use lists:: { itemize_list, write_list, ListFormatting } ;
28
28
use rewrite:: { Rewrite , RewriteContext } ;
29
29
use shape:: Shape ;
@@ -234,7 +234,7 @@ impl ReorderableItemKind {
234
234
match item. node {
235
235
_ if contains_macro_use_attr ( item) => ReorderableItemKind :: Other ,
236
236
ast:: ItemKind :: ExternCrate ( ..) => ReorderableItemKind :: ExternCrate ,
237
- ast:: ItemKind :: Mod ( ..) => ReorderableItemKind :: Mod ,
237
+ ast:: ItemKind :: Mod ( ..) if is_mod_decl ( item ) => ReorderableItemKind :: Mod ,
238
238
ast:: ItemKind :: Use ( ..) => ReorderableItemKind :: Use ,
239
239
_ => ReorderableItemKind :: Other ,
240
240
}
You can’t perform that action at this time.
0 commit comments