]> git.lizzy.rs Git - rust.git/commitdiff
Move arena_vec inside lowering.
authorCamille GILLOT <gillot.camille@gmail.com>
Tue, 24 Dec 2019 17:57:28 +0000 (18:57 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Thu, 26 Dec 2019 22:40:50 +0000 (23:40 +0100)
src/librustc/hir/lowering.rs
src/librustc/hir/mod.rs

index 432d550a24031da709ecfbb6d5f99d2cbd395249..ed84bd118f725fe5d5cb3add8bd9c5ed457fad5a 100644 (file)
@@ -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};
 
 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> {
index 003917ee1e1bf4bc6182d4d4a6b7de45c8a75ce4..8a450cf167a369e42ea4d133adc48b2be2945378 100644 (file)
@@ -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;