Skip to content

Commit e094380

Browse files
authored
Rollup merge of #88486 - bjorn3:better_arena_macro, r=jackh726
Remove unused arena macro args
2 parents 497267a + 1a2fe87 commit e094380

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

compiler/rustc_arena/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ pub macro which_arena_for_type {
635635
}
636636

637637
#[rustc_macro_transparency = "semitransparent"]
638-
pub macro declare_arena([], [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) {
638+
pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) {
639639
#[derive(Default)]
640640
pub struct Arena<$tcx> {
641641
pub dropless: $crate::DroplessArena,

compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ mod path;
8484

8585
const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
8686

87-
rustc_hir::arena_types!(rustc_arena::declare_arena, [], 'tcx);
87+
rustc_hir::arena_types!(rustc_arena::declare_arena, 'tcx);
8888

8989
struct LoweringContext<'a, 'hir: 'a> {
9090
/// Used to assign IDs to HIR nodes that do not directly correspond to AST nodes.

compiler/rustc_hir/src/arena.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/// where `T` is the type listed. These impls will appear in the implement_ty_decoder! macro.
1010
#[macro_export]
1111
macro_rules! arena_types {
12-
($macro:path, $args:tt, $tcx:lifetime) => (
13-
$macro!($args, [
12+
($macro:path, $tcx:lifetime) => (
13+
$macro!([
1414
// HIR types
1515
[few] hir_krate: rustc_hir::Crate<$tcx>,
1616
[] arm: rustc_hir::Arm<$tcx>,

compiler/rustc_middle/src/arena.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/// listed. These impls will appear in the implement_ty_decoder! macro.
1010
#[macro_export]
1111
macro_rules! arena_types {
12-
($macro:path, $args:tt, $tcx:lifetime) => (
13-
$macro!($args, [
12+
($macro:path, $tcx:lifetime) => (
13+
$macro!([
1414
[] layouts: rustc_target::abi::Layout,
1515
// AdtDef are interned and compared by address
1616
[] adt_def: rustc_middle::ty::AdtDef,
@@ -109,4 +109,4 @@ macro_rules! arena_types {
109109
)
110110
}
111111

112-
arena_types!(rustc_arena::declare_arena, [], 'tcx);
112+
arena_types!(rustc_arena::declare_arena, 'tcx);

compiler/rustc_middle/src/ty/codec.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -437,15 +437,15 @@ macro_rules! impl_arena_allocatable_decoder {
437437
}
438438

439439
macro_rules! impl_arena_allocatable_decoders {
440-
([], [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => {
440+
([$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => {
441441
$(
442442
impl_arena_allocatable_decoder!($a [[$name: $ty], $tcx]);
443443
)*
444444
}
445445
}
446446

447-
rustc_hir::arena_types!(impl_arena_allocatable_decoders, [], 'tcx);
448-
arena_types!(impl_arena_allocatable_decoders, [], 'tcx);
447+
rustc_hir::arena_types!(impl_arena_allocatable_decoders, 'tcx);
448+
arena_types!(impl_arena_allocatable_decoders, 'tcx);
449449

450450
#[macro_export]
451451
macro_rules! implement_ty_decoder {

0 commit comments

Comments
 (0)