Skip to content

Commit cd518be

Browse files
committed
reorganize_definitions: Temporarily inline new modules
1 parent 585acc9 commit cd518be

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

c2rust-refactor/src/transform/reorganize_definitions.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,18 @@ impl<'a, 'tcx> Reorganizer<'a, 'tcx> {
701701
// FIXME: we should also check if items overlap
702702
mod_items.extend(new_items.into_iter());
703703
} else {
704-
let new_mod = mk().mod_(new_items);
705-
// TODO: do this again when we switch back to outline modules
706-
//new_mod.inline = inline;
704+
// TODO: we should outline the modules, but there
705+
// is currently an issue with the pretty-printer
706+
// where it both writes an output file, and the inline
707+
// module in the parent
708+
//
709+
//let modb = if inline {
710+
// mk.inline()
711+
//} else {
712+
// mk()
713+
//};
714+
let modb = mk().inline();
715+
let new_mod = modb.mod_(new_items);
707716
let new_mod_item = mk()
708717
.pub_()
709718
.id(mod_info.id)

0 commit comments

Comments
 (0)