Correctly close indentation blocks when pretty printing non-inline module

This commit is contained in:
Tinco Andringa 2018-07-13 23:36:50 +02:00
parent 81a8ee8fc4
commit 23ee94e92b
2 changed files with 4 additions and 2 deletions

View File

@ -1268,13 +1268,14 @@ impl<'a> State<'a> {
self.print_ident(item.ident)?; self.print_ident(item.ident)?;
if _mod.inline || self.is_expanded { if _mod.inline || self.is_expanded {
println!("Going to print inline anyway");
self.nbsp()?; self.nbsp()?;
self.bopen()?; self.bopen()?;
self.print_mod(_mod, &item.attrs)?; self.print_mod(_mod, &item.attrs)?;
self.bclose(item.span)?; self.bclose(item.span)?;
} else { } else {
self.s.word(";")?; self.s.word(";")?;
self.end()?; // end inner head-block
self.end()?; // end outer head-block
} }
} }

View File

@ -8,8 +8,9 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// pp-exact:issue_12590_c.pp // pretty-compare-only
// pretty-mode:expanded // pretty-mode:expanded
// pp-exact:issue_12590_c.pp
// The next line should be expanded // The next line should be expanded