From 1a2fe87b09d377fa469b2848ab173a91360c9163 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 30 Aug 2021 13:09:38 +0200 Subject: [PATCH] Remove unused arena macro args --- compiler/rustc_arena/src/lib.rs | 2 +- compiler/rustc_ast_lowering/src/lib.rs | 2 +- compiler/rustc_hir/src/arena.rs | 4 ++-- compiler/rustc_middle/src/arena.rs | 6 +++--- compiler/rustc_middle/src/ty/codec.rs | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/rustc_arena/src/lib.rs b/compiler/rustc_arena/src/lib.rs index 2e8022d9880b2..6d5f47aceeb91 100644 --- a/compiler/rustc_arena/src/lib.rs +++ b/compiler/rustc_arena/src/lib.rs @@ -635,7 +635,7 @@ pub macro which_arena_for_type { } #[rustc_macro_transparency = "semitransparent"] -pub macro declare_arena([], [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) { +pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) { #[derive(Default)] pub struct Arena<$tcx> { pub dropless: $crate::DroplessArena, diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index b71fcb7a349cc..0133acfee1008 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -84,7 +84,7 @@ mod path; const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF; -rustc_hir::arena_types!(rustc_arena::declare_arena, [], 'tcx); +rustc_hir::arena_types!(rustc_arena::declare_arena, 'tcx); struct LoweringContext<'a, 'hir: 'a> { /// Used to assign IDs to HIR nodes that do not directly correspond to AST nodes. diff --git a/compiler/rustc_hir/src/arena.rs b/compiler/rustc_hir/src/arena.rs index 0801a1bde2264..3e8b98e9f5493 100644 --- a/compiler/rustc_hir/src/arena.rs +++ b/compiler/rustc_hir/src/arena.rs @@ -9,8 +9,8 @@ /// where `T` is the type listed. These impls will appear in the implement_ty_decoder! macro. #[macro_export] macro_rules! arena_types { - ($macro:path, $args:tt, $tcx:lifetime) => ( - $macro!($args, [ + ($macro:path, $tcx:lifetime) => ( + $macro!([ // HIR types [few] hir_krate: rustc_hir::Crate<$tcx>, [] arm: rustc_hir::Arm<$tcx>, diff --git a/compiler/rustc_middle/src/arena.rs b/compiler/rustc_middle/src/arena.rs index a89d00e26ac19..59db2c6636ff9 100644 --- a/compiler/rustc_middle/src/arena.rs +++ b/compiler/rustc_middle/src/arena.rs @@ -9,8 +9,8 @@ /// listed. These impls will appear in the implement_ty_decoder! macro. #[macro_export] macro_rules! arena_types { - ($macro:path, $args:tt, $tcx:lifetime) => ( - $macro!($args, [ + ($macro:path, $tcx:lifetime) => ( + $macro!([ [] layouts: rustc_target::abi::Layout, // AdtDef are interned and compared by address [] adt_def: rustc_middle::ty::AdtDef, @@ -109,4 +109,4 @@ macro_rules! arena_types { ) } -arena_types!(rustc_arena::declare_arena, [], 'tcx); +arena_types!(rustc_arena::declare_arena, 'tcx); diff --git a/compiler/rustc_middle/src/ty/codec.rs b/compiler/rustc_middle/src/ty/codec.rs index 36db258e92d20..4edb6a327b035 100644 --- a/compiler/rustc_middle/src/ty/codec.rs +++ b/compiler/rustc_middle/src/ty/codec.rs @@ -437,15 +437,15 @@ macro_rules! impl_arena_allocatable_decoder { } macro_rules! impl_arena_allocatable_decoders { - ([], [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => { + ([$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => { $( impl_arena_allocatable_decoder!($a [[$name: $ty], $tcx]); )* } } -rustc_hir::arena_types!(impl_arena_allocatable_decoders, [], 'tcx); -arena_types!(impl_arena_allocatable_decoders, [], 'tcx); +rustc_hir::arena_types!(impl_arena_allocatable_decoders, 'tcx); +arena_types!(impl_arena_allocatable_decoders, 'tcx); #[macro_export] macro_rules! implement_ty_decoder {