diff options
| author | bors <bors@rust-lang.org> | 2018-09-27 09:51:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-27 09:51:12 +0000 |
| commit | c4501a0f1d8dade87bfcdfd0102d96fb15b93713 (patch) | |
| tree | f1a907fc1d298597d6ed81f90274006c7679f24c /src/libsyntax/ext | |
| parent | e999ebdb971a0bde03ec3fdfff901ac6613fcfa0 (diff) | |
| parent | b985e91e434a26302f06333414224422f85a1d8b (diff) | |
| download | rust-c4501a0f1d8dade87bfcdfd0102d96fb15b93713.tar.gz rust-c4501a0f1d8dade87bfcdfd0102d96fb15b93713.zip | |
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.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index b1bed9602f3..6210003a40d 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -1101,6 +1101,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { ast::ItemKind::Mod(ast::Mod { inner: inner_span, items, + inline: true }) ) } diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 87c53d16875..52322e98d46 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -303,6 +303,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { krate.module = ast::Mod { inner: orig_mod_span, items: vec![], + inline: true, }; }, _ => unreachable!(), |
