Skip to content

Commit caa99c6

Browse files
committed
---
yaml --- r: 64892 b: refs/heads/snap-stage3 c: 5633a53 h: refs/heads/master v: v3
1 parent 8466d89 commit caa99c6

37 files changed

+826
-682
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a696f0fecb9d11204f64d310eb66e095f64bd04a
4+
refs/heads/snap-stage3: 5633a5363b6c650500b8b6496ddd49ea8c698f92
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<T:Freeze+Send> Arc<T> {
136136
*/
137137
pub fn unwrap(self) -> T {
138138
let Arc { x: x } = self;
139-
unsafe { x.unwrap() }
139+
x.unwrap()
140140
}
141141
}
142142

@@ -250,7 +250,7 @@ impl<T:Send> MutexArc<T> {
250250
*/
251251
pub fn unwrap(self) -> T {
252252
let MutexArc { x: x } = self;
253-
let inner = unsafe { x.unwrap() };
253+
let inner = x.unwrap();
254254
let MutexArcInner { failed: failed, data: data, _ } = inner;
255255
if failed {
256256
fail!(~"Can't unwrap poisoned MutexArc - another task failed inside!");
@@ -469,7 +469,7 @@ impl<T:Freeze + Send> RWArc<T> {
469469
*/
470470
pub fn unwrap(self) -> T {
471471
let RWArc { x: x, _ } = self;
472-
let inner = unsafe { x.unwrap() };
472+
let inner = x.unwrap();
473473
let RWArcInner { failed: failed, data: data, _ } = inner;
474474
if failed {
475475
fail!(~"Can't unwrap poisoned RWArc - another task failed inside!")

branches/snap-stage3/src/libextra/sync.rs

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,9 @@ impl<Q:Send> Sem<Q> {
130130
impl Sem<()> {
131131
pub fn access<U>(&self, blk: &fn() -> U) -> U {
132132
let mut release = None;
133-
unsafe {
134-
do task::unkillable {
135-
self.acquire();
136-
release = Some(SemRelease(self));
137-
}
133+
do task::unkillable {
134+
self.acquire();
135+
release = Some(SemRelease(self));
138136
}
139137
blk()
140138
}
@@ -153,11 +151,9 @@ impl Sem<~[WaitQueue]> {
153151

154152
pub fn access_waitqueue<U>(&self, blk: &fn() -> U) -> U {
155153
let mut release = None;
156-
unsafe {
157-
do task::unkillable {
158-
self.acquire();
159-
release = Some(SemAndSignalRelease(self));
160-
}
154+
do task::unkillable {
155+
self.acquire();
156+
release = Some(SemAndSignalRelease(self));
161157
}
162158
blk()
163159
}
@@ -294,17 +290,15 @@ impl<'self> Condvar<'self> {
294290
#[unsafe_destructor]
295291
impl<'self> Drop for CondvarReacquire<'self> {
296292
fn drop(&self) {
297-
unsafe {
298-
// Needs to succeed, instead of itself dying.
299-
do task::unkillable {
300-
match self.order {
301-
Just(lock) => do lock.access {
302-
self.sem.acquire();
303-
},
304-
Nothing => {
305-
self.sem.acquire();
306-
},
307-
}
293+
// Needs to succeed, instead of itself dying.
294+
do task::unkillable {
295+
match self.order {
296+
Just(lock) => do lock.access {
297+
self.sem.acquire();
298+
},
299+
Nothing => {
300+
self.sem.acquire();
301+
},
308302
}
309303
}
310304
}
@@ -644,14 +638,12 @@ impl RWLock {
644638
// Implementation slightly different from the slicker 'write's above.
645639
// The exit path is conditional on whether the caller downgrades.
646640
let mut _release = None;
647-
unsafe {
648-
do task::unkillable {
649-
(&self.order_lock).acquire();
650-
(&self.access_lock).acquire();
651-
(&self.order_lock).release();
652-
}
653-
_release = Some(RWLockReleaseDowngrade(self));
641+
do task::unkillable {
642+
(&self.order_lock).acquire();
643+
(&self.access_lock).acquire();
644+
(&self.order_lock).release();
654645
}
646+
_release = Some(RWLockReleaseDowngrade(self));
655647
blk(RWLockWriteMode { lock: self })
656648
}
657649

branches/snap-stage3/src/libextra/unicode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub mod icu {
1717
pub type UChar32 = char;
1818

1919
pub static TRUE : u8 = 1u8;
20-
pub static FALSE : u8 = 1u8;
20+
pub static FALSE : u8 = 0u8;
2121

2222
pub static UCHAR_ALPHABETIC : UProperty = 0;
2323
pub static UCHAR_BINARY_START : UProperty = 0; // = UCHAR_ALPHABETIC

branches/snap-stage3/src/librustc/middle/cfg/construct.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ impl CFGBuilder {
239239
expr_exit
240240
}
241241

242-
ast::expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
243-
244242
ast::expr_loop(ref body, _) => {
245243
//
246244
// [pred]

branches/snap-stage3/src/librustc/middle/dataflow.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,6 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
583583
copy_bits(new_loop_scope.break_bits, in_out);
584584
}
585585

586-
ast::expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
587-
588586
ast::expr_loop(ref blk, _) => {
589587
//
590588
// (expr) <--+

branches/snap-stage3/src/librustc/middle/liveness.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ fn visit_expr(expr: @expr, (this, vt): (@mut IrMaps, vt<@mut IrMaps>)) {
503503
this.add_live_node_for_node(expr.id, ExprNode(expr.span));
504504
visit::visit_expr(expr, (this, vt));
505505
}
506-
expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
507506
expr_binary(_, op, _, _) if ast_util::lazy_binop(op) => {
508507
this.add_live_node_for_node(expr.id, ExprNode(expr.span));
509508
visit::visit_expr(expr, (this, vt));
@@ -1058,8 +1057,6 @@ impl Liveness {
10581057
self.propagate_through_loop(expr, Some(cond), blk, succ)
10591058
}
10601059

1061-
expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
1062-
10631060
// Note that labels have been resolved, so we don't need to look
10641061
// at the label ident
10651062
expr_loop(ref blk, _) => {
@@ -1490,7 +1487,6 @@ fn check_expr(expr: @expr, (this, vt): (@Liveness, vt<@Liveness>)) {
14901487
expr_paren(*) | expr_fn_block(*) | expr_path(*) | expr_self(*) => {
14911488
visit::visit_expr(expr, (this, vt));
14921489
}
1493-
expr_for_loop(*) => fail!("non-desugared expr_for_loop")
14941490
}
14951491
}
14961492

branches/snap-stage3/src/librustc/middle/mem_categorization.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ impl mem_categorization_ctxt {
435435
ast::expr_inline_asm(*) => {
436436
return self.cat_rvalue_node(expr, expr_ty);
437437
}
438-
439-
ast::expr_for_loop(*) => fail!("non-desugared expr_for_loop")
440438
}
441439
}
442440

branches/snap-stage3/src/librustc/middle/moves.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,6 @@ impl VisitContext {
487487
self.consume_block(blk, visitor);
488488
}
489489

490-
expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
491-
492490
expr_unary(_, _, lhs) => {
493491
if !self.use_overloaded_operator(
494492
expr, lhs, [], visitor)

branches/snap-stage3/src/librustc/middle/resolve.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5016,8 +5016,6 @@ impl Resolver {
50165016
}
50175017
}
50185018

5019-
expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
5020-
50215019
expr_break(Some(label)) | expr_again(Some(label)) => {
50225020
match self.search_ribs(self.label_ribs, label, expr.span,
50235021
DontAllowCapturingSelf) {

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,7 @@ pub fn register_fn_fuller(ccx: @mut CrateContext,
22662266
sp: span,
22672267
sym: ~str,
22682268
node_id: ast::NodeId,
2269-
_node_type: ty::t,
2269+
node_type: ty::t,
22702270
cc: lib::llvm::CallConv,
22712271
fn_ty: Type)
22722272
-> ValueRef {

branches/snap-stage3/src/librustc/middle/trans/type_use.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,7 @@ pub fn mark_for_expr(cx: &Context, e: &expr) {
401401
expr_match(*) | expr_block(_) | expr_if(*) | expr_while(*) |
402402
expr_break(_) | expr_again(_) | expr_unary(*) | expr_lit(_) |
403403
expr_mac(_) | expr_addr_of(*) | expr_ret(_) | expr_loop(*) |
404-
expr_loop_body(_) | expr_do_body(_) => (),
405-
406-
expr_for_loop(*) => fail!("non-desugared expr_for_loop")
404+
expr_loop_body(_) | expr_do_body(_) => ()
407405
}
408406
}
409407

branches/snap-stage3/src/librustc/middle/ty.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,8 +3240,6 @@ pub fn expr_kind(tcx: ctxt,
32403240
RvalueStmtExpr
32413241
}
32423242

3243-
ast::expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
3244-
32453243
ast::expr_lit(_) | // Note: lit_str is carved out above
32463244
ast::expr_unary(*) |
32473245
ast::expr_addr_of(*) |

branches/snap-stage3/src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2559,8 +2559,6 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
25592559
fcx.write_nil(id);
25602560
}
25612561
}
2562-
ast::expr_for_loop(*) =>
2563-
fail!("non-desugared expr_for_loop"),
25642562
ast::expr_loop(ref body, _) => {
25652563
check_block_no_value(fcx, (body));
25662564
if !may_break(tcx, expr.id, body) {

branches/snap-stage3/src/librustc/middle/typeck/check/regionck.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,6 @@ pub mod guarantor {
10411041
rcx.fcx.tcx(), rcx.fcx.inh.method_map, expr));
10421042
None
10431043
}
1044-
ast::expr_for_loop(*) => fail!("non-desugared expr_for_loop"),
10451044
}
10461045
}
10471046

0 commit comments

Comments
 (0)