Skip to content

Commit fb100e5

Browse files
committed
Move arena_vec inside lowering.
1 parent 75632c5 commit fb100e5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/librustc/hir/lowering.rs

+12-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
//! get confused if the spans from leaf AST nodes occur in multiple places
3333
//! in the HIR, especially for multiple identifiers.
3434
35-
mod expr;
36-
mod item;
37-
3835
use crate::arena::Arena;
3936
use crate::dep_graph::DepGraph;
4037
use crate::hir::def::{DefKind, Namespace, PartialRes, PerNS, Res};
@@ -76,6 +73,18 @@ use syntax_pos::Span;
7673

7774
use rustc_error_codes::*;
7875

76+
macro_rules! arena_vec {
77+
() => (
78+
&[]
79+
);
80+
($this:expr; $($x:expr),*) => (
81+
$this.arena.alloc_from_iter(vec![$($x),*])
82+
);
83+
}
84+
85+
mod expr;
86+
mod item;
87+
7988
const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
8089

8190
pub struct LoweringContext<'a, 'hir: 'a> {

src/librustc/hir/mod.rs

-9
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,6 @@ macro_rules! hir_vec {
5050
);
5151
}
5252

53-
macro_rules! arena_vec {
54-
() => (
55-
&[]
56-
);
57-
($this:expr; $($x:expr),*) => (
58-
$this.arena.alloc_from_iter(vec![$($x),*])
59-
);
60-
}
61-
6253
pub mod check_attr;
6354
pub mod def;
6455
pub mod def_id;

0 commit comments

Comments
 (0)