Fix #190 for submodules

This commit is contained in:
Gaëtan Cassiers 2015-08-24 22:01:01 +02:00
parent cf046b734c
commit 76ea7e3b64
4 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ impl<'a> FmtVisitor<'a> {
if start == end {
// Do nothing if this is the beginning of the file.
if start == BytePos(0) {
if start == self.codemap.lookup_char_pos(start).file.start_pos {
return;
}
process_last_snippet(self, "", "");

View File

@ -1,3 +1,4 @@
// Some nested mods
mod nestedmod;
mod no_new_line_beginning;

View File

@ -0,0 +1,2 @@
fn main() {
}

View File

@ -1,3 +1,4 @@
// Some nested mods
mod nestedmod;
mod no_new_line_beginning;