rustc: move rustc_front to rustc::hir.
This commit is contained in:
parent
772c600d4d
commit
8b0937293b
31
mk/crates.mk
31
mk/crates.mk
@ -56,7 +56,7 @@ TARGET_CRATES := libc std term \
|
||||
alloc_system alloc_jemalloc
|
||||
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
|
||||
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
|
||||
rustc_data_structures rustc_front rustc_platform_intrinsics \
|
||||
rustc_data_structures rustc_platform_intrinsics \
|
||||
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
|
||||
rustc_const_eval rustc_const_math
|
||||
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
|
||||
@ -93,38 +93,37 @@ DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
|
||||
DEPS_syntax_ext := syntax fmt_macros
|
||||
|
||||
DEPS_rustc_const_math := std syntax log serialize
|
||||
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
|
||||
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
|
||||
rustc_back graphviz
|
||||
|
||||
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
|
||||
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
|
||||
log graphviz rustc_back rustc_data_structures\
|
||||
rustc_const_math
|
||||
DEPS_rustc_back := std syntax rustc_front flate log libc
|
||||
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
|
||||
DEPS_rustc_back := std syntax flate log libc
|
||||
DEPS_rustc_borrowck := rustc rustc_mir log graphviz syntax
|
||||
DEPS_rustc_data_structures := std log serialize
|
||||
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
|
||||
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
|
||||
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
|
||||
rustc_trans rustc_privacy rustc_lint rustc_plugin \
|
||||
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
|
||||
DEPS_rustc_front := std syntax log serialize
|
||||
DEPS_rustc_lint := rustc log syntax rustc_const_eval
|
||||
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
|
||||
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
|
||||
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
|
||||
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
|
||||
DEPS_rustc_resolve := arena rustc rustc_front log syntax
|
||||
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
|
||||
DEPS_rustc_passes := syntax rustc core rustc_const_eval
|
||||
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
|
||||
DEPS_rustc_resolve := arena rustc log syntax
|
||||
DEPS_rustc_platform_intrinsics := std
|
||||
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
|
||||
DEPS_rustc_privacy := rustc rustc_front log syntax
|
||||
DEPS_rustc_privacy := rustc log syntax
|
||||
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
|
||||
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
|
||||
log syntax serialize rustc_llvm rustc_platform_intrinsics \
|
||||
rustc_const_math rustc_const_eval
|
||||
DEPS_rustc_save_analysis := rustc log syntax rustc_front
|
||||
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
|
||||
DEPS_rustc_save_analysis := rustc log syntax
|
||||
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics rustc_const_math \
|
||||
rustc_const_eval
|
||||
|
||||
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
|
||||
test rustc_lint rustc_front rustc_const_eval
|
||||
test rustc_lint rustc_const_eval
|
||||
|
||||
|
||||
TOOL_DEPS_compiletest := test getopts log
|
||||
|
@ -19,6 +19,5 @@ rustc_back = { path = "../librustc_back" }
|
||||
rustc_bitflags = { path = "../librustc_bitflags" }
|
||||
rustc_const_math = { path = "../librustc_const_math" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
serialize = { path = "../libserialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -16,7 +16,7 @@ use ty::{self, TyCtxt};
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use hir::{self, PatKind};
|
||||
|
||||
struct CFGBuilder<'a, 'tcx: 'a> {
|
||||
tcx: &'a TyCtxt<'tcx>,
|
||||
@ -257,7 +257,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
||||
self.match_(expr.id, &discr, &arms, pred)
|
||||
}
|
||||
|
||||
hir::ExprBinary(op, ref l, ref r) if ::rustc_front::util::lazy_binop(op.node) => {
|
||||
hir::ExprBinary(op, ref l, ref r) if hir::util::lazy_binop(op.node) => {
|
||||
//
|
||||
// [pred]
|
||||
// |
|
||||
|
@ -17,7 +17,7 @@ use graphviz::IntoCow;
|
||||
|
||||
use syntax::ast;
|
||||
|
||||
use front::map as ast_map;
|
||||
use hir::map as ast_map;
|
||||
use cfg;
|
||||
|
||||
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
|
||||
|
@ -14,7 +14,7 @@
|
||||
use rustc_data_structures::graph;
|
||||
use ty::TyCtxt;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
mod construct;
|
||||
pub mod graphviz;
|
||||
|
@ -12,8 +12,8 @@ use self::thread::{DepGraphThreadData, DepMessage};
|
||||
use middle::def_id::DefId;
|
||||
use syntax::ast::NodeId;
|
||||
use ty::TyCtxt;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use hir;
|
||||
use hir::intravisit::Visitor;
|
||||
use std::rc::Rc;
|
||||
|
||||
mod dep_tracking_map;
|
||||
|
@ -23,14 +23,14 @@
|
||||
|
||||
pub use self::Code::*;
|
||||
|
||||
use front::map::{self, Node};
|
||||
use hir::map::{self, Node};
|
||||
use syntax::abi;
|
||||
use rustc_front::hir::{Block, FnDecl};
|
||||
use hir::{Block, FnDecl};
|
||||
use syntax::ast::{Attribute, Name, NodeId};
|
||||
use syntax::attr::ThinAttributesExt;
|
||||
use rustc_front::hir as ast;
|
||||
use hir as ast;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use hir::intravisit::FnKind;
|
||||
|
||||
/// 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).
|
@ -11,9 +11,8 @@
|
||||
use super::*;
|
||||
use super::MapEntry::*;
|
||||
|
||||
use rustc_front::hir::*;
|
||||
use rustc_front::util;
|
||||
use rustc_front::intravisit::{self, Visitor};
|
||||
use hir::*;
|
||||
use hir::intravisit::Visitor;
|
||||
use middle::def_id::{CRATE_DEF_INDEX, DefId, DefIndex};
|
||||
use std::iter::repeat;
|
||||
use syntax::ast::{NodeId, CRATE_NODE_ID, DUMMY_NODE_ID};
|
@ -27,10 +27,9 @@ use syntax::attr::ThinAttributesExt;
|
||||
use syntax::codemap::{Span, Spanned};
|
||||
use syntax::parse::token;
|
||||
|
||||
use rustc_front::hir::*;
|
||||
use rustc_front::fold::Folder;
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::print::pprust;
|
||||
use hir::*;
|
||||
use hir::fold::Folder;
|
||||
use hir::print as pprust;
|
||||
|
||||
use arena::TypedArena;
|
||||
use std::cell::RefCell;
|
@ -33,8 +33,6 @@ pub use self::ViewPath_::*;
|
||||
pub use self::Visibility::*;
|
||||
pub use self::PathParameters::*;
|
||||
|
||||
use intravisit::Visitor;
|
||||
use std::collections::BTreeMap;
|
||||
use syntax::codemap::{self, Span, Spanned, DUMMY_SP, ExpnId};
|
||||
use syntax::abi::Abi;
|
||||
use syntax::ast::{Name, NodeId, DUMMY_NODE_ID, TokenTree, AsmDialect};
|
||||
@ -43,9 +41,7 @@ use syntax::attr::{ThinAttributes, ThinAttributesExt};
|
||||
use syntax::parse::token::InternedString;
|
||||
use syntax::ptr::P;
|
||||
|
||||
use print::pprust;
|
||||
use util;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use serialize::{Encodable, Decodable, Encoder, Decoder};
|
||||
@ -66,6 +62,15 @@ macro_rules! hir_vec {
|
||||
($($x:expr,)*) => (vec![$($x),*])
|
||||
}
|
||||
|
||||
pub mod check_attr;
|
||||
pub mod fold;
|
||||
pub mod intravisit;
|
||||
pub mod lowering;
|
||||
pub mod map;
|
||||
pub mod print;
|
||||
pub mod svh;
|
||||
pub mod util;
|
||||
|
||||
/// Identifier in HIR
|
||||
#[derive(Clone, Copy, Eq)]
|
||||
pub struct Ident {
|
||||
@ -135,7 +140,7 @@ impl fmt::Debug for Lifetime {
|
||||
write!(f,
|
||||
"lifetime({}: {})",
|
||||
self.id,
|
||||
pprust::lifetime_to_string(self))
|
||||
print::lifetime_to_string(self))
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,13 +166,13 @@ pub struct Path {
|
||||
|
||||
impl fmt::Debug for Path {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "path({})", pprust::path_to_string(self))
|
||||
write!(f, "path({})", print::path_to_string(self))
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Path {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", pprust::path_to_string(self))
|
||||
write!(f, "{}", print::path_to_string(self))
|
||||
}
|
||||
}
|
||||
|
||||
@ -434,7 +439,9 @@ impl Crate {
|
||||
/// follows lexical scoping rules -- then you want a different
|
||||
/// approach. You should override `visit_nested_item` in your
|
||||
/// visitor and then call `intravisit::walk_crate` instead.
|
||||
pub fn visit_all_items<'hir, V:Visitor<'hir>>(&'hir self, visitor: &mut V) {
|
||||
pub fn visit_all_items<'hir, V>(&'hir self, visitor: &mut V)
|
||||
where V: intravisit::Visitor<'hir>
|
||||
{
|
||||
for (_, item) in &self.items {
|
||||
visitor.visit_item(item);
|
||||
}
|
||||
@ -479,7 +486,7 @@ pub struct Pat {
|
||||
|
||||
impl fmt::Debug for Pat {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "pat({}: {})", self.id, pprust::pat_to_string(self))
|
||||
write!(f, "pat({}: {})", self.id, print::pat_to_string(self))
|
||||
}
|
||||
}
|
||||
|
||||
@ -619,7 +626,7 @@ impl fmt::Debug for Stmt_ {
|
||||
write!(f,
|
||||
"stmt({}: {})",
|
||||
util::stmt_id(&spanned),
|
||||
pprust::stmt_to_string(&spanned))
|
||||
print::stmt_to_string(&spanned))
|
||||
}
|
||||
}
|
||||
|
||||
@ -722,7 +729,7 @@ pub struct Expr {
|
||||
|
||||
impl fmt::Debug for Expr {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "expr({}: {})", self.id, pprust::expr_to_string(self))
|
||||
write!(f, "expr({}: {})", self.id, print::expr_to_string(self))
|
||||
}
|
||||
}
|
||||
|
||||
@ -940,7 +947,7 @@ pub struct Ty {
|
||||
|
||||
impl fmt::Debug for Ty {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "type({})", pprust::ty_to_string(self))
|
||||
write!(f, "type({})", print::ty_to_string(self))
|
||||
}
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ impl<'a> State<'a> {
|
||||
|
||||
pub fn print_variant(&mut self, v: &hir::Variant) -> io::Result<()> {
|
||||
self.head("")?;
|
||||
let generics = ::util::empty_generics();
|
||||
let generics = hir::util::empty_generics();
|
||||
self.print_struct(&v.node.data, &generics, v.node.name, v.span, false)?;
|
||||
match v.node.disr_expr {
|
||||
Some(ref d) => {
|
||||
@ -1285,12 +1285,12 @@ impl<'a> State<'a> {
|
||||
-> io::Result<()> {
|
||||
self.print_expr(lhs)?;
|
||||
space(&mut self.s)?;
|
||||
self.word_space(::util::binop_to_string(op.node))?;
|
||||
self.word_space(hir::util::binop_to_string(op.node))?;
|
||||
self.print_expr(rhs)
|
||||
}
|
||||
|
||||
fn print_expr_unary(&mut self, op: hir::UnOp, expr: &hir::Expr) -> io::Result<()> {
|
||||
word(&mut self.s, ::util::unop_to_string(op))?;
|
||||
word(&mut self.s, hir::util::unop_to_string(op))?;
|
||||
self.print_expr_maybe_paren(expr)
|
||||
}
|
||||
|
||||
@ -1434,7 +1434,7 @@ impl<'a> State<'a> {
|
||||
hir::ExprAssignOp(op, ref lhs, ref rhs) => {
|
||||
self.print_expr(&lhs)?;
|
||||
space(&mut self.s)?;
|
||||
word(&mut self.s, ::util::binop_to_string(op.node))?;
|
||||
word(&mut self.s, hir::util::binop_to_string(op.node))?;
|
||||
self.word_space("=")?;
|
||||
self.print_expr(&rhs)?;
|
||||
}
|
@ -48,8 +48,8 @@
|
||||
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, SipHasher, Hasher};
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit as visit;
|
||||
use hir;
|
||||
use hir::intravisit as visit;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct Svh {
|
||||
@ -134,10 +134,10 @@ mod svh_visitor {
|
||||
use syntax::ast::{self, Name, NodeId};
|
||||
use syntax::codemap::Span;
|
||||
use syntax::parse::token;
|
||||
use rustc_front::intravisit as visit;
|
||||
use rustc_front::intravisit::{Visitor, FnKind};
|
||||
use rustc_front::hir::*;
|
||||
use rustc_front::hir;
|
||||
use hir::intravisit as visit;
|
||||
use hir::intravisit::{Visitor, FnKind};
|
||||
use hir::*;
|
||||
use hir;
|
||||
|
||||
use std::hash::{Hash, SipHasher};
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
use hir;
|
||||
use hir::*;
|
||||
use intravisit::{self, Visitor, FnKind};
|
||||
use hir::intravisit::{Visitor, FnKind};
|
||||
use syntax::ast_util;
|
||||
use syntax::ast::{Name, NodeId, DUMMY_NODE_ID};
|
||||
use syntax::codemap::Span;
|
@ -73,9 +73,9 @@ use super::region_inference::SameRegions;
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use front::map as ast_map;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::print::pprust;
|
||||
use hir::map as ast_map;
|
||||
use hir;
|
||||
use hir::print as pprust;
|
||||
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::def::Def;
|
||||
|
@ -19,7 +19,7 @@ pub use self::freshen::TypeFreshener;
|
||||
pub use self::region_inference::{GenericKind, VerifyBound};
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
use middle::free_region::FreeRegionMap;
|
||||
use middle::mem_categorization as mc;
|
||||
use middle::mem_categorization::McResult;
|
||||
|
@ -38,6 +38,7 @@
|
||||
#![feature(rustc_private)]
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(step_by)]
|
||||
#![feature(str_char)]
|
||||
#![feature(question_mark)]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
@ -51,7 +52,6 @@ extern crate graphviz;
|
||||
extern crate libc;
|
||||
extern crate rbml;
|
||||
extern crate rustc_back;
|
||||
extern crate rustc_front;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate serialize;
|
||||
extern crate collections;
|
||||
@ -72,19 +72,9 @@ mod macros;
|
||||
// registered before they are used.
|
||||
pub mod diagnostics;
|
||||
|
||||
pub mod back {
|
||||
pub use rustc_back::rpath;
|
||||
pub use rustc_back::svh;
|
||||
}
|
||||
|
||||
pub mod cfg;
|
||||
pub mod dep_graph;
|
||||
|
||||
pub mod front {
|
||||
pub mod check_attr;
|
||||
pub mod map;
|
||||
}
|
||||
|
||||
pub mod hir;
|
||||
pub mod infer;
|
||||
pub mod lint;
|
||||
|
||||
|
@ -46,9 +46,9 @@ use syntax::errors::DiagnosticBuilder;
|
||||
use syntax::parse::token::InternedString;
|
||||
use syntax::ast;
|
||||
use syntax::attr::ThinAttributesExt;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::util;
|
||||
use rustc_front::intravisit as hir_visit;
|
||||
use hir;
|
||||
use hir::util;
|
||||
use hir::intravisit as hir_visit;
|
||||
use syntax::visit as ast_visit;
|
||||
|
||||
/// Information about the registered lints.
|
||||
|
@ -34,10 +34,10 @@ pub use self::LintSource::*;
|
||||
use std::hash;
|
||||
use std::ascii::AsciiExt;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use hir::intravisit::FnKind;
|
||||
use syntax::visit as ast_visit;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
pub use lint::context::{LateContext, EarlyContext, LintContext, LintStore,
|
||||
raw_emit_lint, check_crate, check_ast_crate, gather_attrs,
|
||||
|
@ -18,7 +18,7 @@ use middle::def::Def;
|
||||
use ty::{Ty, TyCtxt};
|
||||
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir as ast;
|
||||
use hir as ast;
|
||||
|
||||
pub fn prohibit_type_params(tcx: &TyCtxt, segments: &[ast::PathSegment]) {
|
||||
for segment in segments {
|
||||
|
@ -22,8 +22,8 @@
|
||||
// are *mostly* used as a part of that interface, but these should
|
||||
// probably get a better home if someone can find one.
|
||||
|
||||
use back::svh::Svh;
|
||||
use front::map as hir_map;
|
||||
use hir::svh::Svh;
|
||||
use hir::map as hir_map;
|
||||
use middle::def::{self, Def};
|
||||
use middle::lang_items;
|
||||
use ty::{self, Ty, TyCtxt, VariantKind};
|
||||
@ -44,9 +44,9 @@ use syntax::codemap::Span;
|
||||
use syntax::ptr::P;
|
||||
use syntax::parse::token::InternedString;
|
||||
use rustc_back::target::Target;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc_front::util::IdVisitor;
|
||||
use hir;
|
||||
use hir::intravisit::Visitor;
|
||||
use hir::util::IdVisitor;
|
||||
|
||||
pub use self::DefLike::{DlDef, DlField, DlImpl};
|
||||
pub use self::NativeLibraryKind::{NativeStatic, NativeFramework, NativeUnknown};
|
||||
|
@ -25,9 +25,9 @@ use syntax::ast_util::IdRange;
|
||||
use syntax::print::pp;
|
||||
use syntax::print::pprust::PrintState;
|
||||
use util::nodemap::NodeMap;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::print::pprust;
|
||||
use hir;
|
||||
use hir::intravisit;
|
||||
use hir::print as pprust;
|
||||
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -13,9 +13,9 @@
|
||||
// from live codes are live, and everything else is dead.
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map as ast_map;
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc_front::intravisit::{self, Visitor};
|
||||
use hir::map as ast_map;
|
||||
use hir::{self, PatKind};
|
||||
use hir::intravisit::{self, Visitor};
|
||||
|
||||
use middle::{pat_util, privacy};
|
||||
use ty::{self, TyCtxt};
|
||||
|
@ -12,7 +12,7 @@ use middle::def_id::DefId;
|
||||
use ty::subst::ParamSpace;
|
||||
use util::nodemap::NodeMap;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||
pub enum Def {
|
||||
|
@ -19,9 +19,9 @@ use ty::MethodCall;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::intravisit::{FnKind, Visitor};
|
||||
use hir;
|
||||
use hir::intravisit;
|
||||
use hir::intravisit::{FnKind, Visitor};
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
struct UnsafeContext {
|
||||
|
@ -10,15 +10,15 @@
|
||||
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map as ast_map;
|
||||
use hir::map as ast_map;
|
||||
use middle::def_id::{CRATE_DEF_INDEX};
|
||||
use session::{config, Session};
|
||||
use syntax::ast::NodeId;
|
||||
use syntax::attr;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::entry::EntryPointType;
|
||||
use rustc_front::hir::{Item, ItemFn};
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use hir::{Item, ItemFn};
|
||||
use hir::intravisit::Visitor;
|
||||
|
||||
struct EntryContext<'a, 'tcx: 'a> {
|
||||
session: &'a Session,
|
||||
|
@ -26,7 +26,7 @@ use infer;
|
||||
use middle::mem_categorization as mc;
|
||||
use ty::{self, TyCtxt, adjustment};
|
||||
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use hir::{self, PatKind};
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::ptr::P;
|
||||
@ -479,7 +479,7 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> {
|
||||
}
|
||||
|
||||
hir::ExprUnary(op, ref lhs) => {
|
||||
let pass_args = if ::rustc_front::util::is_by_value_unop(op) {
|
||||
let pass_args = if hir::util::is_by_value_unop(op) {
|
||||
PassArgs::ByValue
|
||||
} else {
|
||||
PassArgs::ByRef
|
||||
@ -491,7 +491,7 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> {
|
||||
}
|
||||
|
||||
hir::ExprBinary(op, ref lhs, ref rhs) => {
|
||||
let pass_args = if ::rustc_front::util::is_by_value_binop(op.node) {
|
||||
let pass_args = if hir::util::is_by_value_binop(op.node) {
|
||||
PassArgs::ByValue
|
||||
} else {
|
||||
PassArgs::ByRef
|
||||
@ -524,7 +524,7 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> {
|
||||
|
||||
hir::ExprAssignOp(op, ref lhs, ref rhs) => {
|
||||
// NB All our assignment operations take the RHS by value
|
||||
assert!(::rustc_front::util::is_by_value_binop(op.node));
|
||||
assert!(hir::util::is_by_value_binop(op.node));
|
||||
|
||||
if !self.walk_overloaded_operator(expr, lhs, vec![rhs], PassArgs::ByValue) {
|
||||
self.mutate_expr(expr, &lhs, MutateMode::WriteAndRead);
|
||||
|
@ -20,8 +20,8 @@ use std::fmt;
|
||||
use syntax::abi::Abi::RustIntrinsic;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::intravisit::{self, Visitor, FnKind};
|
||||
use rustc_front::hir;
|
||||
use hir::intravisit::{self, Visitor, FnKind};
|
||||
use hir;
|
||||
|
||||
pub fn check_crate(tcx: &TyCtxt) {
|
||||
let mut visitor = IntrinsicCheckingVisitor {
|
||||
|
@ -22,7 +22,7 @@
|
||||
pub use self::LangItem::*;
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map as hir_map;
|
||||
use hir::map as hir_map;
|
||||
use session::Session;
|
||||
use middle::cstore::CrateStore;
|
||||
use middle::def_id::DefId;
|
||||
@ -33,8 +33,8 @@ use util::nodemap::FnvHashMap;
|
||||
use syntax::ast;
|
||||
use syntax::attr::AttrMetaMethods;
|
||||
use syntax::parse::token::InternedString;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc_front::hir;
|
||||
use hir::intravisit::Visitor;
|
||||
use hir;
|
||||
|
||||
// The actual lang items defined come at the end of this file in one handy table.
|
||||
// So you probably just want to nip down to the end.
|
||||
|
@ -128,10 +128,10 @@ use syntax::codemap::{BytePos, original_sp, Span};
|
||||
use syntax::parse::token::special_idents;
|
||||
use syntax::ptr::P;
|
||||
|
||||
use rustc_front::hir::Expr;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::print::pprust::{expr_to_string, block_to_string};
|
||||
use rustc_front::intravisit::{self, Visitor, FnKind};
|
||||
use hir::Expr;
|
||||
use hir;
|
||||
use hir::print::{expr_to_string, block_to_string};
|
||||
use hir::intravisit::{self, Visitor, FnKind};
|
||||
|
||||
/// For use with `propagate_through_loop`.
|
||||
enum LoopKind<'a> {
|
||||
@ -484,7 +484,7 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) {
|
||||
ir.add_live_node_for_node(expr.id, ExprNode(expr.span));
|
||||
intravisit::walk_expr(ir, expr);
|
||||
}
|
||||
hir::ExprBinary(op, _, _) if ::rustc_front::util::lazy_binop(op.node) => {
|
||||
hir::ExprBinary(op, _, _) if hir::util::lazy_binop(op.node) => {
|
||||
ir.add_live_node_for_node(expr.id, ExprNode(expr.span));
|
||||
intravisit::walk_expr(ir, expr);
|
||||
}
|
||||
@ -1142,7 +1142,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
||||
self.propagate_through_exprs(&exprs[..], succ)
|
||||
}
|
||||
|
||||
hir::ExprBinary(op, ref l, ref r) if ::rustc_front::util::lazy_binop(op.node) => {
|
||||
hir::ExprBinary(op, ref l, ref r) if hir::util::lazy_binop(op.node) => {
|
||||
let r_succ = self.propagate_through_expr(&r, succ);
|
||||
|
||||
let ln = self.live_node(expr.id, expr.span);
|
||||
|
@ -72,15 +72,15 @@ pub use self::deref_kind::*;
|
||||
use self::Aliasability::*;
|
||||
|
||||
use middle::def_id::DefId;
|
||||
use front::map as ast_map;
|
||||
use hir::map as ast_map;
|
||||
use infer;
|
||||
use middle::const_qualif::ConstQualif;
|
||||
use middle::def::Def;
|
||||
use ty::adjustment;
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
|
||||
use rustc_front::hir::{MutImmutable, MutMutable, PatKind};
|
||||
use rustc_front::hir;
|
||||
use hir::{MutImmutable, MutMutable, PatKind};
|
||||
use hir;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
||||
|
@ -14,8 +14,8 @@ use ty::TyCtxt;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
||||
use syntax::ast;
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc_front::util::walk_pat;
|
||||
use hir::{self, PatKind};
|
||||
use hir::util::walk_pat;
|
||||
use syntax::codemap::{respan, Span, Spanned, DUMMY_SP};
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
@ -16,7 +16,7 @@
|
||||
// reachable as well.
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map as ast_map;
|
||||
use hir::map as ast_map;
|
||||
use middle::def::Def;
|
||||
use middle::def_id::DefId;
|
||||
use ty::{self, TyCtxt};
|
||||
@ -28,9 +28,9 @@ use std::collections::HashSet;
|
||||
use syntax::abi::Abi;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc_front::intravisit;
|
||||
use hir;
|
||||
use hir::intravisit::Visitor;
|
||||
use hir::intravisit;
|
||||
|
||||
// Returns true if the given set of generics implies that the item it's
|
||||
// associated with must be inlined.
|
||||
|
@ -17,7 +17,7 @@
|
||||
//! `middle/infer/region_inference/README.md`
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map as ast_map;
|
||||
use hir::map as ast_map;
|
||||
use session::Session;
|
||||
use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
|
||||
use middle::cstore::InlinedItem;
|
||||
@ -30,10 +30,10 @@ use std::mem;
|
||||
use syntax::codemap::{self, Span};
|
||||
use syntax::ast::{self, NodeId};
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::{self, Visitor, FnKind};
|
||||
use rustc_front::hir::{Block, Item, FnDecl, Arm, Pat, PatKind, Stmt, Expr, Local};
|
||||
use rustc_front::util::stmt_id;
|
||||
use hir;
|
||||
use hir::intravisit::{self, Visitor, FnKind};
|
||||
use hir::{Block, Item, FnDecl, Arm, Pat, PatKind, Stmt, Expr, Local};
|
||||
use hir::util::stmt_id;
|
||||
|
||||
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
|
||||
RustcDecodable, Copy)]
|
||||
|
@ -19,7 +19,7 @@ pub use self::DefRegion::*;
|
||||
use self::ScopeChain::*;
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map::Map;
|
||||
use hir::map::Map;
|
||||
use session::Session;
|
||||
use middle::def::{Def, DefMap};
|
||||
use middle::region;
|
||||
@ -32,9 +32,9 @@ use syntax::codemap::Span;
|
||||
use syntax::parse::token::special_idents;
|
||||
use util::nodemap::NodeMap;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::print::pprust::lifetime_to_string;
|
||||
use rustc_front::intravisit::{self, Visitor, FnKind};
|
||||
use hir;
|
||||
use hir::print::lifetime_to_string;
|
||||
use hir::intravisit::{self, Visitor, FnKind};
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug)]
|
||||
pub enum DefRegion {
|
||||
|
@ -14,7 +14,7 @@
|
||||
pub use self::StabilityLevel::*;
|
||||
|
||||
use dep_graph::DepNode;
|
||||
use front::map as hir_map;
|
||||
use hir::map as hir_map;
|
||||
use session::Session;
|
||||
use lint;
|
||||
use middle::cstore::{CrateStore, LOCAL_CRATE};
|
||||
@ -30,9 +30,9 @@ use syntax::feature_gate::{GateIssue, emit_feature_err};
|
||||
use syntax::attr::{self, Stability, Deprecation, AttrMetaMethods};
|
||||
use util::nodemap::{DefIdMap, FnvHashSet, FnvHashMap};
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::hir::{Item, Generics, StructField, Variant, PatKind};
|
||||
use rustc_front::intravisit::{self, Visitor};
|
||||
use hir;
|
||||
use hir::{Item, Generics, StructField, Variant, PatKind};
|
||||
use hir::intravisit::{self, Visitor};
|
||||
|
||||
use std::mem::replace;
|
||||
use std::cmp::Ordering;
|
||||
|
@ -18,9 +18,9 @@ use middle::lang_items;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::parse::token::InternedString;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::hir;
|
||||
use hir::intravisit::Visitor;
|
||||
use hir::intravisit;
|
||||
use hir;
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
|
@ -16,7 +16,7 @@ use ty::subst::Substs;
|
||||
use ty::{self, AdtDef, ClosureSubsts, FnOutput, Region, Ty};
|
||||
use util::ppaux;
|
||||
use rustc_back::slice;
|
||||
use rustc_front::hir::InlineAsm;
|
||||
use hir::InlineAsm;
|
||||
use std::ascii;
|
||||
use std::borrow::{Cow};
|
||||
use std::fmt::{self, Debug, Formatter, Write};
|
||||
|
@ -17,7 +17,7 @@ use mir::repr::*;
|
||||
use ty::subst::{Subst, Substs};
|
||||
use ty::{self, AdtDef, Ty, TyCtxt};
|
||||
use ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum LvalueTy<'tcx> {
|
||||
|
@ -49,7 +49,7 @@ use std::cell::RefCell;
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
use syntax::abi::Abi;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
use util::common::ErrorReported;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
||||
|
@ -17,7 +17,7 @@ use ty::LvaluePreference::{NoPreference};
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum AutoAdjustment<'tcx> {
|
||||
|
@ -11,7 +11,7 @@
|
||||
//! type context book-keeping
|
||||
|
||||
use dep_graph::{DepGraph, DepTrackingMap};
|
||||
use front::map as ast_map;
|
||||
use hir::map as ast_map;
|
||||
use session::Session;
|
||||
use lint;
|
||||
use middle;
|
||||
@ -45,7 +45,7 @@ use syntax::ast::{self, Name, NodeId};
|
||||
use syntax::attr;
|
||||
use syntax::parse::token::{self, special_idents};
|
||||
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
/// Internal storage
|
||||
pub struct CtxtArenas<'tcx> {
|
||||
|
@ -19,7 +19,7 @@ use syntax::ast::{self, Name};
|
||||
use syntax::codemap::Span;
|
||||
use syntax::errors::DiagnosticBuilder;
|
||||
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct ExpectedFound<T> {
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use front::map::DefPathData;
|
||||
use hir::map::DefPathData;
|
||||
use middle::cstore::LOCAL_CRATE;
|
||||
use middle::def_id::{DefId, CRATE_DEF_INDEX};
|
||||
use ty::{self, Ty, TyCtxt};
|
||||
|
@ -19,8 +19,8 @@ pub use self::LvaluePreference::*;
|
||||
pub use self::fold::TypeFoldable;
|
||||
|
||||
use dep_graph::{self, DepNode};
|
||||
use front::map as ast_map;
|
||||
use front::map::LinkedPath;
|
||||
use hir::map as ast_map;
|
||||
use hir::map::LinkedPath;
|
||||
use middle;
|
||||
use middle::cstore::{self, CrateStore, LOCAL_CRATE};
|
||||
use middle::def::{self, Def, ExportMap};
|
||||
@ -52,9 +52,9 @@ use syntax::parse::token::InternedString;
|
||||
|
||||
use rustc_const_math::ConstInt;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::hir::{ItemImpl, ItemTrait, PatKind};
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use hir;
|
||||
use hir::{ItemImpl, ItemTrait, PatKind};
|
||||
use hir::intravisit::Visitor;
|
||||
|
||||
pub use self::sty::{Binder, DebruijnIndex};
|
||||
pub use self::sty::{BuiltinBound, BuiltinBounds, ExistentialBounds};
|
||||
|
@ -19,7 +19,7 @@ use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use ty::error::{ExpectedFound, TypeError};
|
||||
use std::rc::Rc;
|
||||
use syntax::abi;
|
||||
use rustc_front::hir as ast;
|
||||
use hir as ast;
|
||||
|
||||
pub type RelateResult<'tcx, T> = Result<T, TypeError<'tcx>>;
|
||||
|
||||
|
@ -17,7 +17,7 @@ use std::rc::Rc;
|
||||
use syntax::abi;
|
||||
use syntax::ptr::P;
|
||||
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Lift implementations
|
||||
|
@ -28,7 +28,7 @@ use syntax::parse::token::special_idents;
|
||||
|
||||
use serialize::{Decodable, Decoder};
|
||||
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
use self::FnOutput::*;
|
||||
use self::InferTy::*;
|
||||
|
@ -17,7 +17,7 @@ use ty::{Ty, TyCtxt, TraitRef};
|
||||
use std::borrow::{Borrow};
|
||||
use std::cell::{Cell, Ref, RefCell};
|
||||
use syntax::ast::Name;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
use util::nodemap::FnvHashMap;
|
||||
|
||||
/// As `TypeScheme` but for a trait ref.
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
//! misc. type-system utilities too small to deserve their own file
|
||||
|
||||
use back::svh::Svh;
|
||||
use hir::svh::Svh;
|
||||
use middle::def_id::DefId;
|
||||
use ty::subst;
|
||||
use infer;
|
||||
@ -28,7 +28,7 @@ use syntax::ast::{self, Name};
|
||||
use syntax::attr::{self, AttrMetaMethods, SignedInt, UnsignedInt};
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
pub trait IntTypeExt {
|
||||
fn to_ty<'tcx>(&self, cx: &TyCtxt<'tcx>) -> Ty<'tcx>;
|
||||
|
@ -19,9 +19,9 @@ use std::iter::repeat;
|
||||
use std::path::Path;
|
||||
use std::time::Instant;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use hir;
|
||||
use hir::intravisit;
|
||||
use hir::intravisit::Visitor;
|
||||
|
||||
// The name of the associated type for `Fn` return types
|
||||
pub const FN_OUTPUT_NAME: &'static str = "Output";
|
||||
|
@ -23,7 +23,7 @@ use std::fmt;
|
||||
use syntax::abi::Abi;
|
||||
use syntax::parse::token;
|
||||
use syntax::ast::CRATE_NODE_ID;
|
||||
use rustc_front::hir;
|
||||
use hir;
|
||||
|
||||
pub fn verbose() -> bool {
|
||||
ty::tls::with(|tcx| tcx.sess.verbose())
|
||||
|
@ -11,7 +11,6 @@ crate-type = ["dylib"]
|
||||
[dependencies]
|
||||
syntax = { path = "../libsyntax" }
|
||||
serialize = { path = "../libserialize" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
log = { path = "../liblog" }
|
||||
|
||||
[features]
|
||||
|
@ -45,13 +45,11 @@
|
||||
extern crate syntax;
|
||||
extern crate libc;
|
||||
extern crate serialize;
|
||||
extern crate rustc_front;
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
pub mod tempdir;
|
||||
pub mod rpath;
|
||||
pub mod sha2;
|
||||
pub mod svh;
|
||||
pub mod target;
|
||||
pub mod slice;
|
||||
pub mod dynamic_lib;
|
||||
|
@ -13,5 +13,4 @@ log = { path = "../liblog" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
graphviz = { path = "../libgraphviz" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
rustc_mir = { path = "../librustc_mir" }
|
||||
|
@ -30,7 +30,7 @@ use rustc::ty::{self, TyCtxt};
|
||||
use rustc::traits::ProjectionMode;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -23,7 +23,7 @@ use rustc::ty;
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc::hir::{self, PatKind};
|
||||
|
||||
struct GatherMoveInfo<'tcx> {
|
||||
id: ast::NodeId,
|
||||
|
@ -29,10 +29,10 @@ use rustc::traits::ProjectionMode;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::ast::NodeId;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::hir::Expr;
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc::hir;
|
||||
use rustc::hir::Expr;
|
||||
use rustc::hir::intravisit;
|
||||
use rustc::hir::intravisit::Visitor;
|
||||
|
||||
use self::restrictions::RestrictionResult;
|
||||
|
||||
|
@ -16,7 +16,7 @@ use rustc::ty;
|
||||
use syntax::ast;
|
||||
use syntax::codemap;
|
||||
use syntax::errors::DiagnosticBuilder;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
pub struct MoveErrorCollector<'tcx> {
|
||||
errors: Vec<MoveError<'tcx>>
|
||||
|
@ -13,8 +13,8 @@ use borrowck::BorrowckCtxt;
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::{FnKind};
|
||||
use rustc::hir;
|
||||
use rustc::hir::intravisit::{FnKind};
|
||||
|
||||
use rustc::mir::repr::{BasicBlock, BasicBlockData, Mir, Statement, Terminator};
|
||||
|
||||
|
@ -21,8 +21,8 @@ pub use self::MovedValueUseKind::*;
|
||||
use self::InteriorKind::*;
|
||||
|
||||
use rustc::dep_graph::DepNode;
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::front::map::blocks::FnParts;
|
||||
use rustc::hir::map as hir_map;
|
||||
use rustc::hir::map::blocks::FnParts;
|
||||
use rustc::cfg;
|
||||
use rustc::middle::dataflow::DataFlowContext;
|
||||
use rustc::middle::dataflow::BitwiseOperator;
|
||||
@ -44,11 +44,11 @@ use syntax::attr::AttrMetaMethods;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::errors::DiagnosticBuilder;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::hir::{FnDecl, Block};
|
||||
use rustc_front::intravisit;
|
||||
use rustc_front::intravisit::{Visitor, FnKind};
|
||||
use rustc_front::util as hir_util;
|
||||
use rustc::hir;
|
||||
use rustc::hir::{FnDecl, Block};
|
||||
use rustc::hir::intravisit;
|
||||
use rustc::hir::intravisit::{Visitor, FnKind};
|
||||
use rustc::hir::util as hir_util;
|
||||
|
||||
use rustc::mir::mir_map::MirMap;
|
||||
|
||||
|
@ -30,7 +30,7 @@ use std::usize;
|
||||
use syntax::ast;
|
||||
use syntax::ast_util;
|
||||
use syntax::codemap::Span;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
#[path="fragments.rs"]
|
||||
pub mod fragments;
|
||||
|
@ -34,7 +34,6 @@
|
||||
extern crate graphviz as dot;
|
||||
#[macro_use]
|
||||
extern crate rustc;
|
||||
extern crate rustc_front;
|
||||
extern crate rustc_mir;
|
||||
extern crate core; // for NonZero
|
||||
|
||||
|
@ -12,7 +12,6 @@ crate-type = ["dylib"]
|
||||
log = { path = "../liblog" }
|
||||
serialize = { path = "../libserialize" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
rustc_back = { path = "../librustc_back" }
|
||||
rustc_const_math = { path = "../librustc_const_math" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -32,17 +32,17 @@ use std::cmp::Ordering;
|
||||
use std::fmt;
|
||||
use std::iter::{FromIterator, IntoIterator, repeat};
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::hir::{Pat, PatKind};
|
||||
use rustc_front::intravisit::{self, Visitor, FnKind};
|
||||
use rustc_front::util as front_util;
|
||||
use rustc::hir;
|
||||
use rustc::hir::{Pat, PatKind};
|
||||
use rustc::hir::intravisit::{self, Visitor, FnKind};
|
||||
use rustc::hir::util as front_util;
|
||||
use rustc_back::slice;
|
||||
|
||||
use syntax::ast::{self, DUMMY_NODE_ID, NodeId};
|
||||
use syntax::ast_util;
|
||||
use syntax::codemap::{Span, Spanned, DUMMY_SP};
|
||||
use rustc_front::fold::{Folder, noop_fold_pat};
|
||||
use rustc_front::print::pprust::pat_to_string;
|
||||
use rustc::hir::fold::{Folder, noop_fold_pat};
|
||||
use rustc::hir::print::pat_to_string;
|
||||
use syntax::ptr::P;
|
||||
use rustc::util::nodemap::FnvHashMap;
|
||||
|
||||
|
@ -15,8 +15,8 @@ use rustc::middle::const_val::ConstVal;
|
||||
use self::ErrKind::*;
|
||||
use self::EvalHint::*;
|
||||
|
||||
use rustc::front::map as ast_map;
|
||||
use rustc::front::map::blocks::FnLikeNode;
|
||||
use rustc::hir::map as ast_map;
|
||||
use rustc::hir::map::blocks::FnLikeNode;
|
||||
use rustc::middle::cstore::{self, CrateStore, InlinedItem};
|
||||
use rustc::{infer, traits};
|
||||
use rustc::middle::def::Def;
|
||||
@ -31,9 +31,9 @@ use rustc::lint;
|
||||
|
||||
use graphviz::IntoCow;
|
||||
use syntax::ast;
|
||||
use rustc_front::hir::{Expr, PatKind};
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use rustc::hir::{Expr, PatKind};
|
||||
use rustc::hir;
|
||||
use rustc::hir::intravisit::FnKind;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::ptr::P;
|
||||
use syntax::codemap;
|
||||
|
@ -33,7 +33,6 @@
|
||||
#[macro_use] extern crate syntax;
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate rustc;
|
||||
extern crate rustc_front;
|
||||
extern crate rustc_back;
|
||||
extern crate rustc_const_math;
|
||||
extern crate graphviz;
|
||||
|
@ -17,7 +17,6 @@ rustc = { path = "../librustc" }
|
||||
rustc_back = { path = "../librustc_back" }
|
||||
rustc_borrowck = { path = "../librustc_borrowck" }
|
||||
rustc_const_eval = { path = "../librustc_const_eval" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
rustc_lint = { path = "../librustc_lint" }
|
||||
rustc_llvm = { path = "../librustc_llvm" }
|
||||
rustc_mir = { path = "../librustc_mir" }
|
||||
|
@ -9,8 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
use rustc::dep_graph::DepGraph;
|
||||
use rustc::front;
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::hir;
|
||||
use rustc::hir::map as hir_map;
|
||||
use rustc_mir as mir;
|
||||
use rustc::mir::mir_map::MirMap;
|
||||
use rustc::session::{Session, CompileResult, compile_result_from_err_count};
|
||||
@ -35,8 +35,7 @@ use rustc_typeck as typeck;
|
||||
use rustc_privacy;
|
||||
use rustc_plugin::registry::Registry;
|
||||
use rustc_plugin as plugin;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::lowering::{lower_crate, LoweringContext};
|
||||
use rustc::hir::lowering::{lower_crate, LoweringContext};
|
||||
use rustc_passes::{no_asm, loops, consts, const_fn, rvalues, static_recursion};
|
||||
use rustc_const_eval::check_match;
|
||||
use super::Compilation;
|
||||
@ -155,7 +154,7 @@ pub fn compile_input(sess: &Session,
|
||||
}
|
||||
|
||||
time(sess.time_passes(), "attribute checking", || {
|
||||
front::check_attr::check_crate(sess, &expanded_crate);
|
||||
hir::check_attr::check_crate(sess, &expanded_crate);
|
||||
});
|
||||
|
||||
time(sess.time_passes(),
|
||||
|
@ -42,7 +42,6 @@ extern crate rustc_back;
|
||||
extern crate rustc_borrowck;
|
||||
extern crate rustc_const_eval;
|
||||
extern crate rustc_passes;
|
||||
extern crate rustc_front;
|
||||
extern crate rustc_lint;
|
||||
extern crate rustc_plugin;
|
||||
extern crate rustc_privacy;
|
||||
|
@ -50,11 +50,11 @@ use std::option;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::front::map::{blocks, NodePrinter};
|
||||
use rustc_front::hir;
|
||||
use rustc_front::lowering::{lower_crate, LoweringContext};
|
||||
use rustc_front::print::pprust as pprust_hir;
|
||||
use rustc::hir::map as hir_map;
|
||||
use rustc::hir::map::{blocks, NodePrinter};
|
||||
use rustc::hir;
|
||||
use rustc::hir::lowering::{lower_crate, LoweringContext};
|
||||
use rustc::hir::print as pprust_hir;
|
||||
|
||||
use rustc::mir::mir_map::MirMap;
|
||||
|
||||
|
@ -27,7 +27,7 @@ use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use rustc::ty::relate::TypeRelation;
|
||||
use rustc::infer::{self, InferOk, InferResult, TypeOrigin};
|
||||
use rustc_metadata::cstore::CStore;
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::hir::map as hir_map;
|
||||
use rustc::session::{self, config};
|
||||
use std::rc::Rc;
|
||||
use syntax::ast;
|
||||
@ -39,8 +39,8 @@ use syntax::errors::{Level, RenderSpan};
|
||||
use syntax::parse::token;
|
||||
use syntax::feature_gate::UnstableFeatures;
|
||||
|
||||
use rustc_front::lowering::{lower_crate, LoweringContext};
|
||||
use rustc_front::hir;
|
||||
use rustc::hir::lowering::{lower_crate, LoweringContext};
|
||||
use rustc::hir;
|
||||
|
||||
struct Env<'a, 'tcx: 'a> {
|
||||
infcx: &'a infer::InferCtxt<'a, 'tcx>,
|
||||
|
@ -1,15 +0,0 @@
|
||||
[package]
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "rustc_front"
|
||||
version = "0.0.0"
|
||||
|
||||
[lib]
|
||||
name = "rustc_front"
|
||||
path = "lib.rs"
|
||||
crate-type = ["dylib"]
|
||||
|
||||
[dependencies]
|
||||
log = { path = "../liblog" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
serialize = { path = "../libserialize" }
|
||||
rustc_bitflags = { path = "../librustc_bitflags" }
|
@ -1,58 +0,0 @@
|
||||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The Rust compiler.
|
||||
//!
|
||||
//! # Note
|
||||
//!
|
||||
//! This API is completely unstable and subject to change.
|
||||
|
||||
#![crate_name = "rustc_front"]
|
||||
#![unstable(feature = "rustc_private", issue = "27812")]
|
||||
#![crate_type = "dylib"]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||
#![cfg_attr(not(stage0), deny(warnings))]
|
||||
|
||||
#![feature(associated_consts)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(quote)]
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(str_char)]
|
||||
#![feature(question_mark)]
|
||||
|
||||
extern crate serialize;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate syntax;
|
||||
#[macro_use]
|
||||
#[no_link]
|
||||
extern crate rustc_bitflags;
|
||||
|
||||
extern crate serialize as rustc_serialize; // used by deriving
|
||||
|
||||
#[macro_use]
|
||||
pub mod hir;
|
||||
pub mod lowering;
|
||||
pub mod fold;
|
||||
pub mod intravisit;
|
||||
pub mod util;
|
||||
|
||||
pub mod print {
|
||||
pub mod pprust;
|
||||
}
|
@ -13,5 +13,4 @@ log = { path = "../liblog" }
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_back = { path = "../librustc_back" }
|
||||
rustc_const_eval = { path = "../librustc_const_eval" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -17,8 +17,8 @@ use syntax::ast;
|
||||
use syntax::attr::{self, AttrMetaMethods};
|
||||
use syntax::codemap::Span;
|
||||
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use rustc::hir::{self, PatKind};
|
||||
use rustc::hir::intravisit::FnKind;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub enum MethodLateContext {
|
||||
|
@ -37,7 +37,7 @@ use rustc::ty::subst::Substs;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::adjustment;
|
||||
use rustc::traits::{self, ProjectionMode};
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::hir::map as hir_map;
|
||||
use util::nodemap::{NodeSet};
|
||||
use lint::{Level, LateContext, LintContext, LintArray, Lint};
|
||||
use lint::{LintPass, LateLintPass};
|
||||
@ -48,8 +48,8 @@ use syntax::{ast};
|
||||
use syntax::attr::{self, AttrMetaMethods};
|
||||
use syntax::codemap::{self, Span};
|
||||
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use rustc::hir::{self, PatKind};
|
||||
use rustc::hir::intravisit::FnKind;
|
||||
|
||||
use bad_style::{MethodLateContext, method_context};
|
||||
|
||||
|
@ -44,7 +44,6 @@ extern crate syntax;
|
||||
extern crate rustc;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate rustc_front;
|
||||
extern crate rustc_back;
|
||||
extern crate rustc_const_eval;
|
||||
|
||||
|
@ -29,8 +29,8 @@ use syntax::abi::Abi;
|
||||
use syntax::attr::{self, AttrMetaMethods};
|
||||
use syntax::codemap::{self, Span};
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::util::is_shift_binop;
|
||||
use rustc::hir;
|
||||
use rustc::hir::util::is_shift_binop;
|
||||
|
||||
register_long_diagnostics! {
|
||||
E0519: r##"
|
||||
|
@ -24,8 +24,8 @@ use syntax::feature_gate::{KNOWN_ATTRIBUTES, AttributeType};
|
||||
use syntax::ptr::P;
|
||||
|
||||
use rustc_back::slice;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::intravisit::FnKind;
|
||||
use rustc::hir;
|
||||
use rustc::hir::intravisit::FnKind;
|
||||
|
||||
declare_lint! {
|
||||
pub UNUSED_MUT,
|
||||
|
@ -16,7 +16,6 @@ rustc = { path = "../librustc" }
|
||||
rustc_back = { path = "../librustc_back" }
|
||||
rustc_bitflags = { path = "../librustc_bitflags" }
|
||||
rustc_const_math = { path = "../librustc_const_math" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
rustc_llvm = { path = "../librustc_llvm" }
|
||||
serialize = { path = "../libserialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -12,12 +12,12 @@
|
||||
// FIXME: remove this after snapshot, and Results are handled
|
||||
#![allow(unused_must_use)]
|
||||
|
||||
use rustc::front::map as ast_map;
|
||||
use rustc::hir::map as ast_map;
|
||||
use rustc::session::Session;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc_front::fold;
|
||||
use rustc_front::fold::Folder;
|
||||
use rustc::hir;
|
||||
use rustc::hir::fold;
|
||||
use rustc::hir::fold::Folder;
|
||||
|
||||
use common as c;
|
||||
use cstore;
|
||||
@ -55,8 +55,8 @@ use serialize::EncoderHelpers;
|
||||
#[cfg(test)] use std::io::Cursor;
|
||||
#[cfg(test)] use syntax::parse;
|
||||
#[cfg(test)] use syntax::ast::NodeId;
|
||||
#[cfg(test)] use rustc_front::print::pprust;
|
||||
#[cfg(test)] use rustc_front::lowering::{lower_item, LoweringContext};
|
||||
#[cfg(test)] use rustc::hir::print as pprust;
|
||||
#[cfg(test)] use rustc::hir::lowering::{lower_item, LoweringContext};
|
||||
|
||||
struct DecodeContext<'a, 'b, 'tcx: 'a> {
|
||||
tcx: &'a TyCtxt<'tcx>,
|
||||
@ -168,7 +168,7 @@ pub fn decode_inlined_item<'tcx>(cdata: &cstore::crate_metadata,
|
||||
copy_item_types(dcx, ii, orig_did);
|
||||
if let InlinedItem::Item(ref i) = *ii {
|
||||
debug!(">>> DECODED ITEM >>>\n{}\n<<< DECODED ITEM <<<",
|
||||
::rustc_front::print::pprust::item_to_string(&i));
|
||||
::rustc::hir::print::item_to_string(&i));
|
||||
}
|
||||
|
||||
ii
|
||||
|
@ -17,13 +17,13 @@ use cstore::{self, CStore, CrateSource, MetadataBlob};
|
||||
use decoder;
|
||||
use loader::{self, CratePaths};
|
||||
|
||||
use rustc::back::svh::Svh;
|
||||
use rustc::hir::svh::Svh;
|
||||
use rustc::dep_graph::DepNode;
|
||||
use rustc::session::{config, Session};
|
||||
use rustc::session::search_paths::PathKind;
|
||||
use rustc::middle::cstore::{CrateStore, validate_crate_name, ExternCrate};
|
||||
use rustc::util::nodemap::FnvHashMap;
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::hir::map as hir_map;
|
||||
|
||||
use std::cell::{RefCell, Cell};
|
||||
use std::path::PathBuf;
|
||||
@ -37,8 +37,8 @@ use syntax::parse;
|
||||
use syntax::attr;
|
||||
use syntax::attr::AttrMetaMethods;
|
||||
use syntax::parse::token::InternedString;
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir::intravisit::Visitor;
|
||||
use rustc::hir;
|
||||
use log;
|
||||
|
||||
pub struct LocalCrateReader<'a, 'b:'a> {
|
||||
|
@ -20,7 +20,7 @@ use middle::lang_items;
|
||||
use rustc::ty::{self, Ty, TyCtxt, VariantKind};
|
||||
use middle::def_id::{DefId, DefIndex, CRATE_DEF_INDEX};
|
||||
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::hir::map as hir_map;
|
||||
use rustc::mir::repr::Mir;
|
||||
use rustc::mir::mir_map::MirMap;
|
||||
use rustc::util::nodemap::{FnvHashMap, NodeMap, NodeSet, DefIdMap};
|
||||
@ -31,9 +31,9 @@ use std::path::PathBuf;
|
||||
use syntax::ast;
|
||||
use syntax::attr;
|
||||
use syntax::parse::token;
|
||||
use rustc_back::svh::Svh;
|
||||
use rustc::hir::svh::Svh;
|
||||
use rustc_back::target::Target;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
impl<'tcx> CrateStore<'tcx> for cstore::CStore {
|
||||
fn stability(&self, def: DefId) -> Option<attr::Stability>
|
||||
@ -552,7 +552,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
|
||||
let mut visible_parent_map = self.visible_parent_map.borrow_mut();
|
||||
if !visible_parent_map.is_empty() { return visible_parent_map; }
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
use rustc::middle::cstore::{CrateStore, ChildItem};
|
||||
use std::collections::vec_deque::VecDeque;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
@ -20,7 +20,7 @@ use decoder;
|
||||
use index;
|
||||
use loader;
|
||||
|
||||
use rustc::back::svh::Svh;
|
||||
use rustc::hir::svh::Svh;
|
||||
use rustc::middle::cstore::{ExternCrate};
|
||||
use rustc::util::nodemap::{FnvHashMap, NodeMap, NodeSet, DefIdMap};
|
||||
use rustc::middle::def_id::DefId;
|
||||
|
@ -22,10 +22,10 @@ use index;
|
||||
use tls_context;
|
||||
use tydecode::TyDecoder;
|
||||
|
||||
use rustc::back::svh::Svh;
|
||||
use rustc::front::map as hir_map;
|
||||
use rustc::hir::svh::Svh;
|
||||
use rustc::hir::map as hir_map;
|
||||
use rustc::util::nodemap::FnvHashMap;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
use middle::cstore::{LOCAL_CRATE, FoundAst, InlinedItem, LinkagePreference};
|
||||
use middle::cstore::{DefLike, DlDef, DlField, DlImpl, tls};
|
||||
|
@ -30,9 +30,9 @@ use rustc::traits::specialization_graph;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc::ty::util::IntTypeExt;
|
||||
|
||||
use rustc::back::svh::Svh;
|
||||
use rustc::front::map::{LinkedPath, PathElem, PathElems};
|
||||
use rustc::front::map as ast_map;
|
||||
use rustc::hir::svh::Svh;
|
||||
use rustc::hir::map::{LinkedPath, PathElem, PathElems};
|
||||
use rustc::hir::map as ast_map;
|
||||
use rustc::mir::mir_map::MirMap;
|
||||
use rustc::session::config;
|
||||
use rustc::util::nodemap::{FnvHashMap, NodeMap, NodeSet};
|
||||
@ -52,9 +52,9 @@ use syntax::errors::Handler;
|
||||
use syntax;
|
||||
use rbml::writer::Encoder;
|
||||
|
||||
use rustc_front::hir::{self, PatKind};
|
||||
use rustc_front::intravisit::Visitor;
|
||||
use rustc_front::intravisit;
|
||||
use rustc::hir::{self, PatKind};
|
||||
use rustc::hir::intravisit::Visitor;
|
||||
use rustc::hir::intravisit;
|
||||
|
||||
pub struct EncodeContext<'a, 'tcx: 'a> {
|
||||
pub diag: &'a Handler,
|
||||
|
@ -36,7 +36,6 @@ extern crate serialize;
|
||||
#[macro_use]
|
||||
extern crate rustc;
|
||||
extern crate rustc_back;
|
||||
extern crate rustc_front;
|
||||
extern crate rustc_llvm;
|
||||
extern crate rustc_const_math;
|
||||
|
||||
|
@ -216,7 +216,7 @@ use cstore::{MetadataBlob, MetadataVec, MetadataArchive};
|
||||
use decoder;
|
||||
use encoder;
|
||||
|
||||
use rustc::back::svh::Svh;
|
||||
use rustc::hir::svh::Svh;
|
||||
use rustc::session::Session;
|
||||
use rustc::session::filesearch::{FileSearch, FileMatches, FileDoesntMatch};
|
||||
use rustc::session::search_paths::PathKind;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
use middle::def_id::{DefId, DefIndex};
|
||||
use middle::region;
|
||||
|
@ -25,7 +25,7 @@ use rustc::ty::ParamTy;
|
||||
use rustc::ty::{self, Ty, TyCtxt};
|
||||
use rustc::util::nodemap::FnvHashMap;
|
||||
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
use syntax::abi::Abi;
|
||||
use syntax::ast;
|
||||
|
@ -16,5 +16,4 @@ rustc_back = { path = "../librustc_back" }
|
||||
rustc_const_eval = { path = "../librustc_const_eval" }
|
||||
rustc_const_math = { path = "../librustc_const_math" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_front = { path = "../librustc_front" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
|
@ -11,7 +11,7 @@
|
||||
use build::{BlockAnd, BlockAndExtension, Builder};
|
||||
use hair::*;
|
||||
use rustc::mir::repr::*;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
|
||||
impl<'a,'tcx> Builder<'a,'tcx> {
|
||||
pub fn ast_block(&mut self,
|
||||
|
@ -13,7 +13,7 @@ use rustc::middle::region::{CodeExtent, CodeExtentData};
|
||||
use rustc::ty::{FnOutput, Ty};
|
||||
use rustc::mir::repr::*;
|
||||
use rustc_data_structures::fnv::FnvHashMap;
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
use std::ops::{Index, IndexMut};
|
||||
use syntax::ast;
|
||||
use syntax::codemap::Span;
|
||||
|
@ -12,7 +12,7 @@ use hair::*;
|
||||
use hair::cx::Cx;
|
||||
use hair::cx::to_ref::ToRef;
|
||||
use rustc::middle::region::{BlockRemainder, CodeExtentData};
|
||||
use rustc_front::hir;
|
||||
use rustc::hir;
|
||||
use syntax::ast;
|
||||
|
||||
impl<'tcx> Mirror<'tcx> for &'tcx hir::Block {
|
||||
|
@ -14,7 +14,7 @@ use rustc_const_math::ConstInt;
|
||||
use hair::cx::Cx;
|
||||
use hair::cx::block;
|
||||
use hair::cx::to_ref::ToRef;
|
||||
use rustc::front::map;
|
||||
use rustc::hir::map;
|
||||
use rustc::middle::def::Def;
|
||||
use rustc::middle::const_val::ConstVal;
|
||||
use rustc_const_eval as const_eval;
|
||||
@ -22,8 +22,8 @@ use rustc::middle::region::CodeExtent;
|
||||
use rustc::middle::pat_util;
|
||||
use rustc::ty::{self, VariantDef, Ty};
|
||||
use rustc::mir::repr::*;
|
||||
use rustc_front::hir;
|
||||
use rustc_front::util as hir_util;
|
||||
use rustc::hir;
|
||||
use rustc::hir::util as hir_util;
|
||||
use syntax::ptr::P;
|
||||
|
||||
impl<'tcx> Mirror<'tcx> for &'tcx hir::Expr {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user