Skip to content

Commit 80849e7

Browse files
committed
std: Fix stage0 build
Conflicts: src/libstd/rt/comm.rs
1 parent ece38b3 commit 80849e7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/libstd/rt/comm.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,12 @@ impl<T: Owned> GenericChan<T> for SharedChan<T> {
399399
}
400400

401401
impl<T: Owned> GenericSmartChan<T> for SharedChan<T> {
402+
#[cfg(stage0)] // odd type checking errors
403+
fn try_send(&self, _val: T) -> bool {
404+
fail!()
405+
}
406+
407+
#[cfg(not(stage0))]
402408
fn try_send(&self, val: T) -> bool {
403409
unsafe {
404410
let (next_pone, next_cone) = oneshot();
@@ -442,6 +448,12 @@ impl<T: Owned> GenericPort<T> for SharedPort<T> {
442448
}
443449
}
444450

451+
#[cfg(stage0)] // odd type checking errors
452+
fn try_recv(&self) -> Option<T> {
453+
fail!()
454+
}
455+
456+
#[cfg(not(stage0))]
445457
fn try_recv(&self) -> Option<T> {
446458
unsafe {
447459
let (next_link_port, next_link_chan) = oneshot();

0 commit comments

Comments
 (0)