1
Fork 0

Add StaticForeignItem and use it on ForeignItemKind

This commit is contained in:
Santiago Pastorino 2024-04-29 11:27:14 -03:00
parent 90846015cc
commit f06e0f7837
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
11 changed files with 86 additions and 40 deletions

View file

@ -209,7 +209,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> {
fn visit_foreign_item(&mut self, fi: &'a ForeignItem) {
let def_kind = match fi.kind {
ForeignItemKind::Static(_, mutability, _) => {
ForeignItemKind::Static(box StaticForeignItem { ty: _, mutability, expr: _ }) => {
DefKind::Static { mutability, nested: false }
}
ForeignItemKind::Fn(_) => DefKind::Fn,