1 //! This module is used to store stuff from Rust's AST in a more convenient
2 //! manner (and with prettier names) before cleaning.
3 use rustc_span::{self, Span, Symbol};
7 crate struct Module<'hir> {
8 crate name: Option<Symbol>,
9 crate where_outer: Span,
10 crate where_inner: Span,
11 crate mods: Vec<Module<'hir>>,
14 crate items: Vec<(&'hir hir::Item<'hir>, Option<Symbol>)>,
15 crate foreigns: Vec<(&'hir hir::ForeignItem<'hir>, Option<Symbol>)>,
16 crate macros: Vec<(&'hir hir::MacroDef<'hir>, Option<Symbol>)>,
21 crate fn new(name: Option<Symbol>) -> Module<'hir> {
24 id: hir::CRATE_HIR_ID,
25 where_outer: rustc_span::DUMMY_SP,
26 where_inner: rustc_span::DUMMY_SP,