Skip to content

Commit 22b6606

Browse files
committed
---
yaml --- r: 276860 b: refs/heads/try c: 8b09372 h: refs/heads/master
1 parent a471b47 commit 22b6606

File tree

204 files changed

+584
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+584
-651
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: af7b00b68fc7960e98fb914be52d9a6a16fe2224
4+
refs/heads/try: 8b0937293bdb70ab4a5efed02b90a71af2b234f6
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/mk/crates.mk

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std term \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_front rustc_platform_intrinsics \
59+
rustc_data_structures rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
6161
rustc_const_eval rustc_const_math
6262
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
9393
DEPS_syntax_ext := syntax fmt_macros
9494

9595
DEPS_rustc_const_math := std syntax log serialize
96-
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
96+
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
9797
rustc_back graphviz
9898

99-
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
99+
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml \
100100
log graphviz rustc_back rustc_data_structures\
101101
rustc_const_math
102-
DEPS_rustc_back := std syntax rustc_front flate log libc
103-
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
102+
DEPS_rustc_back := std syntax flate log libc
103+
DEPS_rustc_borrowck := rustc rustc_mir log graphviz syntax
104104
DEPS_rustc_data_structures := std log serialize
105105
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106106
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107-
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
107+
rustc_trans rustc_privacy rustc_lint rustc_plugin \
108108
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
109-
DEPS_rustc_front := std syntax log serialize
110109
DEPS_rustc_lint := rustc log syntax rustc_const_eval
111110
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
112-
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113-
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114-
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
115-
DEPS_rustc_resolve := arena rustc rustc_front log syntax
111+
DEPS_rustc_metadata := rustc syntax rbml rustc_const_math
112+
DEPS_rustc_passes := syntax rustc core rustc_const_eval
113+
DEPS_rustc_mir := rustc syntax rustc_const_math rustc_const_eval
114+
DEPS_rustc_resolve := arena rustc log syntax
116115
DEPS_rustc_platform_intrinsics := std
117116
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
118-
DEPS_rustc_privacy := rustc rustc_front log syntax
117+
DEPS_rustc_privacy := rustc log syntax
119118
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
120-
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
119+
log syntax serialize rustc_llvm rustc_platform_intrinsics \
121120
rustc_const_math rustc_const_eval
122-
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
121+
DEPS_rustc_save_analysis := rustc log syntax
122+
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics rustc_const_math \
124123
rustc_const_eval
125124

126125
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
127-
test rustc_lint rustc_front rustc_const_eval
126+
test rustc_lint rustc_const_eval
128127

129128

130129
TOOL_DEPS_compiletest := test getopts log

branches/try/src/librustc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ rustc_back = { path = "../librustc_back" }
1919
rustc_bitflags = { path = "../librustc_bitflags" }
2020
rustc_const_math = { path = "../librustc_const_math" }
2121
rustc_data_structures = { path = "../librustc_data_structures" }
22-
rustc_front = { path = "../librustc_front" }
2322
serialize = { path = "../libserialize" }
2423
syntax = { path = "../libsyntax" }

branches/try/src/librustc/cfg/construct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use ty::{self, TyCtxt};
1616
use syntax::ast;
1717
use syntax::ptr::P;
1818

19-
use rustc_front::hir::{self, PatKind};
19+
use hir::{self, PatKind};
2020

2121
struct CFGBuilder<'a, 'tcx: 'a> {
2222
tcx: &'a TyCtxt<'tcx>,
@@ -257,7 +257,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
257257
self.match_(expr.id, &discr, &arms, pred)
258258
}
259259

260-
hir::ExprBinary(op, ref l, ref r) if ::rustc_front::util::lazy_binop(op.node) => {
260+
hir::ExprBinary(op, ref l, ref r) if hir::util::lazy_binop(op.node) => {
261261
//
262262
// [pred]
263263
// |

branches/try/src/librustc/cfg/graphviz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use graphviz::IntoCow;
1717

1818
use syntax::ast;
1919

20-
use front::map as ast_map;
20+
use hir::map as ast_map;
2121
use cfg;
2222

2323
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);

branches/try/src/librustc/cfg/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use rustc_data_structures::graph;
1515
use ty::TyCtxt;
1616
use syntax::ast;
17-
use rustc_front::hir;
17+
use hir;
1818

1919
mod construct;
2020
pub mod graphviz;

branches/try/src/librustc/dep_graph/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use self::thread::{DepGraphThreadData, DepMessage};
1212
use middle::def_id::DefId;
1313
use syntax::ast::NodeId;
1414
use ty::TyCtxt;
15-
use rustc_front::hir;
16-
use rustc_front::intravisit::Visitor;
15+
use hir;
16+
use hir::intravisit::Visitor;
1717
use std::rc::Rc;
1818

1919
mod dep_tracking_map;

branches/try/src/librustc_front/lowering.rs renamed to branches/try/src/librustc/hir/lowering.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,12 @@ pub fn lower_struct_field(lctx: &LoweringContext,
621621
-> hir::StructField {
622622
hir::StructField {
623623
span: f.span,
624-
id: f.id,
625-
name: f.ident.map(|ident| ident.name).unwrap_or(token::intern(&index.to_string())),
626-
vis: lower_visibility(lctx, &f.vis),
627-
ty: lower_ty(lctx, &f.ty),
628-
attrs: lower_attrs(lctx, &f.attrs),
624+
id: f.node.id,
625+
name: f.node.ident().map(|ident| ident.name)
626+
.unwrap_or(token::intern(&index.to_string())),
627+
vis: lower_visibility(lctx, f.node.kind.visibility()),
628+
ty: lower_ty(lctx, &f.node.ty),
629+
attrs: lower_attrs(lctx, &f.node.attrs),
629630
}
630631
}
631632

branches/try/src/librustc/front/map/blocks.rs renamed to branches/try/src/librustc/hir/map/blocks.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
2424
pub use self::Code::*;
2525

26-
use front::map::{self, Node};
26+
use hir::map::{self, Node};
2727
use syntax::abi;
28-
use rustc_front::hir::{Block, FnDecl};
28+
use hir::{Block, FnDecl};
2929
use syntax::ast::{Attribute, Name, NodeId};
3030
use syntax::attr::ThinAttributesExt;
31-
use rustc_front::hir as ast;
31+
use hir as ast;
3232
use syntax::codemap::Span;
33-
use rustc_front::intravisit::FnKind;
33+
use hir::intravisit::FnKind;
3434

3535
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
3636
/// and a body (as well as a NodeId, a span, etc).

branches/try/src/librustc/front/map/collector.rs renamed to branches/try/src/librustc/hir/map/collector.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
use super::*;
1212
use super::MapEntry::*;
1313

14-
use rustc_front::hir::*;
15-
use rustc_front::util;
16-
use rustc_front::intravisit::{self, Visitor};
14+
use hir::*;
15+
use hir::intravisit::Visitor;
1716
use middle::def_id::{CRATE_DEF_INDEX, DefId, DefIndex};
1817
use std::iter::repeat;
1918
use syntax::ast::{NodeId, CRATE_NODE_ID, DUMMY_NODE_ID};

branches/try/src/librustc/front/map/mod.rs renamed to branches/try/src/librustc/hir/map/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ use syntax::attr::ThinAttributesExt;
2727
use syntax::codemap::{Span, Spanned};
2828
use syntax::parse::token;
2929

30-
use rustc_front::hir::*;
31-
use rustc_front::fold::Folder;
32-
use rustc_front::intravisit;
33-
use rustc_front::print::pprust;
30+
use hir::*;
31+
use hir::fold::Folder;
32+
use hir::print as pprust;
3433

3534
use arena::TypedArena;
3635
use std::cell::RefCell;

branches/try/src/librustc_front/hir.rs renamed to branches/try/src/librustc/hir/mod.rs

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ pub use self::ViewPath_::*;
3333
pub use self::Visibility::*;
3434
pub use self::PathParameters::*;
3535

36-
use intravisit::Visitor;
37-
use std::collections::BTreeMap;
3836
use syntax::codemap::{self, Span, Spanned, DUMMY_SP, ExpnId};
3937
use syntax::abi::Abi;
4038
use syntax::ast::{Name, NodeId, DUMMY_NODE_ID, TokenTree, AsmDialect};
@@ -43,9 +41,7 @@ use syntax::attr::{ThinAttributes, ThinAttributesExt};
4341
use syntax::parse::token::InternedString;
4442
use syntax::ptr::P;
4543

46-
use print::pprust;
47-
use util;
48-
44+
use std::collections::BTreeMap;
4945
use std::fmt;
5046
use std::hash::{Hash, Hasher};
5147
use serialize::{Encodable, Decodable, Encoder, Decoder};
@@ -66,6 +62,15 @@ macro_rules! hir_vec {
6662
($($x:expr,)*) => (vec![$($x),*])
6763
}
6864

65+
pub mod check_attr;
66+
pub mod fold;
67+
pub mod intravisit;
68+
pub mod lowering;
69+
pub mod map;
70+
pub mod print;
71+
pub mod svh;
72+
pub mod util;
73+
6974
/// Identifier in HIR
7075
#[derive(Clone, Copy, Eq)]
7176
pub struct Ident {
@@ -135,7 +140,7 @@ impl fmt::Debug for Lifetime {
135140
write!(f,
136141
"lifetime({}: {})",
137142
self.id,
138-
pprust::lifetime_to_string(self))
143+
print::lifetime_to_string(self))
139144
}
140145
}
141146

@@ -161,13 +166,13 @@ pub struct Path {
161166

162167
impl fmt::Debug for Path {
163168
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
164-
write!(f, "path({})", pprust::path_to_string(self))
169+
write!(f, "path({})", print::path_to_string(self))
165170
}
166171
}
167172

168173
impl fmt::Display for Path {
169174
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
170-
write!(f, "{}", pprust::path_to_string(self))
175+
write!(f, "{}", print::path_to_string(self))
171176
}
172177
}
173178

@@ -434,7 +439,9 @@ impl Crate {
434439
/// follows lexical scoping rules -- then you want a different
435440
/// approach. You should override `visit_nested_item` in your
436441
/// visitor and then call `intravisit::walk_crate` instead.
437-
pub fn visit_all_items<'hir, V:Visitor<'hir>>(&'hir self, visitor: &mut V) {
442+
pub fn visit_all_items<'hir, V>(&'hir self, visitor: &mut V)
443+
where V: intravisit::Visitor<'hir>
444+
{
438445
for (_, item) in &self.items {
439446
visitor.visit_item(item);
440447
}
@@ -479,7 +486,7 @@ pub struct Pat {
479486

480487
impl fmt::Debug for Pat {
481488
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
482-
write!(f, "pat({}: {})", self.id, pprust::pat_to_string(self))
489+
write!(f, "pat({}: {})", self.id, print::pat_to_string(self))
483490
}
484491
}
485492

@@ -619,7 +626,7 @@ impl fmt::Debug for Stmt_ {
619626
write!(f,
620627
"stmt({}: {})",
621628
util::stmt_id(&spanned),
622-
pprust::stmt_to_string(&spanned))
629+
print::stmt_to_string(&spanned))
623630
}
624631
}
625632

@@ -722,7 +729,7 @@ pub struct Expr {
722729

723730
impl fmt::Debug for Expr {
724731
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
725-
write!(f, "expr({}: {})", self.id, pprust::expr_to_string(self))
732+
write!(f, "expr({}: {})", self.id, print::expr_to_string(self))
726733
}
727734
}
728735

@@ -940,7 +947,7 @@ pub struct Ty {
940947

941948
impl fmt::Debug for Ty {
942949
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
943-
write!(f, "type({})", pprust::ty_to_string(self))
950+
write!(f, "type({})", print::ty_to_string(self))
944951
}
945952
}
946953

branches/try/src/librustc_front/print/pprust.rs renamed to branches/try/src/librustc/hir/print.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ impl<'a> State<'a> {
950950

951951
pub fn print_variant(&mut self, v: &hir::Variant) -> io::Result<()> {
952952
self.head("")?;
953-
let generics = ::util::empty_generics();
953+
let generics = hir::util::empty_generics();
954954
self.print_struct(&v.node.data, &generics, v.node.name, v.span, false)?;
955955
match v.node.disr_expr {
956956
Some(ref d) => {
@@ -1285,12 +1285,12 @@ impl<'a> State<'a> {
12851285
-> io::Result<()> {
12861286
self.print_expr(lhs)?;
12871287
space(&mut self.s)?;
1288-
self.word_space(::util::binop_to_string(op.node))?;
1288+
self.word_space(hir::util::binop_to_string(op.node))?;
12891289
self.print_expr(rhs)
12901290
}
12911291

12921292
fn print_expr_unary(&mut self, op: hir::UnOp, expr: &hir::Expr) -> io::Result<()> {
1293-
word(&mut self.s, ::util::unop_to_string(op))?;
1293+
word(&mut self.s, hir::util::unop_to_string(op))?;
12941294
self.print_expr_maybe_paren(expr)
12951295
}
12961296

@@ -1434,7 +1434,7 @@ impl<'a> State<'a> {
14341434
hir::ExprAssignOp(op, ref lhs, ref rhs) => {
14351435
self.print_expr(&lhs)?;
14361436
space(&mut self.s)?;
1437-
word(&mut self.s, ::util::binop_to_string(op.node))?;
1437+
word(&mut self.s, hir::util::binop_to_string(op.node))?;
14381438
self.word_space("=")?;
14391439
self.print_expr(&rhs)?;
14401440
}

branches/try/src/librustc_back/svh.rs renamed to branches/try/src/librustc/hir/svh.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
4949
use std::fmt;
5050
use std::hash::{Hash, SipHasher, Hasher};
51-
use rustc_front::hir;
52-
use rustc_front::intravisit as visit;
51+
use hir;
52+
use hir::intravisit as visit;
5353

5454
#[derive(Clone, PartialEq, Debug)]
5555
pub struct Svh {
@@ -134,10 +134,10 @@ mod svh_visitor {
134134
use syntax::ast::{self, Name, NodeId};
135135
use syntax::codemap::Span;
136136
use syntax::parse::token;
137-
use rustc_front::intravisit as visit;
138-
use rustc_front::intravisit::{Visitor, FnKind};
139-
use rustc_front::hir::*;
140-
use rustc_front::hir;
137+
use hir::intravisit as visit;
138+
use hir::intravisit::{Visitor, FnKind};
139+
use hir::*;
140+
use hir;
141141

142142
use std::hash::{Hash, SipHasher};
143143

branches/try/src/librustc_front/util.rs renamed to branches/try/src/librustc/hir/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use hir;
1212
use hir::*;
13-
use intravisit::{self, Visitor, FnKind};
13+
use hir::intravisit::{Visitor, FnKind};
1414
use syntax::ast_util;
1515
use syntax::ast::{Name, NodeId, DUMMY_NODE_ID};
1616
use syntax::codemap::Span;

branches/try/src/librustc/infer/error_reporting.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ use super::region_inference::SameRegions;
7373

7474
use std::collections::HashSet;
7575

76-
use front::map as ast_map;
77-
use rustc_front::hir;
78-
use rustc_front::print::pprust;
76+
use hir::map as ast_map;
77+
use hir;
78+
use hir::print as pprust;
7979

8080
use middle::cstore::CrateStore;
8181
use middle::def::Def;

branches/try/src/librustc/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub use self::freshen::TypeFreshener;
1919
pub use self::region_inference::{GenericKind, VerifyBound};
2020

2121
use middle::def_id::DefId;
22-
use rustc_front::hir;
22+
use hir;
2323
use middle::free_region::FreeRegionMap;
2424
use middle::mem_categorization as mc;
2525
use middle::mem_categorization::McResult;

0 commit comments

Comments
 (0)