Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused arena macro args #88486

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir/src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -109,4 +109,4 @@ macro_rules! arena_types {
)
}

arena_types!(rustc_arena::declare_arena, [], 'tcx);
arena_types!(rustc_arena::declare_arena, 'tcx);
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/ty/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down