mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
ast: Keep expansion status for out-of-line module items
Also remove `ast::Mod` which is mostly redundant now
This commit is contained in:
parent
a149f61244
commit
b185fa3ae2
1 changed files with 6 additions and 3 deletions
|
@ -241,9 +241,12 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
|
|||
&& eq_generics(lg, rg)
|
||||
&& both(lb, rb, |l, r| eq_block(l, r))
|
||||
}
|
||||
(Mod(l), Mod(r)) => {
|
||||
l.inline == r.inline && over(&l.items, &r.items, |l, r| eq_item(l, r, eq_item_kind))
|
||||
}
|
||||
(Mod(lu, lmk), Mod(ru, rmk)) => lu == ru && match (lmk, rmk) {
|
||||
(ModKind::Loaded(litems, linline, _), ModKind::Loaded(ritems, rinline, _)) =>
|
||||
linline == rinline && over(litems, ritems, |l, r| eq_item(l, r, eq_item_kind)),
|
||||
(ModKind::Unloaded, ModKind::Unloaded) => true,
|
||||
_ => false,
|
||||
},
|
||||
(ForeignMod(l), ForeignMod(r)) => {
|
||||
both(&l.abi, &r.abi, |l, r| eq_str_lit(l, r))
|
||||
&& over(&l.items, &r.items, |l, r| eq_item(l, r, eq_foreign_item_kind))
|
||||
|
|
Loading…
Reference in a new issue