syntax: move ast_map to librustc.

This commit is contained in:
Eduard Burtescu 2015-06-10 02:40:45 +03:00
parent 7b0f2af27f
commit 76eaed44d9
45 changed files with 75 additions and 63 deletions

View File

@ -23,13 +23,12 @@
pub use self::Code::*;
use abi;
use ast::{Block, FnDecl, NodeId};
use ast;
use ast_map::Node;
use ast_map;
use codemap::Span;
use visit;
use ast_map::{self, Node};
use syntax::abi;
use syntax::ast::{Block, FnDecl, NodeId};
use syntax::ast;
use syntax::codemap::Span;
use syntax::visit;
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
/// and a body (as well as a NodeId, a span, etc).

View File

@ -12,14 +12,14 @@ pub use self::Node::*;
pub use self::PathElem::*;
use self::MapEntry::*;
use abi;
use ast::*;
use ast_util;
use codemap::{DUMMY_SP, Span, Spanned};
use fold::Folder;
use parse::token;
use print::pprust;
use visit::{self, Visitor};
use syntax::abi;
use syntax::ast::*;
use syntax::ast_util;
use syntax::codemap::{DUMMY_SP, Span, Spanned};
use syntax::fold::Folder;
use syntax::parse::token;
use syntax::print::pprust;
use syntax::visit::{self, Visitor};
use arena::TypedArena;
use std::cell::RefCell;

View File

@ -92,6 +92,8 @@ pub mod back {
pub use rustc_back::x86_64;
}
pub mod ast_map;
pub mod middle {
pub mod astconv_util;
pub mod astencode;

View File

@ -10,6 +10,7 @@
// Searching for information from the cstore
use ast_map;
use metadata::common::*;
use metadata::cstore;
use metadata::decoder;
@ -20,7 +21,6 @@ use rbml;
use rbml::reader;
use std::rc::Rc;
use syntax::ast;
use syntax::ast_map;
use syntax::attr;
use syntax::attr::AttrMetaMethods;
use syntax::diagnostic::expect;

View File

@ -15,6 +15,7 @@
pub use self::DefLike::*;
use self::Family::*;
use ast_map;
use back::svh::Svh;
use metadata::cstore::crate_metadata;
use metadata::common::*;
@ -44,7 +45,6 @@ use std::str;
use rbml::reader;
use rbml;
use serialize::Decodable;
use syntax::ast_map;
use syntax::attr;
use syntax::parse::token::{IdentInterner, special_idents};
use syntax::parse::token;

View File

@ -15,6 +15,7 @@
pub use self::InlinedItemRef::*;
use ast_map::{self, LinkedPath, PathElem, PathElems};
use back::svh::Svh;
use session::config;
use metadata::common::*;
@ -34,7 +35,6 @@ use std::io::prelude::*;
use std::io::{Cursor, SeekFrom};
use syntax::abi;
use syntax::ast::{self, DefId, NodeId};
use syntax::ast_map::{self, LinkedPath, PathElem, PathElems};
use syntax::ast_util::*;
use syntax::ast_util;
use syntax::attr;

View File

@ -12,6 +12,7 @@
// FIXME: remove this after snapshot, and Results are handled
#![allow(unused_must_use)]
use ast_map;
use metadata::common as c;
use metadata::cstore as cstore;
use session::Session;
@ -32,7 +33,7 @@ use middle::subst::VecPerParamSpace;
use middle::ty::{self, Ty, MethodCall, MethodCallee, MethodOrigin};
use util::ppaux::ty_to_string;
use syntax::{ast, ast_map, ast_util, codemap, fold};
use syntax::{ast, ast_util, codemap, fold};
use syntax::codemap::Span;
use syntax::fold::Folder;
use syntax::parse::token;

View File

@ -17,8 +17,8 @@ use std::borrow::IntoCow;
use graphviz as dot;
use syntax::ast;
use syntax::ast_map;
use ast_map;
use middle::cfg;
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);

View File

@ -11,11 +11,11 @@
// This compiler pass detects static items that refer to themselves
// recursively.
use ast_map;
use session::Session;
use middle::def::{DefStatic, DefConst, DefAssociatedConst, DefMap};
use syntax::ast;
use syntax::{ast_util, ast_map};
use syntax::{ast, ast_util};
use syntax::codemap::Span;
use syntax::visit::Visitor;
use syntax::visit;

View File

@ -15,6 +15,8 @@ pub use self::const_val::*;
use self::ErrKind::*;
use ast_map;
use ast_map::blocks::FnLikeNode;
use metadata::csearch;
use middle::{astencode, def, infer, subst, traits};
use middle::pat_util::def_to_path;
@ -24,13 +26,12 @@ use util::num::ToPrimitive;
use util::ppaux::Repr;
use syntax::ast::{self, Expr};
use syntax::ast_map::blocks::FnLikeNode;
use syntax::ast_util;
use syntax::codemap::Span;
use syntax::feature_gate;
use syntax::parse::token::InternedString;
use syntax::ptr::P;
use syntax::{ast_map, codemap, visit};
use syntax::{codemap, visit};
use std::borrow::{Cow, IntoCow};
use std::num::wrapping::OverflowingOps;

View File

@ -12,12 +12,13 @@
// closely. The idea is that all reachable symbols are live, codes called
// from live codes are live, and everything else is dead.
use ast_map;
use middle::{def, pat_util, privacy, ty};
use lint;
use util::nodemap::NodeSet;
use std::collections::HashSet;
use syntax::{ast, ast_map, codemap};
use syntax::{ast, codemap};
use syntax::ast_util::{local_def, is_local};
use syntax::attr::{self, AttrMetaMethods};
use syntax::visit::{self, Visitor};

View File

@ -9,9 +9,9 @@
// except according to those terms.
use ast_map;
use session::{config, Session};
use syntax::ast::{Name, NodeId, Item, ItemFn};
use syntax::ast_map;
use syntax::attr;
use syntax::codemap::Span;
use syntax::parse::token;

View File

@ -72,6 +72,7 @@ use super::region_inference::ProcessedErrors;
use super::region_inference::SameRegions;
use std::collections::HashSet;
use ast_map;
use middle::def;
use middle::infer;
use middle::subst;
@ -81,7 +82,6 @@ use std::cell::{Cell, RefCell};
use std::char::from_u32;
use std::string::String;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::name_to_dummy_lifetime;
use syntax::owned_slice::OwnedSlice;
use syntax::codemap;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ast_map::NodeForeignItem;
use metadata::csearch;
use middle::def::DefFn;
use middle::subst::{Subst, Substs, EnumeratedItems};
@ -18,7 +19,6 @@ use util::ppaux::Repr;
use syntax::abi::RustIntrinsic;
use syntax::ast::DefId;
use syntax::ast;
use syntax::ast_map::NodeForeignItem;
use syntax::codemap::Span;
use syntax::parse::token;
use syntax::visit::Visitor;

View File

@ -73,6 +73,7 @@ pub use self::categorization::*;
use self::Aliasability::*;
use ast_map;
use middle::check_const;
use middle::def;
use middle::region;
@ -82,7 +83,6 @@ use util::ppaux::{Repr, UserString};
use syntax::ast::{MutImmutable, MutMutable};
use syntax::ast;
use syntax::ast_map;
use syntax::codemap::Span;
use syntax::print::pprust;
use syntax::parse::token;

View File

@ -15,6 +15,7 @@
// makes all other generics or inline functions that it references
// reachable as well.
use ast_map;
use middle::def;
use middle::ty;
use middle::privacy;
@ -24,7 +25,6 @@ use util::nodemap::NodeSet;
use std::collections::HashSet;
use syntax::abi;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::is_local;
use syntax::attr;
use syntax::visit::Visitor;

View File

@ -16,6 +16,7 @@
//! Most of the documentation on regions can be found in
//! `middle/typeck/infer/region_inference.rs`
use ast_map;
use session::Session;
use middle::ty::{self, Ty};
use util::nodemap::{FnvHashMap, FnvHashSet, NodeMap};
@ -25,7 +26,6 @@ use syntax::codemap::{self, Span};
use syntax::{ast, visit};
use syntax::ast::{Block, Item, FnDecl, NodeId, Arm, Pat, Stmt, Expr, Local};
use syntax::ast_util::stmt_id;
use syntax::ast_map;
use syntax::ptr::P;
use syntax::visit::{Visitor, FnKind};

View File

@ -35,6 +35,7 @@ pub use self::IntVarValue::*;
pub use self::MethodOrigin::*;
pub use self::CopyImplementationError::*;
use ast_map::{self, LinkedPath};
use back::svh::Svh;
use session::Session;
use lint;
@ -91,7 +92,6 @@ use syntax::parse::token::{self, InternedString, special_idents};
use syntax::print::pprust;
use syntax::ptr::P;
use syntax::ast;
use syntax::ast_map::{self, LinkedPath};
pub type Disr = u64;

View File

@ -9,6 +9,7 @@
// except according to those terms.
use ast_map;
use middle::def;
use middle::region;
use middle::subst::{VecPerParamSpace,Subst};
@ -31,7 +32,6 @@ use std::collections::hash_state::HashState;
use std::hash::Hash;
use std::rc::Rc;
use syntax::abi;
use syntax::ast_map;
use syntax::codemap::{Span, Pos};
use syntax::parse::token;
use syntax::print::pprust;

View File

@ -20,6 +20,8 @@ pub use self::MovedValueUseKind::*;
use self::InteriorKind::*;
use rustc::ast_map;
use rustc::ast_map::blocks::{FnLikeNode, FnParts};
use rustc::middle::cfg;
use rustc::middle::dataflow::DataFlowContext;
use rustc::middle::dataflow::BitwiseOperator;
@ -35,8 +37,6 @@ use std::mem;
use std::rc::Rc;
use std::string::String;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_map::blocks::{FnLikeNode, FnParts};
use syntax::ast_util;
use syntax::codemap::Span;
use syntax::parse::token;

View File

@ -11,6 +11,7 @@
use rustc::session::Session;
use rustc::session::config::{self, Input, OutputFilenames};
use rustc::session::search_paths::PathKind;
use rustc::ast_map;
use rustc::lint;
use rustc::metadata;
use rustc::metadata::creader::CrateReader;
@ -37,7 +38,6 @@ use std::fs;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use syntax::ast;
use syntax::ast_map;
use syntax::attr;
use syntax::attr::AttrMetaMethods;
use syntax::diagnostics;

View File

@ -19,6 +19,7 @@ use rustc_trans::back::link;
use driver;
use rustc::ast_map::{self, blocks, NodePrinter};
use rustc::middle::ty;
use rustc::middle::cfg;
use rustc::middle::cfg::graphviz::LabelledCFG;
@ -30,7 +31,6 @@ use rustc_borrowck::graphviz as borrowck_dot;
use rustc_resolve as resolve;
use syntax::ast;
use syntax::ast_map::{self, blocks, NodePrinter};
use syntax::codemap;
use syntax::fold::{self, Folder};
use syntax::print::{pp, pprust};

View File

@ -29,8 +29,9 @@ use rustc_typeck::middle::infer::lub::Lub;
use rustc_typeck::middle::infer::glb::Glb;
use rustc_typeck::middle::infer::sub::Sub;
use rustc_typeck::util::ppaux::{ty_to_string, Repr, UserString};
use rustc::ast_map;
use rustc::session::{self,config};
use syntax::{abi, ast, ast_map};
use syntax::{abi, ast};
use syntax::codemap;
use syntax::codemap::{Span, CodeMap, DUMMY_SP};
use syntax::diagnostic::{Level, RenderSpan, Bug, Fatal, Error, Warning, Note, Help};

View File

@ -35,6 +35,7 @@ use middle::ty::{self, Ty};
use middle::{def, pat_util, stability};
use middle::const_eval::{eval_const_expr_partial, const_int, const_uint};
use middle::cfg;
use rustc::ast_map;
use util::ppaux::ty_to_string;
use util::nodemap::{FnvHashMap, NodeSet};
use lint::{Level, Context, LintPass, LintArray, Lint};
@ -44,7 +45,7 @@ use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::{cmp, slice};
use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
use syntax::{abi, ast, ast_map};
use syntax::{abi, ast};
use syntax::ast_util::{self, is_shift_binop, local_def};
use syntax::attr::{self, AttrMetaMethods};
use syntax::codemap::{self, Span};

View File

@ -33,6 +33,7 @@ use self::FieldName::*;
use std::mem::replace;
use rustc::ast_map;
use rustc::metadata::csearch;
use rustc::middle::def;
use rustc::middle::privacy::ImportUse::*;
@ -46,7 +47,7 @@ use rustc::middle::ty::MethodTraitObject;
use rustc::middle::ty::{self, Ty};
use rustc::util::nodemap::{NodeMap, NodeSet};
use syntax::{ast, ast_map};
use syntax::ast;
use syntax::ast_util::{is_local, local_def};
use syntax::codemap::Span;
use syntax::parse::token;

View File

@ -49,6 +49,7 @@ use self::ParentLink::*;
use self::ModuleKind::*;
use self::FallbackChecks::*;
use rustc::ast_map;
use rustc::session::Session;
use rustc::lint;
use rustc::metadata::csearch;
@ -80,7 +81,6 @@ use syntax::ast::{TyPath, TyPtr};
use syntax::ast::{TyRptr, TyStr, TyUs, TyU8, TyU16, TyU32, TyU64, TyUint};
use syntax::ast::TypeImplItem;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::{local_def, walk_pat};
use syntax::attr::AttrMetaMethods;
use syntax::ext::mtwt;

View File

@ -21,8 +21,9 @@ use session::Session;
use metadata::common::LinkMeta;
use metadata::{encoder, cstore, filesearch, csearch, creader};
use metadata::filesearch::FileDoesntMatch;
use trans::{CrateContext, CrateTranslation, gensym_name};
use middle::ty::{self, Ty};
use rustc::ast_map::{PathElem, PathElems, PathName};
use trans::{CrateContext, CrateTranslation, gensym_name};
use util::common::time;
use util::ppaux;
use util::sha2::{Digest, Sha256};
@ -38,7 +39,6 @@ use std::str;
use flate;
use serialize::hex::ToHex;
use syntax::ast;
use syntax::ast_map::{PathElem, PathElems, PathName};
use syntax::attr::AttrMetaMethods;
use syntax::codemap::Span;
use syntax::parse::token;

View File

@ -34,6 +34,7 @@ use session::Session;
use middle::def;
use middle::ty::{self, Ty};
use rustc::ast_map::NodeItem;
use std::cell::Cell;
use std::fs::File;
@ -41,7 +42,6 @@ use std::path::Path;
use syntax::ast_util;
use syntax::ast::{self, NodeId, DefId};
use syntax::ast_map::NodeItem;
use syntax::codemap::*;
use syntax::parse::token::{self, get_ident, keywords};
use syntax::owned_slice::OwnedSlice;

View File

@ -41,6 +41,7 @@ use middle::lang_items::{LangItem, ExchangeMallocFnLangItem, StartFnLangItem};
use middle::weak_lang_items;
use middle::subst::Substs;
use middle::ty::{self, Ty, ClosureTyper, type_is_simd, simd_size};
use rustc::ast_map;
use session::config::{self, NoDebugInfo};
use session::Session;
use trans::_match;
@ -99,7 +100,7 @@ use syntax::codemap::Span;
use syntax::parse::token::InternedString;
use syntax::visit::Visitor;
use syntax::visit;
use syntax::{ast, ast_util, ast_map};
use syntax::{ast, ast_util};
thread_local! {
static TASK_LOCAL_INSN_KEY: RefCell<Option<Vec<&'static str>>> = {

View File

@ -53,12 +53,12 @@ use trans::type_::Type;
use trans::type_of;
use middle::ty::{self, Ty};
use middle::ty::MethodCall;
use rustc::ast_map;
use util::ppaux::Repr;
use util::ppaux::ty_to_string;
use syntax::abi as synabi;
use syntax::ast;
use syntax::ast_map;
use syntax::ptr::P;
#[derive(Copy, Clone)]

View File

@ -40,6 +40,7 @@ use middle::traits;
use middle::ty::{self, HasProjectionTypes, Ty};
use middle::ty_fold;
use middle::ty_fold::{TypeFolder, TypeFoldable};
use rustc::ast_map::{PathElem, PathName};
use util::ppaux::Repr;
use util::nodemap::{FnvHashMap, NodeMap};
@ -50,7 +51,6 @@ use std::cell::{Cell, RefCell};
use std::result::Result as StdResult;
use std::vec::Vec;
use syntax::ast;
use syntax::ast_map::{PathElem, PathName};
use syntax::codemap::{DUMMY_SP, Span};
use syntax::parse::token::InternedString;
use syntax::parse::token;

View File

@ -26,6 +26,7 @@ use llvm::debuginfo::{DIType, DIFile, DIScope, DIDescriptor, DICompositeType};
use metadata::csearch;
use middle::pat_util;
use middle::subst::{self, Substs};
use rustc::ast_map;
use trans::{type_of, adt, machine, monomorphize};
use trans::common::{self, CrateContext, FunctionContext, NormalizingClosureTyper, Block};
use trans::_match::{BindingInfo, TrByCopy, TrByMove, TrByRef};
@ -43,7 +44,7 @@ use std::ptr;
use std::rc::Rc;
use syntax::util::interner::Interner;
use syntax::codemap::Span;
use syntax::{ast, codemap, ast_util, ast_map};
use syntax::{ast, codemap, ast_util};
use syntax::parse::token::{self, special_idents};

View File

@ -26,6 +26,7 @@ use llvm::{ModuleRef, ContextRef, ValueRef};
use llvm::debuginfo::{DIFile, DIType, DIScope, DIBuilderRef, DISubprogram, DIArray,
DIDescriptor, FlagPrototyped};
use middle::subst::{self, Substs};
use rustc::ast_map;
use trans::common::{NodeIdAndSpan, CrateContext, FunctionContext, Block};
use trans;
use trans::monomorphize;
@ -39,7 +40,7 @@ use std::ffi::CString;
use std::ptr;
use std::rc::Rc;
use syntax::codemap::{Span, Pos};
use syntax::{ast, codemap, ast_util, ast_map};
use syntax::{ast, codemap, ast_util};
use syntax::parse::token::{self, special_idents};
pub mod gdb;

View File

@ -14,13 +14,14 @@ use super::utils::{DIB, debug_context};
use llvm;
use llvm::debuginfo::DIScope;
use rustc::ast_map;
use trans::common::CrateContext;
use middle::ty::{self, ClosureTyper};
use std::ffi::CString;
use std::ptr;
use std::rc::{Rc, Weak};
use syntax::{ast, ast_map};
use syntax::ast;
use syntax::parse::token;
pub struct NamespaceTreeNode {

View File

@ -13,6 +13,7 @@ use back::link;
use llvm::{ValueRef, CallConv, get_param};
use llvm;
use middle::weak_lang_items;
use rustc::ast_map;
use trans::attributes;
use trans::base::{llvm_linkage_by_name, push_ctxt};
use trans::base;
@ -37,7 +38,7 @@ use syntax::codemap::Span;
use syntax::parse::token::{InternedString, special_idents};
use syntax::parse::token;
use syntax::ast;
use syntax::{attr, ast_map};
use syntax::attr;
use syntax::print::pprust;
use util::ppaux::Repr;

View File

@ -18,6 +18,7 @@ use middle::subst::VecPerParamSpace;
use middle::subst;
use middle::traits;
use middle::ty::ClosureTyper;
use rustc::ast_map;
use trans::base::*;
use trans::build::*;
use trans::callee::*;
@ -42,7 +43,7 @@ use util::ppaux::Repr;
use syntax::abi::{Rust, RustCall};
use syntax::parse::token;
use syntax::{ast, ast_map, attr, visit};
use syntax::{ast, attr, visit};
use syntax::codemap::DUMMY_SP;
use syntax::ptr::P;

View File

@ -17,6 +17,7 @@ use middle::subst;
use middle::subst::{Subst, Substs};
use middle::traits;
use middle::ty_fold::{TypeFolder, TypeFoldable};
use rustc::ast_map;
use trans::attributes;
use trans::base::{trans_enum_variant, push_ctxt, get_item_val};
use trans::base::trans_fn;
@ -29,7 +30,6 @@ use util::ppaux::Repr;
use syntax::abi;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::local_def;
use syntax::attr;
use syntax::codemap::DUMMY_SP;

View File

@ -32,14 +32,13 @@ use middle::ty;
use middle::free_region::FreeRegionMap;
use CrateCtxt;
use middle::infer::{self, InferCtxt, new_infer_ctxt};
use rustc::ast_map::{self, NodeItem};
use std::cell::RefCell;
use std::rc::Rc;
use syntax::ast::{Crate, DefId};
use syntax::ast::{Item, ItemImpl};
use syntax::ast::{LOCAL_CRATE};
use syntax::ast;
use syntax::ast_map::NodeItem;
use syntax::ast_map;
use syntax::ast_util::local_def;
use syntax::codemap::Span;
use syntax::parse::token;

View File

@ -77,6 +77,7 @@ use middle::ty::{self, RegionEscape, ToPolyTraitRef, Ty, TypeScheme};
use middle::ty_fold::{self, TypeFolder, TypeFoldable};
use middle::infer;
use rscope::*;
use rustc::ast_map;
use util::common::{ErrorReported, memoized};
use util::nodemap::{FnvHashMap, FnvHashSet};
use util::ppaux;
@ -89,7 +90,6 @@ use std::rc::Rc;
use syntax::abi;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::local_def;
use syntax::codemap::Span;
use syntax::parse::token::special_idents;

View File

@ -101,6 +101,7 @@ use middle::def;
use middle::infer;
use middle::subst;
use middle::ty::{self, Ty};
use rustc::ast_map;
use session::config;
use util::common::time;
use util::ppaux::Repr;
@ -108,7 +109,7 @@ use util::ppaux;
use syntax::codemap::Span;
use syntax::print::pprust::*;
use syntax::{ast, ast_map, abi};
use syntax::{ast, abi};
use syntax::ast_util::local_def;
use std::cell::RefCell;

View File

@ -270,10 +270,10 @@ use middle::resolve_lifetime as rl;
use middle::subst;
use middle::subst::{ParamSpace, FnSpace, TypeSpace, SelfSpace, VecPerParamSpace};
use middle::ty::{self, Ty};
use rustc::ast_map;
use std::fmt;
use std::rc::Rc;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util;
use syntax::visit;
use syntax::visit::Visitor;

View File

@ -14,11 +14,12 @@ use rustc_driver::driver;
use rustc::session::{self, config};
use rustc::session::config::UnstableFeatures;
use rustc::middle::{privacy, ty};
use rustc::ast_map;
use rustc::lint;
use rustc_trans::back::link;
use rustc_resolve as resolve;
use syntax::{ast, ast_map, codemap, diagnostic};
use syntax::{ast, codemap, diagnostic};
use std::cell::{RefCell, Cell};
use std::collections::{HashMap, HashSet};

View File

@ -17,11 +17,11 @@ use std::mem;
use syntax::abi;
use syntax::ast;
use syntax::ast_util;
use syntax::ast_map;
use syntax::attr;
use syntax::attr::AttrMetaMethods;
use syntax::codemap::Span;
use rustc::ast_map;
use rustc::middle::stability;
use core;

View File

@ -35,7 +35,6 @@
#![feature(str_char)]
#![feature(unicode)]
extern crate arena;
extern crate fmt_macros;
extern crate serialize;
extern crate term;
@ -82,7 +81,6 @@ pub mod syntax {
pub mod abi;
pub mod ast;
pub mod ast_map;
pub mod ast_util;
pub mod attr;
pub mod codemap;

View File

@ -21,6 +21,7 @@ use std::mem::transmute;
use std::path::PathBuf;
use std::thread::Builder;
use rustc::ast_map;
use rustc::llvm;
use rustc::metadata::cstore::RequireDynamic;
use rustc::middle::ty;
@ -29,7 +30,6 @@ use rustc::session::build_session;
use rustc_driver::driver;
use rustc_resolve::MakeGlobMap;
use syntax::ast_map;
use syntax::diagnostics::registry::Registry;
fn main() {