Skip to content

Commit

Permalink
Don't create reexport module if there are none
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler authored and alexcrichton committed Jul 21, 2014
1 parent 6531d02 commit 2daa097
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc/front/test.rs
Expand Up @@ -152,8 +152,10 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
for i in mod_folded.items.mut_iter() {
*i = nomain(*i);
}
mod_folded.items.push(mk_reexport_mod(&mut self.cx, reexports));
self.cx.reexports.push(self.cx.path.clone());
if !reexports.is_empty() {
mod_folded.items.push(mk_reexport_mod(&mut self.cx, reexports));
self.cx.reexports.push(self.cx.path.clone());
}

mod_folded
}
Expand Down

0 comments on commit 2daa097

Please sign in to comment.