From 23ee94e92b2111a65de9b6269df858a565656ff8 Mon Sep 17 00:00:00 2001 From: Tinco Andringa Date: Fri, 13 Jul 2018 23:36:50 +0200 Subject: Correctly close indentation blocks when pretty printing non-inline module --- src/libsyntax/print/pprust.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 74ac57a634b..f2acdb3f469 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1268,13 +1268,14 @@ impl<'a> State<'a> { self.print_ident(item.ident)?; if _mod.inline || self.is_expanded { - println!("Going to print inline anyway"); self.nbsp()?; self.bopen()?; self.print_mod(_mod, &item.attrs)?; self.bclose(item.span)?; } else { self.s.word(";")?; + self.end()?; // end inner head-block + self.end()?; // end outer head-block } } -- cgit 1.4.1-3-g733a5