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/ast.rs | |
| 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/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index cd2efb4c747..9ed628e2ed3 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -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. |
