Auto merge of #52319 - tinco:issue_12590, r=pnkfelix

Track whether module declarations are inline (fixes #12590)

To track whether module declarations are inline I added a field `inline: bool` to `ast::Mod`. The main use case is for pretty to know whether it should render the items associated with the module, but perhaps there are use cases for this information to not be forgotten in the AST.
This commit is contained in:
bors 2018-09-27 09:51:12 +00:00
commit c4501a0f1d
12 changed files with 143 additions and 17 deletions

View file

@ -1885,6 +1885,8 @@ pub struct Mod {
/// to the last token in the external file.
pub inner: Span,
pub items: Vec<P<Item>>,
/// For `mod foo;` inline is false, for `mod foo { .. }` it is true.
pub inline: bool,
}
/// Foreign module declaration.