diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-08-31 10:41:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-31 10:41:25 +0200 |
| commit | e09438002520055aa36a4a725bd400d7fb63666a (patch) | |
| tree | e13b610c165170dbf3bc0e316035f5ee62a21ad4 | |
| parent | 497267a961807d174fc9b2e045f827ff330273a4 (diff) | |
| parent | 1a2fe87b09d377fa469b2848ab173a91360c9163 (diff) | |
| download | rust-e09438002520055aa36a4a725bd400d7fb63666a.tar.gz rust-e09438002520055aa36a4a725bd400d7fb63666a.zip | |
Rollup merge of #88486 - bjorn3:better_arena_macro, r=jackh726
Remove unused arena macro args
| -rw-r--r-- | compiler/rustc_arena/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir/src/arena.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/arena.rs | 6 | ||||
| -rw-r--r-- | 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 2e8022d9880..6d5f47aceeb 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 b71fcb7a349..0133acfee10 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 0801a1bde22..3e8b98e9f54 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 a89d00e26ac..59db2c6636f 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 36db258e92d..4edb6a327b0 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 { |
