diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-21 09:12:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-21 09:12:37 +0200 |
| commit | f577d808b7701cd76a8906b83a1edd839555a5f2 (patch) | |
| tree | 05a4e14fd041be7b4e42c349e1deecb28d4486b0 /compiler/rustc_resolve/src | |
| parent | 520118b4f80a40f88b0f3ea659986060125ae17e (diff) | |
| parent | 3e59f0c3c5b4e23057dcfbe9da784164e2410a78 (diff) | |
| download | rust-f577d808b7701cd76a8906b83a1edd839555a5f2.tar.gz rust-f577d808b7701cd76a8906b83a1edd839555a5f2.zip | |
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``
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/def_collector.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_resolve/src/def_collector.rs b/compiler/rustc_resolve/src/def_collector.rs index 60789c08313..1bca5602a4e 100644 --- a/compiler/rustc_resolve/src/def_collector.rs +++ b/compiler/rustc_resolve/src/def_collector.rs @@ -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, |
