1
Fork 0

ast: Keep expansion status for out-of-line module items

Also remove `ast::Mod` which is mostly redundant now
This commit is contained in:
Vadim Petrochenkov 2021-02-17 00:56:07 +03:00
parent eb65f15c78
commit 4a88165124
14 changed files with 147 additions and 125 deletions

View file

@ -309,8 +309,8 @@ fn out_of_line_mod() {
.unwrap()
.unwrap();
if let ast::ItemKind::Mod(ref m) = item.kind {
assert!(m.items.len() == 2);
if let ast::ItemKind::Mod(_, ref mod_kind) = item.kind {
assert!(matches!(mod_kind, ast::ModKind::Loaded(items, ..) if items.len() == 2));
} else {
panic!();
}