This commit is contained in:
parent
3c6f623385
commit
49cae9c485
2 changed files with 6 additions and 0 deletions
|
@ -43,6 +43,10 @@ impl<'a> FmtVisitor<'a> {
|
|||
self.codemap.lookup_char_pos(end));
|
||||
|
||||
if start == end {
|
||||
// Do nothing if this is the beginning of the file.
|
||||
if start == BytePos(0) {
|
||||
return;
|
||||
}
|
||||
process_last_snippet(self, "", "");
|
||||
return;
|
||||
}
|
||||
|
|
2
tests/target/no_new_line_beginning.rs
Normal file
2
tests/target/no_new_line_beginning.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
fn main() {
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue