diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-07-20 22:34:09 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-07-21 09:54:55 -0700 |
| commit | 2daa097077dc988bb7fc818754950b21cd42727c (patch) | |
| tree | ff17b9163284a4bd8aa47af22836220a3b2e25c2 | |
| parent | 6531d02b79b8ecb39055f5464451ef144827870b (diff) | |
| download | rust-2daa097077dc988bb7fc818754950b21cd42727c.tar.gz rust-2daa097077dc988bb7fc818754950b21cd42727c.zip | |
Don't create reexport module if there are none
| -rw-r--r-- | src/librustc/front/test.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc/front/test.rs b/src/librustc/front/test.rs index 3e6b8a92d2d..08907f6c0ed 100644 --- a/src/librustc/front/test.rs +++ b/src/librustc/front/test.rs @@ -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 } |
