Skip to content

Commit

Permalink
Move arena_vec inside lowering.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Dec 26, 2019
1 parent 75632c5 commit fb100e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
15 changes: 12 additions & 3 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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> {
Expand Down
9 changes: 0 additions & 9 deletions src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fb100e5

Please sign in to comment.