From 9350d14ecb025f963198e9baa39679f808496785 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 20 Mar 2013 13:48:05 -0700 Subject: [PATCH] add stage3 markers where necessary for dist-snap --- src/libcore/comm.rs | 4 ++++ src/libcore/io.rs | 2 ++ src/librustc/front/test.rs | 1 + src/libstd/comm.rs | 1 + 4 files changed, 8 insertions(+) diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs index 12dc2d7e3415..255e1966f378 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -110,6 +110,7 @@ pub fn stream() -> (Port, Chan) { // required. #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] pub impl Chan { fn send(&self, x: T) { chan_send(self, x) } fn try_send(&self, x: T) -> bool { chan_try_send(self, x) } @@ -149,6 +150,7 @@ fn chan_try_send(self: &Chan, x: T) -> bool { // Use an inherent impl so that imports are not required: #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] pub impl Port { fn recv(&self) -> T { port_recv(self) } fn try_recv(&self) -> Option { port_try_recv(self) } @@ -226,6 +228,7 @@ pub fn PortSet() -> PortSet{ // Use an inherent impl so that imports are not required: #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] pub impl PortSet { fn recv(&self) -> T { port_set_recv(self) } fn try_recv(&self) -> Option { port_set_try_recv(self) } @@ -301,6 +304,7 @@ pub type SharedChan = unstable::Exclusive>; #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] pub impl SharedChan { fn send(&self, x: T) { shared_chan_send(self, x) } fn try_send(&self, x: T) -> bool { shared_chan_try_send(self, x) } diff --git a/src/libcore/io.rs b/src/libcore/io.rs index 0879d1bd9006..97dcc4030ff5 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -77,6 +77,7 @@ pub trait Reader { #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] impl Reader for @Reader { fn read(&self, bytes: &mut [u8], len: uint) -> uint { self.read(bytes, len) @@ -659,6 +660,7 @@ pub trait Writer { #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] impl Writer for @Writer { fn write(&self, v: &[const u8]) { self.write(v) } fn seek(&self, a: int, b: SeekStyle) { self.seek(a, b) } diff --git a/src/librustc/front/test.rs b/src/librustc/front/test.rs index 434d992f5019..8b08f5e45320 100644 --- a/src/librustc/front/test.rs +++ b/src/librustc/front/test.rs @@ -369,6 +369,7 @@ fn mk_tests(cx: &TestCtxt) -> @ast::item { #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] fn mk_tests(cx: &TestCtxt) -> @ast::item { let ext_cx = cx.ext_cx; diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs index 99f6fa4c8cf5..23ae7666bb4d 100644 --- a/src/libstd/comm.rs +++ b/src/libstd/comm.rs @@ -28,6 +28,7 @@ pub struct DuplexStream { // Allow these methods to be used without import: #[cfg(stage1)] #[cfg(stage2)] +#[cfg(stage3)] pub impl DuplexStream { fn send(&self, x: T) { self.chan.send(x)