From 81a8ee8fc4822a651aaea722d7920c0f780e9041 Mon Sep 17 00:00:00 2001 From: Tinco Andringa Date: Thu, 12 Jul 2018 23:35:40 +0200 Subject: pretty=expanded should expand mod declarations --- src/libsyntax/parse/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 12156522242..16f1a1ad846 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6288,10 +6288,9 @@ impl<'a> Parser<'a> { // This mod is in an external file. Let's go get it! let ModulePathSuccess { path, directory_ownership, warn } = self.submod_path(id, &outer_attrs, id_span)?; - let (mut module, mut attrs) = + let (module, mut attrs) = self.eval_src_mod(path, directory_ownership, id.to_string(), id_span)?; // Record that we fetched the mod from an external file - module.inline = false; if warn { let attr = Attribute { id: attr::mk_attr_id(), @@ -6530,7 +6529,8 @@ impl<'a> Parser<'a> { p0.cfg_mods = self.cfg_mods; let mod_inner_lo = p0.span; let mod_attrs = p0.parse_inner_attributes()?; - let m0 = p0.parse_mod_items(&token::Eof, mod_inner_lo)?; + let mut m0 = p0.parse_mod_items(&token::Eof, mod_inner_lo)?; + m0.inline = false; self.sess.included_mod_stack.borrow_mut().pop(); Ok((m0, mod_attrs)) } -- cgit 1.4.1-3-g733a5