Skip to content

Commit 6e76fb0

Browse files
committed
---
yaml --- r: 94019 b: refs/heads/try c: c6e934f h: refs/heads/master i: 94017: ac6319d 94015: 6e6eadc v: v3
1 parent ea067d8 commit 6e76fb0

Some content is hidden

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

70 files changed

+688
-705
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 0455e4c9f8354f94eb3580e0789e9b6c8e607f21
5+
refs/heads/try: c6e934f44797fd482d79f7be481cac12a9804046
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/install.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,8 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_)_H_$(CFG_BUILD_))
148148
$(Q)$(call INSTALL,$(HB2),$(PHB),rustpkg$(X_$(CFG_BUILD)))
149149
$(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X_$(CFG_BUILD)))
150150
$(Q)$(call INSTALL_LIB,$(STDLIB_GLOB_$(CFG_BUILD)))
151-
$(Q)$(call INSTALL_LIB,$(STDLIB_RGLOB_$(CFG_BUILD)))
152151
$(Q)$(call INSTALL_LIB,$(EXTRALIB_GLOB_$(CFG_BUILD)))
153-
$(Q)$(call INSTALL_LIB,$(EXTRALIB_RGLOB_$(CFG_BUILD)))
154152
$(Q)$(call INSTALL_LIB,$(LIBRUSTUV_GLOB_$(CFG_BUILD)))
155-
$(Q)$(call INSTALL_LIB,$(LIBRUSTUV_RGLOB_$(CFG_BUILD)))
156153
$(Q)$(call INSTALL_LIB,$(LIBRUSTC_GLOB_$(CFG_BUILD)))
157154
$(Q)$(call INSTALL_LIB,$(LIBSYNTAX_GLOB_$(CFG_BUILD)))
158155
$(Q)$(call INSTALL_LIB,$(LIBRUSTPKG_GLOB_$(CFG_BUILD)))

branches/try/src/libextra/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ impl<T:Freeze + Send> RWArc<T> {
485485
// Whatever region the input reference had, it will be safe to use
486486
// the same region for the output reference. (The only 'unsafe' part
487487
// of this cast is removing the mutability.)
488-
let new_data = data;
488+
let new_data = cast::transmute_immut(data);
489489
// Downgrade ensured the token belonged to us. Just a sanity check.
490490
assert!(borrow::ref_eq(&(*state).data, new_data));
491491
// Produce new token

branches/try/src/librustc/back/link.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,12 @@ pub mod write {
362362
~"-o", object.as_str().unwrap().to_owned(),
363363
assembly.as_str().unwrap().to_owned()];
364364

365-
debug!("{} '{}'", cc, args.connect("' '"));
365+
debug!("{} {}", cc, args.connect(" "));
366366
let prog = run::process_output(cc, args);
367367

368368
if !prog.status.success() {
369369
sess.err(format!("linking with `{}` failed: {}", cc, prog.status));
370-
sess.note(format!("{} arguments: '{}'", cc, args.connect("' '")));
370+
sess.note(format!("{} arguments: {}", cc, args.connect(" ")));
371371
sess.note(str::from_utf8(prog.error + prog.output));
372372
sess.abort_if_errors();
373373
}
@@ -1061,7 +1061,7 @@ fn link_natively(sess: Session, dylib: bool, obj_filename: &Path,
10611061
let mut cc_args = sess.targ_cfg.target_strs.cc_args.clone();
10621062
cc_args.push_all_move(link_args(sess, dylib, obj_filename, out_filename));
10631063
if (sess.opts.debugging_opts & session::print_link_args) != 0 {
1064-
println!("{} link args: '{}'", cc_prog, cc_args.connect("' '"));
1064+
println!("{} link args: {}", cc_prog, cc_args.connect(" "));
10651065
}
10661066

10671067
// May have not found libraries in the right formats.
@@ -1073,7 +1073,7 @@ fn link_natively(sess: Session, dylib: bool, obj_filename: &Path,
10731073

10741074
if !prog.status.success() {
10751075
sess.err(format!("linking with `{}` failed: {}", cc_prog, prog.status));
1076-
sess.note(format!("{} arguments: '{}'", cc_prog, cc_args.connect("' '")));
1076+
sess.note(format!("{} arguments: {}", cc_prog, cc_args.connect(" ")));
10771077
sess.note(str::from_utf8(prog.error + prog.output));
10781078
sess.abort_if_errors();
10791079
}

branches/try/src/librustc/driver/driver.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -762,13 +762,7 @@ pub fn build_session_options(binary: @str,
762762
let ar = matches.opt_str("ar");
763763
let linker = matches.opt_str("linker");
764764
let linker_args = matches.opt_strs("link-args").flat_map( |a| {
765-
a.split(' ').filter_map(|arg| {
766-
if arg.is_empty() {
767-
None
768-
} else {
769-
Some(arg.to_owned())
770-
}
771-
}).collect()
765+
a.split(' ').map(|arg| arg.to_owned()).collect()
772766
});
773767

774768
let cfg = parse_cfgspecs(matches.opt_strs("cfg"), demitter);

branches/try/src/librustc/front/config.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl<'self> fold::ast_fold for Context<'self> {
2727
fn fold_mod(&self, module: &ast::_mod) -> ast::_mod {
2828
fold_mod(self, module)
2929
}
30-
fn fold_block(&self, block: ast::P<ast::Block>) -> ast::P<ast::Block> {
30+
fn fold_block(&self, block: &ast::Block) -> ast::Block {
3131
fold_block(self, block)
3232
}
3333
fn fold_foreign_mod(&self, foreign_module: &ast::foreign_mod)
@@ -97,10 +97,10 @@ fn fold_foreign_mod(cx: &Context, nm: &ast::foreign_mod) -> ast::foreign_mod {
9797

9898
fn fold_item_underscore(cx: &Context, item: &ast::item_) -> ast::item_ {
9999
let item = match *item {
100-
ast::item_impl(ref a, ref b, c, ref methods) => {
100+
ast::item_impl(ref a, ref b, ref c, ref methods) => {
101101
let methods = methods.iter().filter(|m| method_in_cfg(cx, **m))
102102
.map(|x| *x).collect();
103-
ast::item_impl((*a).clone(), (*b).clone(), c, methods)
103+
ast::item_impl((*a).clone(), (*b).clone(), (*c).clone(), methods)
104104
}
105105
ast::item_trait(ref a, ref b, ref methods) => {
106106
let methods = methods.iter()
@@ -129,22 +129,22 @@ fn retain_stmt(cx: &Context, stmt: @ast::Stmt) -> bool {
129129
}
130130
}
131131

132-
fn fold_block(cx: &Context, b: ast::P<ast::Block>) -> ast::P<ast::Block> {
132+
fn fold_block(cx: &Context, b: &ast::Block) -> ast::Block {
133133
let resulting_stmts = b.stmts.iter()
134134
.filter(|&a| retain_stmt(cx, *a))
135135
.flat_map(|&stmt| cx.fold_stmt(stmt).move_iter())
136136
.collect();
137137
let filtered_view_items = b.view_items.iter().filter_map(|a| {
138138
filter_view_item(cx, a).map(|x| cx.fold_view_item(x))
139139
}).collect();
140-
ast::P(ast::Block {
140+
ast::Block {
141141
view_items: filtered_view_items,
142142
stmts: resulting_stmts,
143143
expr: b.expr.map(|x| cx.fold_expr(x)),
144144
id: b.id,
145145
rules: b.rules,
146146
span: b.span,
147-
})
147+
}
148148
}
149149

150150
fn item_in_cfg(cx: &Context, item: @ast::item) -> bool {

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn encode_struct_fields(ecx: &EncodeContext,
352352
fn encode_enum_variant_info(ecx: &EncodeContext,
353353
ebml_w: &mut writer::Encoder,
354354
id: NodeId,
355-
variants: &[P<variant>],
355+
variants: &[variant],
356356
path: &[ast_map::path_elt],
357357
index: @mut ~[entry<i64>],
358358
generics: &ast::Generics) {
@@ -730,7 +730,7 @@ fn encode_provided_source(ebml_w: &mut writer::Encoder,
730730
fn encode_info_for_struct(ecx: &EncodeContext,
731731
ebml_w: &mut writer::Encoder,
732732
path: &[ast_map::path_elt],
733-
fields: &[struct_field],
733+
fields: &[@struct_field],
734734
global_index: @mut ~[entry<i64>])
735735
-> ~[entry<i64>] {
736736
/* Each class has its own index, since different classes
@@ -1081,7 +1081,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
10811081
def_id.node);
10821082
}
10831083
}
1084-
item_impl(_, ref opt_trait, ty, ref ast_methods) => {
1084+
item_impl(_, ref opt_trait, ref ty, ref ast_methods) => {
10851085
// We need to encode information about the default methods we
10861086
// have inherited, so we drive this based on the impl structure.
10871087
let imp = tcx.impls.get(&def_id);

branches/try/src/librustc/middle/astencode.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ struct NestedItemsDropper {
301301
}
302302

303303
impl fold::ast_fold for NestedItemsDropper {
304-
fn fold_block(&self, blk: ast::P<ast::Block>) -> ast::P<ast::Block> {
304+
fn fold_block(&self, blk: &ast::Block) -> ast::Block {
305305
let stmts_sans_items = blk.stmts.iter().filter_map(|stmt| {
306306
match stmt.node {
307307
ast::StmtExpr(_, _) | ast::StmtSemi(_, _) |
@@ -316,16 +316,16 @@ impl fold::ast_fold for NestedItemsDropper {
316316
ast::StmtMac(..) => fail!("unexpanded macro in astencode")
317317
}
318318
}).collect();
319-
let blk_sans_items = ast::P(ast::Block {
319+
let blk_sans_items = ast::Block {
320320
view_items: ~[], // I don't know if we need the view_items here,
321321
// but it doesn't break tests!
322322
stmts: stmts_sans_items,
323323
expr: blk.expr,
324324
id: blk.id,
325325
rules: blk.rules,
326326
span: blk.span,
327-
});
328-
fold::noop_fold_block(blk_sans_items, self)
327+
};
328+
fold::noop_fold_block(&blk_sans_items, self)
329329
}
330330
}
331331

branches/try/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ impl<'self> Visitor<()> for CheckLoanCtxt<'self> {
4848
fn visit_local(&mut self, l:@ast::Local, _:()) {
4949
check_loans_in_local(self, l);
5050
}
51-
fn visit_block(&mut self, b:ast::P<ast::Block>, _:()) {
51+
fn visit_block(&mut self, b:&ast::Block, _:()) {
5252
check_loans_in_block(self, b);
5353
}
5454
fn visit_pat(&mut self, p:&ast::Pat, _:()) {
5555
check_loans_in_pat(self, p);
5656
}
5757
fn visit_fn(&mut self, fk:&visit::fn_kind, fd:&ast::fn_decl,
58-
b:ast::P<ast::Block>, s:Span, n:ast::NodeId, _:()) {
58+
b:&ast::Block, s:Span, n:ast::NodeId, _:()) {
5959
check_loans_in_fn(self, fk, fd, b, s, n);
6060
}
6161
}
@@ -64,7 +64,7 @@ pub fn check_loans(bccx: &BorrowckCtxt,
6464
dfcx_loans: &LoanDataFlow,
6565
move_data: move_data::FlowedMoveData,
6666
all_loans: &[Loan],
67-
body: ast::P<ast::Block>) {
67+
body: &ast::Block) {
6868
debug!("check_loans(body id={:?})", body.id);
6969

7070
let mut clcx = CheckLoanCtxt {
@@ -724,7 +724,7 @@ impl<'self> CheckLoanCtxt<'self> {
724724
fn check_loans_in_fn<'a>(this: &mut CheckLoanCtxt<'a>,
725725
fk: &visit::fn_kind,
726726
decl: &ast::fn_decl,
727-
body: ast::P<ast::Block>,
727+
body: &ast::Block,
728728
sp: Span,
729729
id: ast::NodeId) {
730730
match *fk {
@@ -855,7 +855,7 @@ fn check_loans_in_pat<'a>(this: &mut CheckLoanCtxt<'a>,
855855
}
856856

857857
fn check_loans_in_block<'a>(this: &mut CheckLoanCtxt<'a>,
858-
blk: ast::P<ast::Block>)
858+
blk: &ast::Block)
859859
{
860860
visit::walk_block(this, blk, ());
861861
this.check_for_conflicting_loans(blk.id);

branches/try/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use syntax::codemap::Span;
3232
use syntax::print::pprust;
3333
use syntax::visit;
3434
use syntax::visit::{Visitor, fn_kind};
35-
use syntax::ast::{P, Expr, fn_decl, Block, NodeId, Stmt, Pat, Local};
35+
use syntax::ast::{Expr, fn_decl, Block, NodeId, Stmt, Pat, Local};
3636

3737
mod lifetime;
3838
mod restrictions;
@@ -77,10 +77,10 @@ impl<'self> visit::Visitor<()> for GatherLoanCtxt<'self> {
7777
fn visit_expr(&mut self, ex:@Expr, _:()) {
7878
gather_loans_in_expr(self, ex);
7979
}
80-
fn visit_block(&mut self, b:P<Block>, _:()) {
80+
fn visit_block(&mut self, b:&Block, _:()) {
8181
gather_loans_in_block(self, b);
8282
}
83-
fn visit_fn(&mut self, fk:&fn_kind, fd:&fn_decl, b:P<Block>,
83+
fn visit_fn(&mut self, fk:&fn_kind, fd:&fn_decl, b:&Block,
8484
s:Span, n:NodeId, _:()) {
8585
gather_loans_in_fn(self, fk, fd, b, s, n);
8686
}
@@ -102,7 +102,7 @@ impl<'self> visit::Visitor<()> for GatherLoanCtxt<'self> {
102102

103103
pub fn gather_loans(bccx: &BorrowckCtxt,
104104
decl: &ast::fn_decl,
105-
body: ast::P<ast::Block>)
105+
body: &ast::Block)
106106
-> (id_range, @mut ~[Loan], @mut move_data::MoveData) {
107107
let mut glcx = GatherLoanCtxt {
108108
bccx: bccx,
@@ -131,7 +131,7 @@ fn add_pat_to_id_range(this: &mut GatherLoanCtxt,
131131
fn gather_loans_in_fn(this: &mut GatherLoanCtxt,
132132
fk: &fn_kind,
133133
decl: &ast::fn_decl,
134-
body: ast::P<ast::Block>,
134+
body: &ast::Block,
135135
sp: Span,
136136
id: ast::NodeId) {
137137
match fk {
@@ -150,7 +150,7 @@ fn gather_loans_in_fn(this: &mut GatherLoanCtxt,
150150
}
151151

152152
fn gather_loans_in_block(this: &mut GatherLoanCtxt,
153-
blk: ast::P<ast::Block>) {
153+
blk: &ast::Block) {
154154
this.id_range.add(blk.id);
155155
visit::walk_block(this, blk, ());
156156
}
@@ -286,7 +286,7 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
286286
}
287287

288288
// see explanation attached to the `root_ub` field:
289-
ast::ExprWhile(cond, body) => {
289+
ast::ExprWhile(cond, ref body) => {
290290
// during the condition, can only root for the condition
291291
this.push_repeating_id(cond.id);
292292
this.visit_expr(cond, ());
@@ -299,7 +299,7 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
299299
}
300300

301301
// see explanation attached to the `root_ub` field:
302-
ast::ExprLoop(body, _) => {
302+
ast::ExprLoop(ref body, _) => {
303303
this.push_repeating_id(body.id);
304304
visit::walk_expr(this, ex, ());
305305
this.pop_repeating_id(body.id);

branches/try/src/librustc/middle/borrowck/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use syntax::codemap::Span;
2929
use syntax::parse::token;
3030
use syntax::visit;
3131
use syntax::visit::{Visitor,fn_kind};
32-
use syntax::ast::{P,fn_decl,Block,NodeId};
32+
use syntax::ast::{fn_decl,Block,NodeId};
3333

3434
macro_rules! if_ok(
3535
($inp: expr) => (
@@ -62,7 +62,7 @@ pub type LoanDataFlow = DataFlowContext<LoanDataFlowOperator>;
6262

6363
impl Visitor<()> for BorrowckCtxt {
6464
fn visit_fn(&mut self, fk:&fn_kind, fd:&fn_decl,
65-
b:P<Block>, s:Span, n:NodeId, _:()) {
65+
b:&Block, s:Span, n:NodeId, _:()) {
6666
borrowck_fn(self, fk, fd, b, s, n);
6767
}
6868
}
@@ -123,7 +123,7 @@ pub fn check_crate(
123123
fn borrowck_fn(this: &mut BorrowckCtxt,
124124
fk: &visit::fn_kind,
125125
decl: &ast::fn_decl,
126-
body: ast::P<ast::Block>,
126+
body: &ast::Block,
127127
sp: Span,
128128
id: ast::NodeId) {
129129
match fk {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ impl CFGBuilder {
161161

162162
fn expr(&mut self, expr: @ast::Expr, pred: CFGIndex) -> CFGIndex {
163163
match expr.node {
164-
ast::ExprBlock(blk) => {
164+
ast::ExprBlock(ref blk) => {
165165
let blk_exit = self.block(blk, pred);
166166
self.add_node(expr.id, [blk_exit])
167167
}
168168

169-
ast::ExprIf(cond, then, None) => {
169+
ast::ExprIf(cond, ref then, None) => {
170170
//
171171
// [pred]
172172
// |
@@ -186,7 +186,7 @@ impl CFGBuilder {
186186
self.add_node(expr.id, [cond_exit, then_exit]) // 3,4
187187
}
188188

189-
ast::ExprIf(cond, then, Some(otherwise)) => {
189+
ast::ExprIf(cond, ref then, Some(otherwise)) => {
190190
//
191191
// [pred]
192192
// |
@@ -207,7 +207,7 @@ impl CFGBuilder {
207207
self.add_node(expr.id, [then_exit, else_exit]) // 4, 5
208208
}
209209

210-
ast::ExprWhile(cond, body) => {
210+
ast::ExprWhile(cond, ref body) => {
211211
//
212212
// [pred]
213213
// |
@@ -241,7 +241,7 @@ impl CFGBuilder {
241241

242242
ast::ExprForLoop(..) => fail!("non-desugared expr_for_loop"),
243243

244-
ast::ExprLoop(body, _) => {
244+
ast::ExprLoop(ref body, _) => {
245245
//
246246
// [pred]
247247
// |
@@ -300,7 +300,7 @@ impl CFGBuilder {
300300
for arm in arms.iter() {
301301
guard_exit = self.opt_expr(arm.guard, guard_exit); // 2
302302
let pats_exit = self.pats_any(arm.pats, guard_exit); // 3
303-
let body_exit = self.block(arm.body, pats_exit); // 4
303+
let body_exit = self.block(&arm.body, pats_exit); // 4
304304
self.add_contained_edge(body_exit, expr_exit); // 5
305305
}
306306
expr_exit

branches/try/src/librustc/middle/check_loop.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ impl Visitor<Context> for CheckLoopVisitor {
3535

3636
fn visit_expr(&mut self, e: @ast::Expr, cx:Context) {
3737
match e.node {
38-
ast::ExprWhile(e, b) => {
38+
ast::ExprWhile(e, ref b) => {
3939
self.visit_expr(e, cx);
4040
self.visit_block(b, Loop);
4141
}
42-
ast::ExprLoop(b, _) => {
42+
ast::ExprLoop(ref b, _) => {
4343
self.visit_block(b, Loop);
4444
}
45-
ast::ExprFnBlock(_, b) | ast::ExprProc(_, b) => {
45+
ast::ExprFnBlock(_, ref b) | ast::ExprProc(_, ref b) => {
4646
self.visit_block(b, Closure);
4747
}
4848
ast::ExprBreak(_) => self.require_loop("break", cx, e.span),

0 commit comments

Comments
 (0)