Add StaticForeignItem and use it on ForeignItemKind
This commit is contained in:
parent
90846015cc
commit
f06e0f7837
11 changed files with 86 additions and 40 deletions
|
@ -1185,8 +1185,8 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
self.check_foreign_ty_genericless(generics, where_clauses);
|
||||
self.check_foreign_item_ascii_only(fi.ident);
|
||||
}
|
||||
ForeignItemKind::Static(_, _, body) => {
|
||||
self.check_foreign_kind_bodyless(fi.ident, "static", body.as_ref().map(|b| b.span));
|
||||
ForeignItemKind::Static(box StaticForeignItem { ty: _, mutability: _, expr }) => {
|
||||
self.check_foreign_kind_bodyless(fi.ident, "static", expr.as_ref().map(|b| b.span));
|
||||
self.check_foreign_item_ascii_only(fi.ident);
|
||||
}
|
||||
ForeignItemKind::MacCall(..) => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue