mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-10 19:16:51 +00:00
This commit is contained in:
parent
3c6f623385
commit
49cae9c485
@ -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…
Reference in New Issue
Block a user