mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Fix #190 for submodules
This commit is contained in:
parent
cf046b734c
commit
76ea7e3b64
@ -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, "", "");
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Some nested mods
|
||||
|
||||
mod nestedmod;
|
||||
mod no_new_line_beginning;
|
||||
|
2
tests/source/no_new_line_beginning.rs
Normal file
2
tests/source/no_new_line_beginning.rs
Normal file
@ -0,0 +1,2 @@
|
||||
fn main() {
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
// Some nested mods
|
||||
|
||||
mod nestedmod;
|
||||
mod no_new_line_beginning;
|
||||
|
Loading…
Reference in New Issue
Block a user