diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2019-12-24 18:57:28 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2019-12-26 23:40:50 +0100 |
| commit | fb100e5ddcb09e5738231a49a1e709a157bdc027 (patch) | |
| tree | 0c45a0f6a3102b12e22a8241371d8ded116c5848 | |
| parent | 75632c5ffe6c8d9b5bb184af1dc6538dd30dc95f (diff) | |
| download | rust-fb100e5ddcb09e5738231a49a1e709a157bdc027.tar.gz rust-fb100e5ddcb09e5738231a49a1e709a157bdc027.zip | |
Move arena_vec inside lowering.
| -rw-r--r-- | src/librustc/hir/lowering.rs | 15 | ||||
| -rw-r--r-- | src/librustc/hir/mod.rs | 9 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 432d550a240..ed84bd118f7 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -32,9 +32,6 @@ //! get confused if the spans from leaf AST nodes occur in multiple places //! in the HIR, especially for multiple identifiers. -mod expr; -mod item; - use crate::arena::Arena; use crate::dep_graph::DepGraph; use crate::hir::def::{DefKind, Namespace, PartialRes, PerNS, Res}; @@ -76,6 +73,18 @@ use syntax_pos::Span; use rustc_error_codes::*; +macro_rules! arena_vec { + () => ( + &[] + ); + ($this:expr; $($x:expr),*) => ( + $this.arena.alloc_from_iter(vec![$($x),*]) + ); +} + +mod expr; +mod item; + const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF; pub struct LoweringContext<'a, 'hir: 'a> { diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 003917ee1e1..8a450cf167a 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -50,15 +50,6 @@ macro_rules! hir_vec { ); } -macro_rules! arena_vec { - () => ( - &[] - ); - ($this:expr; $($x:expr),*) => ( - $this.arena.alloc_from_iter(vec![$($x),*]) - ); -} - pub mod check_attr; pub mod def; pub mod def_id; |
