Skip to content

Commit e29b5f1

Browse files
committed
---
yaml --- r: 42798 b: refs/heads/try c: 7ad0716 h: refs/heads/master v: v3
1 parent 34d97e9 commit e29b5f1

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
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: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: b505504dc4ebcc7a6f121163ae510cfb5fd2834f
5+
refs/heads/try: 7ad071627565fa2b1277c05279cf35c2fe3b1ebf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/libcore/float.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -581,15 +581,6 @@ pub fn test_to_str_inf() {
581581
assert to_str(-infinity, 10u) == ~"-inf";
582582
}
583583

584-
#[test]
585-
pub fn test_round() {
586-
assert round(5.8) == 6.0;
587-
assert round(5.2) == 5.0;
588-
assert round(3.0) == 3.0;
589-
assert round(2.5) == 3.0;
590-
assert round(-3.5) == -4.0;
591-
}
592-
593584
#[test]
594585
pub fn test_traits() {
595586
fn test<U:num::Num cmp::Eq>(ten: &U) {
@@ -618,3 +609,8 @@ pub fn test_traits() {
618609
// buffer-file-coding-system: utf-8-unix
619610
// End:
620611
//
612+
613+
614+
615+
616+

branches/try/src/librustc/rustc.rc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -357,24 +357,27 @@ fails without recording a fatal error then we've encountered a compiler
357357
bug and need to present an error.
358358
*/
359359
pub fn monitor(+f: fn~(diagnostic::emitter)) {
360-
let p = oldcomm::Port();
361-
let ch = oldcomm::Chan(&p);
362-
360+
use core::pipes::*;
361+
use std::cell::Cell;
362+
let (p, ch) = stream();
363+
let ch = SharedChan(ch);
364+
let ch_capture = ch.clone();
363365
match do task::try |move f| {
364-
366+
let ch = ch_capture.clone();
367+
let ch_capture = ch.clone();
365368
// The 'diagnostics emitter'. Every error, warning, etc. should
366369
// go through this function.
367370
let demitter = fn@(cmsp: Option<(@codemap::CodeMap, codemap::span)>,
368371
msg: &str, lvl: diagnostic::level) {
369372
if lvl == diagnostic::fatal {
370-
oldcomm::send(ch, fatal);
373+
ch_capture.send(fatal);
371374
}
372375
diagnostic::emit(cmsp, msg, lvl);
373376
};
374377

375378
struct finally {
376-
ch: oldcomm::Chan<monitor_msg>,
377-
drop { oldcomm::send(self.ch, done); }
379+
ch: SharedChan<monitor_msg>,
380+
drop { self.ch.send(done); }
378381
}
379382

380383
let _finally = finally { ch: ch };
@@ -384,7 +387,7 @@ pub fn monitor(+f: fn~(diagnostic::emitter)) {
384387
result::Ok(_) => { /* fallthrough */ }
385388
result::Err(_) => {
386389
// Task failed without emitting a fatal diagnostic
387-
if oldcomm::recv(p) == done {
390+
if p.recv() == done {
388391
diagnostic::emit(
389392
None,
390393
diagnostic::ice_msg(~"unexpected failure"),

0 commit comments

Comments
 (0)