Rollup merge of #126767 - compiler-errors:static-foreign-item, r=spastorino
`StaticForeignItem` and `StaticItem` are the same The struct `StaticItem` and `StaticForeignItem` are the same, so remove `StaticForeignItem`. Having them be separate is unique to `static` items -- unlike `ForeignItemKind::{Fn,TyAlias}`, which use the normal AST item. r? ``@spastorino`` or ``@oli-obk``
This commit is contained in:
commit
f577d808b7
9 changed files with 10 additions and 67 deletions
|
@ -217,12 +217,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(box StaticForeignItem {
|
||||
ty: _,
|
||||
mutability,
|
||||
expr: _,
|
||||
safety,
|
||||
}) => {
|
||||
ForeignItemKind::Static(box StaticItem { ty: _, mutability, expr: _, safety }) => {
|
||||
let safety = match safety {
|
||||
ast::Safety::Unsafe(_) | ast::Safety::Default => hir::Safety::Unsafe,
|
||||
ast::Safety::Safe(_) => hir::Safety::Safe,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue