]> git.lizzy.rs Git - rust.git/commitdiff
Register new snapshots
authorAlex Crichton <alex@alexcrichton.com>
Sat, 14 Jun 2014 18:03:34 +0000 (11:03 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 16 Jun 2014 06:30:24 +0000 (23:30 -0700)
94 files changed:
src/doc/tutorial.md
src/libcollections/bitv.rs
src/libcollections/smallintmap.rs
src/libcollections/treemap.rs
src/libcore/fmt/mod.rs
src/libcore/fmt/rt.rs
src/libcore/intrinsics.rs
src/libdebug/reflect.rs
src/libdebug/repr.rs
src/libgreen/basic.rs
src/libgreen/lib.rs
src/libgreen/sched.rs
src/liblog/lib.rs
src/libnative/io/file_unix.rs
src/libnative/io/file_win32.rs
src/libnative/io/mod.rs
src/libnative/io/net.rs
src/libnative/io/pipe_unix.rs
src/libnative/io/pipe_win32.rs
src/libnative/io/timer_unix.rs
src/libnative/io/timer_win32.rs
src/libregex/parse/mod.rs
src/librustc/front/feature_gate.rs
src/librustc/front/std_inject.rs
src/librustc/metadata/loader.rs
src/librustc/metadata/tyencode.rs
src/librustc/middle/lint.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/privacy.rs
src/librustc/middle/resolve.rs
src/librustc/middle/trans/tvec.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/check/method.rs
src/librustc/middle/typeck/infer/to_str.rs
src/librustc/util/ppaux.rs
src/librustdoc/html/format.rs
src/librustdoc/html/highlight.rs
src/librustdoc/html/layout.rs
src/librustdoc/html/markdown.rs
src/librustdoc/html/toc.rs
src/librustdoc/test.rs
src/librustrt/local_data.rs
src/librustrt/rtio.rs
src/librustrt/task.rs
src/librustrt/unwind.rs
src/librustuv/async.rs
src/librustuv/idle.rs
src/librustuv/lib.rs
src/librustuv/net.rs
src/librustuv/pipe.rs
src/librustuv/signal.rs
src/librustuv/timer.rs
src/librustuv/uvio.rs
src/libserialize/json.rs
src/libstd/collections/hashmap.rs
src/libstd/collections/lru_cache.rs
src/libstd/failure.rs
src/libstd/io/fs.rs
src/libstd/io/net/tcp.rs
src/libstd/io/net/udp.rs
src/libstd/io/net/unix.rs
src/libstd/io/pipe.rs
src/libstd/io/process.rs
src/libstd/io/signal.rs
src/libstd/io/stdio.rs
src/libstd/io/timer.rs
src/libstd/path/windows.rs
src/libstd/task.rs
src/libsync/raw.rs
src/libsyntax/crateid.rs
src/libsyntax/diagnostic.rs
src/libsyntax/ext/asm.rs
src/libsyntax/ext/base.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/parser.rs
src/libterm/lib.rs
src/libtest/lib.rs
src/snapshots.txt
src/test/compile-fail/issue-7013.rs
src/test/compile-fail/kindck-owned-trait-contains.rs
src/test/compile-fail/owned-ptr-static-bound.rs
src/test/compile-fail/regions-bound-lists-feature-gate.rs
src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
src/test/compile-fail/trait-bounds-not-on-impl.rs
src/test/compile-fail/trait-bounds-not-on-struct.rs
src/test/run-pass/alignment-gep-tup-like-1.rs
src/test/run-pass/issue-2734.rs
src/test/run-pass/issue-2735.rs
src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs
src/test/run-pass/kindck-owned-trait-contains-1.rs
src/test/run-pass/objects-owned-object-borrowed-method-header.rs
src/test/run-pass/objects-owned-object-owned-method.rs
src/test/run-pass/parameterized-trait-with-bounds.rs
src/test/run-pass/regions-bound-lists-feature-gate.rs

index 9322985a922ca19d48b9a904a142ec0a78f0e6f2..61c71b273cb07c275046c328f004127d09a5a4a6 100644 (file)
@@ -2518,8 +2518,8 @@ valid types:
 trait Foo {}
 trait Bar<T> {}
 
-fn sendable_foo(f: Box<Foo:Send>) { /* ... */ }
-fn shareable_bar<T: Share>(b: &Bar<T>: Share) { /* ... */ }
+fn sendable_foo(f: Box<Foo + Send>) { /* ... */ }
+fn shareable_bar<T: Share>(b: &Bar<T> + Share) { /* ... */ }
 ~~~
 
 When no colon is specified (such as the type `~Foo`), it is inferred that the
index c0b3dec086be4ea6e23c3b65517c2a531c3e84b8..fb5864745d055b9803549d9d3425096a6212d3e3 100644 (file)
@@ -842,20 +842,6 @@ fn ne(&self, other: &BitvSet) -> bool { !self.eq(other) }
 }
 
 impl fmt::Show for BitvSet {
-    #[cfg(stage0)]
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(fmt, r"\{"));
-        let mut first = true;
-        for n in self.iter() {
-            if !first {
-                try!(write!(fmt, ", "));
-            }
-            try!(write!(fmt, "{}", n));
-            first = false;
-        }
-        write!(fmt, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(fmt, "{{"));
         let mut first = true;
index 06c1516f1e0819aafbb5b5f691cb7378591af022..4ae30348c3a921d8cebf8d8c8da119f062d00ab7 100644 (file)
@@ -185,18 +185,6 @@ pub fn update(&mut self, key: uint, newval: V, ff: |V, V| -> V) -> bool {
 }
 
 impl<V: fmt::Show> fmt::Show for SmallIntMap<V> {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, r"\{"));
-
-        for (i, (k, v)) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{}: {}", k, *v));
-        }
-
-        write!(f, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
 
index 086b073a9c44b0846c5d5b1ee379c1a8f889cc88..02246c33317f135b08475ddd5713ff4e1ca2e1a9 100644 (file)
@@ -76,18 +76,6 @@ fn lt(&self, other: &TreeMap<K, V>) -> bool { lt(self, other) }
 }
 
 impl<K: Ord + Show, V: Show> Show for TreeMap<K, V> {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, r"\{"));
-
-        for (i, (k, v)) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{}: {}", *k, *v));
-        }
-
-        write!(f, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
 
@@ -586,18 +574,6 @@ fn lt(&self, other: &TreeSet<T>) -> bool { self.map < other.map }
 }
 
 impl<T: Ord + Show> Show for TreeSet<T> {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, r"\{"));
-
-        for (i, x) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{}", *x));
-        }
-
-        write!(f, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
 
index 053dbbe5da9d8c983aa4a81b3d76021697bfe05a..d778f3b47a17017f2df926b567617ac2c4c510a6 100644 (file)
@@ -744,11 +744,6 @@ fn fmt(&self, f: &mut Formatter) -> Result {
 }
 
 impl<T: Copy + Show> Show for Cell<T> {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut Formatter) -> Result {
-        write!(f, r"Cell \{ value: {} \}", self.get())
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut Formatter) -> Result {
         write!(f, "Cell {{ value: {} }}", self.get())
     }
index 6d3edeabca936a0c0ed982772e7bc54388ba7e67..388084b9ed8312a05aec0c4a092d3e9207f7b77f 100644 (file)
@@ -15,9 +15,6 @@
 //! these can be statically allocated and are slightly optimized for the runtime
 
 
-#[cfg(stage0)]
-use option::Option;
-
 #[doc(hidden)]
 pub enum Piece<'a> {
     String(&'a str),
@@ -28,8 +25,6 @@ pub enum Piece<'a> {
 pub struct Argument<'a> {
     pub position: Position,
     pub format: FormatSpec,
-    #[cfg(stage0)]
-    pub method: Option<uint>,
 }
 
 #[doc(hidden)]
index 33f2a49d6d560cba10c9dd49d185c1663fa312ce..dc43f96b55987e97346d78749fc0de671bc378f8 100644 (file)
@@ -100,10 +100,6 @@ pub trait TyVisitor {
 
     fn visit_char(&mut self) -> bool;
 
-    #[cfg(stage0)]
-    fn visit_estr_box(&mut self) -> bool;
-    #[cfg(stage0)]
-    fn visit_estr_uniq(&mut self) -> bool;
     fn visit_estr_slice(&mut self) -> bool;
     fn visit_estr_fixed(&mut self, n: uint, sz: uint, align: uint) -> bool;
 
@@ -112,10 +108,6 @@ pub trait TyVisitor {
     fn visit_ptr(&mut self, mtbl: uint, inner: *TyDesc) -> bool;
     fn visit_rptr(&mut self, mtbl: uint, inner: *TyDesc) -> bool;
 
-    #[cfg(stage0)]
-    fn visit_evec_box(&mut self, mtbl: uint, inner: *TyDesc) -> bool;
-    #[cfg(stage0)]
-    fn visit_evec_uniq(&mut self, mtbl: uint, inner: *TyDesc) -> bool;
     fn visit_evec_slice(&mut self, mtbl: uint, inner: *TyDesc) -> bool;
     fn visit_evec_fixed(&mut self, n: uint, sz: uint, align: uint,
                         mtbl: uint, inner: *TyDesc) -> bool;
index cd94829f3540e1fb03d4b99b73ace0770f545694..f281161113f001ae157766624d803c33666fa617 100644 (file)
@@ -193,16 +193,6 @@ fn visit_char(&mut self) -> bool {
         true
     }
 
-    #[cfg(stage0)]
-    fn visit_estr_box(&mut self) -> bool {
-        true
-    }
-
-    #[cfg(stage0)]
-    fn visit_estr_uniq(&mut self) -> bool {
-        false
-    }
-
     fn visit_estr_slice(&mut self) -> bool {
         self.align_to::<&'static str>();
         if ! self.inner.visit_estr_slice() { return false; }
@@ -247,16 +237,6 @@ fn visit_rptr(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
         true
     }
 
-    #[cfg(stage0)]
-    fn visit_evec_box(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool {
-        true
-    }
-
-    #[cfg(stage0)]
-    fn visit_evec_uniq(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool {
-        false
-    }
-
     fn visit_evec_slice(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
         self.align_to::<&'static [u8]>();
         if ! self.inner.visit_evec_slice(mtbl, inner) { return false; }
index d6ae23c6d9acda3392df11180f78ffd21a71f7c1..d27b0f0de7e30028745e7b789983afa8308900d9 100644 (file)
@@ -269,16 +269,6 @@ fn visit_char(&mut self) -> bool {
         })
     }
 
-    #[cfg(stage0)]
-    fn visit_estr_box(&mut self) -> bool {
-        false
-    }
-
-    #[cfg(stage0)]
-    fn visit_estr_uniq(&mut self) -> bool {
-        false
-    }
-
     fn visit_estr_slice(&mut self) -> bool {
         self.get::<&str>(|this, s| this.write_escaped_slice(*s))
     }
@@ -320,16 +310,6 @@ fn visit_rptr(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
         })
     }
 
-    #[cfg(stage0)]
-    fn visit_evec_box(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool {
-        true
-    }
-
-    #[cfg(stage0)]
-    fn visit_evec_uniq(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool {
-        true
-    }
-
     fn visit_evec_slice(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
         self.get::<raw::Slice<()>>(|this, s| {
             try!(this, this.writer.write(['&' as u8]));
index 7f033a1bc6163a5d542767ee4cc11072c3a61102..2381626b7c87697d8cd0e97ebe8b12b7fc7fa9b2 100644 (file)
 use std::rt::exclusive::Exclusive;
 
 /// This is the only exported function from this module.
-pub fn event_loop() -> Box<EventLoop:Send> {
-    box BasicLoop::new() as Box<EventLoop:Send>
+pub fn event_loop() -> Box<EventLoop + Send> {
+    box BasicLoop::new() as Box<EventLoop + Send>
 }
 
 struct BasicLoop {
-    work: Vec<proc():Send>,             // pending work
-    remotes: Vec<(uint, Box<Callback:Send>)>,
+    work: Vec<proc(): Send>,             // pending work
+    remotes: Vec<(uint, Box<Callback + Send>)>,
     next_remote: uint,
     messages: Arc<Exclusive<Vec<Message>>>,
-    idle: Option<Box<Callback:Send>>,
+    idle: Option<Box<Callback + Send>>,
     idle_active: Option<Arc<atomics::AtomicBool>>,
 }
 
@@ -132,22 +132,22 @@ fn callback(&mut self, f: proc():Send) {
     }
 
     // FIXME: Seems like a really weird requirement to have an event loop provide.
-    fn pausable_idle_callback(&mut self, cb: Box<Callback:Send>)
-                              -> Box<PausableIdleCallback:Send> {
+    fn pausable_idle_callback(&mut self, cb: Box<Callback + Send>)
+                              -> Box<PausableIdleCallback + Send> {
         rtassert!(self.idle.is_none());
         self.idle = Some(cb);
         let a = Arc::new(atomics::AtomicBool::new(true));
         self.idle_active = Some(a.clone());
-        box BasicPausable { active: a } as Box<PausableIdleCallback:Send>
+        box BasicPausable { active: a } as Box<PausableIdleCallback + Send>
     }
 
-    fn remote_callback(&mut self, f: Box<Callback:Send>)
-                       -> Box<RemoteCallback:Send> {
+    fn remote_callback(&mut self, f: Box<Callback + Send>)
+                       -> Box<RemoteCallback + Send> {
         let id = self.next_remote;
         self.next_remote += 1;
         self.remotes.push((id, f));
         box BasicRemote::new(self.messages.clone(), id) as
-            Box<RemoteCallback:Send>
+            Box<RemoteCallback + Send>
     }
 
     fn io<'a>(&'a mut self) -> Option<&'a mut IoFactory> { None }
index e8de2b9bd9335cc99621b3d45cf147ac2cced253..6c3ad8a6ef9611c63ac92007512aa06ae836d29d 100644 (file)
@@ -288,7 +288,7 @@ fn start(argc: int, argv: **u8) -> int {
 /// The return value is used as the process return code. 0 on success, 101 on
 /// error.
 pub fn start(argc: int, argv: **u8,
-             event_loop_factory: fn() -> Box<rtio::EventLoop:Send>,
+             event_loop_factory: fn() -> Box<rtio::EventLoop + Send>,
              main: proc():Send) -> int {
     rt::init(argc, argv);
     let mut main = Some(main);
@@ -309,7 +309,7 @@ pub fn start(argc: int, argv: **u8,
 ///
 /// This function will not return until all schedulers in the associated pool
 /// have returned.
-pub fn run(event_loop_factory: fn() -> Box<rtio::EventLoop:Send>,
+pub fn run(event_loop_factory: fn() -> Box<rtio::EventLoop + Send>,
            main: proc():Send) -> int {
     // Create a scheduler pool and spawn the main task into this pool. We will
     // get notified over a channel when the main task exits.
@@ -340,7 +340,7 @@ pub struct PoolConfig {
     pub threads: uint,
     /// A factory function used to create new event loops. If this is not
     /// specified then the default event loop factory is used.
-    pub event_loop_factory: fn() -> Box<rtio::EventLoop:Send>,
+    pub event_loop_factory: fn() -> Box<rtio::EventLoop + Send>,
 }
 
 impl PoolConfig {
@@ -365,7 +365,7 @@ pub struct SchedPool {
     stack_pool: StackPool,
     deque_pool: deque::BufferPool<Box<task::GreenTask>>,
     sleepers: SleeperList,
-    factory: fn() -> Box<rtio::EventLoop:Send>,
+    factory: fn() -> Box<rtio::EventLoop + Send>,
     task_state: TaskState,
     tasks_done: Receiver<()>,
 }
index 1e8f774ea16832d7e6e8c5aace2797d304ac9998..75af52ac6804c9886ae6bce3eaf1d58d2bc39bfa 100644 (file)
@@ -83,7 +83,7 @@ pub struct Scheduler {
     /// A fast XorShift rng for scheduler use
     rng: XorShiftRng,
     /// A toggleable idle callback
-    idle_callback: Option<Box<PausableIdleCallback:Send>>,
+    idle_callback: Option<Box<PausableIdleCallback + Send>>,
     /// A countdown that starts at a random value and is decremented
     /// every time a yield check is performed. When it hits 0 a task
     /// will yield.
@@ -100,7 +100,7 @@ pub struct Scheduler {
     //      destroyed before it's actually destroyed.
 
     /// The event loop used to drive the scheduler and perform I/O
-    pub event_loop: Box<EventLoop:Send>,
+    pub event_loop: Box<EventLoop + Send>,
 }
 
 /// An indication of how hard to work on a given operation, the difference
@@ -123,7 +123,7 @@ impl Scheduler {
     // * Initialization Functions
 
     pub fn new(pool_id: uint,
-               event_loop: Box<EventLoop:Send>,
+               event_loop: Box<EventLoop + Send>,
                work_queue: deque::Worker<Box<GreenTask>>,
                work_queues: Vec<deque::Stealer<Box<GreenTask>>>,
                sleeper_list: SleeperList,
@@ -136,7 +136,7 @@ pub fn new(pool_id: uint,
     }
 
     pub fn new_special(pool_id: uint,
-                       event_loop: Box<EventLoop:Send>,
+                       event_loop: Box<EventLoop + Send>,
                        work_queue: deque::Worker<Box<GreenTask>>,
                        work_queues: Vec<deque::Stealer<Box<GreenTask>>>,
                        sleeper_list: SleeperList,
@@ -183,7 +183,7 @@ pub fn new_special(pool_id: uint,
     pub fn bootstrap(mut ~self) {
 
         // Build an Idle callback.
-        let cb = box SchedRunner as Box<Callback:Send>;
+        let cb = box SchedRunner as Box<Callback + Send>;
         self.idle_callback = Some(self.event_loop.pausable_idle_callback(cb));
 
         // Create a task for the scheduler with an empty context.
@@ -231,7 +231,7 @@ pub fn run(mut ~self, stask: Box<GreenTask>) -> Box<GreenTask> {
         // mutable reference to the event_loop to give it the "run"
         // command.
         unsafe {
-            let event_loop: *mut Box<EventLoop:Send> = &mut self.event_loop;
+            let event_loop: *mut Box<EventLoop + Send> = &mut self.event_loop;
             // Our scheduler must be in the task before the event loop
             // is started.
             stask.put_with_sched(self);
@@ -904,7 +904,7 @@ pub enum SchedMessage {
 }
 
 pub struct SchedHandle {
-    remote: Box<RemoteCallback:Send>,
+    remote: Box<RemoteCallback + Send>,
     queue: msgq::Producer<SchedMessage>,
     pub sched_id: uint
 }
index 2ecfef35308832b7d960e5e7a1bef52f81d889e7..90a186f59d2d8b74a13cb6d938f923e08141d714 100644 (file)
@@ -155,7 +155,7 @@ fn main() {
 /// Error log level
 pub static ERROR: u32 = 1;
 
-local_data_key!(local_logger: Box<Logger:Send>)
+local_data_key!(local_logger: Box<Logger + Send>)
 
 /// A trait used to represent an interface to a task-local logger. Each task
 /// can have its own custom logger which can respond to logging messages
@@ -226,7 +226,7 @@ pub fn log(level: u32, loc: &'static LogLocation, args: &fmt::Arguments) {
     // frob the slot while we're doing the logging. This will destroy any logger
     // set during logging.
     let mut logger = local_logger.replace(None).unwrap_or_else(|| {
-        box DefaultLogger { handle: io::stderr() } as Box<Logger:Send>
+        box DefaultLogger { handle: io::stderr() } as Box<Logger + Send>
     });
     logger.log(&LogRecord {
         level: LogLevel(level),
@@ -246,7 +246,7 @@ pub fn log_level() -> u32 { unsafe { LOG_LEVEL } }
 
 /// Replaces the task-local logger with the specified logger, returning the old
 /// logger.
-pub fn set_logger(logger: Box<Logger:Send>) -> Option<Box<Logger:Send>> {
+pub fn set_logger(logger: Box<Logger + Send>) -> Option<Box<Logger + Send>> {
     local_logger.replace(Some(logger))
 }
 
index fda9b7b1932b0a4b03477c4ecae18dfa2e4ae0de..f0ab77f6e40566ef856899ba8ab4bfc2170ed7b9 100644 (file)
@@ -167,8 +167,8 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
     fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         self.inner_write(buf)
     }
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
-        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe:Send>
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
+        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe + Send>
     }
 
     // Only supported on named pipes currently. Note that this doesn't have an
index 5ace8e347c67ef7d5c4e521f91ec125d5314d908..41ef5e31a91f65cad24549a9bd3c649c0921083e 100644 (file)
@@ -201,8 +201,8 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
     fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         self.inner_write(buf)
     }
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
-        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe:Send>
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
+        box FileDesc { inner: self.inner.clone() } as Box<rtio::RtioPipe + Send>
     }
 
     // Only supported on named pipes currently. Note that this doesn't have an
index 4158db7bb8ea1d902ef8fe40e67a1596f4d7d60c..bf52c980d3a86a03535257522d230629d28258b9 100644 (file)
@@ -166,34 +166,34 @@ impl rtio::IoFactory for IoFactory {
     // networking
     fn tcp_connect(&mut self, addr: rtio::SocketAddr,
                    timeout: Option<u64>)
-        -> IoResult<Box<rtio::RtioTcpStream:Send>>
+        -> IoResult<Box<rtio::RtioTcpStream + Send>>
     {
         net::TcpStream::connect(addr, timeout).map(|s| {
-            box s as Box<rtio::RtioTcpStream:Send>
+            box s as Box<rtio::RtioTcpStream + Send>
         })
     }
     fn tcp_bind(&mut self, addr: rtio::SocketAddr)
-                -> IoResult<Box<rtio::RtioTcpListener:Send>> {
+                -> IoResult<Box<rtio::RtioTcpListener + Send>> {
         net::TcpListener::bind(addr).map(|s| {
-            box s as Box<rtio::RtioTcpListener:Send>
+            box s as Box<rtio::RtioTcpListener + Send>
         })
     }
     fn udp_bind(&mut self, addr: rtio::SocketAddr)
-                -> IoResult<Box<rtio::RtioUdpSocket:Send>> {
+                -> IoResult<Box<rtio::RtioUdpSocket + Send>> {
         net::UdpSocket::bind(addr).map(|u| {
-            box u as Box<rtio::RtioUdpSocket:Send>
+            box u as Box<rtio::RtioUdpSocket + Send>
         })
     }
     fn unix_bind(&mut self, path: &CString)
-                 -> IoResult<Box<rtio::RtioUnixListener:Send>> {
+                 -> IoResult<Box<rtio::RtioUnixListener + Send>> {
         pipe::UnixListener::bind(path).map(|s| {
-            box s as Box<rtio::RtioUnixListener:Send>
+            box s as Box<rtio::RtioUnixListener + Send>
         })
     }
     fn unix_connect(&mut self, path: &CString,
-                    timeout: Option<u64>) -> IoResult<Box<rtio::RtioPipe:Send>> {
+                    timeout: Option<u64>) -> IoResult<Box<rtio::RtioPipe + Send>> {
         pipe::UnixStream::connect(path, timeout).map(|s| {
-            box s as Box<rtio::RtioPipe:Send>
+            box s as Box<rtio::RtioPipe + Send>
         })
     }
     fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
@@ -205,18 +205,18 @@ fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
 
     // filesystem operations
     fn fs_from_raw_fd(&mut self, fd: c_int, close: rtio::CloseBehavior)
-                      -> Box<rtio::RtioFileStream:Send> {
+                      -> Box<rtio::RtioFileStream + Send> {
         let close = match close {
             rtio::CloseSynchronously | rtio::CloseAsynchronously => true,
             rtio::DontClose => false
         };
-        box file::FileDesc::new(fd, close) as Box<rtio::RtioFileStream:Send>
+        box file::FileDesc::new(fd, close) as Box<rtio::RtioFileStream + Send>
     }
     fn fs_open(&mut self, path: &CString, fm: rtio::FileMode,
                fa: rtio::FileAccess)
-        -> IoResult<Box<rtio::RtioFileStream:Send>>
+        -> IoResult<Box<rtio::RtioFileStream + Send>>
     {
-        file::open(path, fm, fa).map(|fd| box fd as Box<rtio::RtioFileStream:Send>)
+        file::open(path, fm, fa).map(|fd| box fd as Box<rtio::RtioFileStream + Send>)
     }
     fn fs_unlink(&mut self, path: &CString) -> IoResult<()> {
         file::unlink(path)
@@ -260,31 +260,31 @@ fn fs_utime(&mut self, src: &CString, atime: u64,
     }
 
     // misc
-    fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer:Send>> {
-        timer::Timer::new().map(|t| box t as Box<rtio::RtioTimer:Send>)
+    fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer + Send>> {
+        timer::Timer::new().map(|t| box t as Box<rtio::RtioTimer + Send>)
     }
     fn spawn(&mut self, cfg: rtio::ProcessConfig)
-            -> IoResult<(Box<rtio::RtioProcess:Send>,
-                         Vec<Option<Box<rtio::RtioPipe:Send>>>)> {
+            -> IoResult<(Box<rtio::RtioProcess + Send>,
+                         Vec<Option<Box<rtio::RtioPipe + Send>>>)> {
         process::Process::spawn(cfg).map(|(p, io)| {
-            (box p as Box<rtio::RtioProcess:Send>,
+            (box p as Box<rtio::RtioProcess + Send>,
              io.move_iter().map(|p| p.map(|p| {
-                 box p as Box<rtio::RtioPipe:Send>
+                 box p as Box<rtio::RtioPipe + Send>
              })).collect())
         })
     }
     fn kill(&mut self, pid: libc::pid_t, signum: int) -> IoResult<()> {
         process::Process::kill(pid, signum)
     }
-    fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<rtio::RtioPipe:Send>> {
-        Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioPipe:Send>)
+    fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<rtio::RtioPipe + Send>> {
+        Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioPipe + Send>)
     }
     fn tty_open(&mut self, fd: c_int, _readable: bool)
-                -> IoResult<Box<rtio::RtioTTY:Send>> {
+                -> IoResult<Box<rtio::RtioTTY + Send>> {
         #[cfg(unix)] use ERROR = libc::ENOTTY;
         #[cfg(windows)] use ERROR = libc::ERROR_INVALID_HANDLE;
         if unsafe { libc::isatty(fd) } != 0 {
-            Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioTTY:Send>)
+            Ok(box file::FileDesc::new(fd, true) as Box<rtio::RtioTTY + Send>)
         } else {
             Err(IoError {
                 code: ERROR as uint,
@@ -294,7 +294,7 @@ fn tty_open(&mut self, fd: c_int, _readable: bool)
         }
     }
     fn signal(&mut self, _signal: int, _cb: Box<rtio::Callback>)
-              -> IoResult<Box<rtio::RtioSignal:Send>> {
+              -> IoResult<Box<rtio::RtioSignal + Send>> {
         Err(unimpl())
     }
 }
index 1c33114dc71739d90ee385cc60a4ce79aa27ab98..e0872d4eb7659d8fc84cb1815a4d318d3c714fda 100644 (file)
@@ -396,12 +396,12 @@ fn letdie(&mut self) -> IoResult<()> {
         self.set_keepalive(None)
     }
 
-    fn clone(&self) -> Box<rtio::RtioTcpStream:Send> {
+    fn clone(&self) -> Box<rtio::RtioTcpStream + Send> {
         box TcpStream {
             inner: self.inner.clone(),
             read_deadline: 0,
             write_deadline: 0,
-        } as Box<rtio::RtioTcpStream:Send>
+        } as Box<rtio::RtioTcpStream + Send>
     }
 
     fn close_write(&mut self) -> IoResult<()> {
@@ -483,9 +483,9 @@ pub fn native_listen(self, backlog: int) -> IoResult<TcpAcceptor> {
 }
 
 impl rtio::RtioTcpListener for TcpListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioTcpAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioTcpAcceptor + Send>> {
         self.native_listen(128).map(|a| {
-            box a as Box<rtio::RtioTcpAcceptor:Send>
+            box a as Box<rtio::RtioTcpAcceptor + Send>
         })
     }
 }
@@ -532,8 +532,8 @@ fn socket_name(&mut self) -> IoResult<rtio::SocketAddr> {
 }
 
 impl rtio::RtioTcpAcceptor for TcpAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioTcpStream:Send>> {
-        self.native_accept().map(|s| box s as Box<rtio::RtioTcpStream:Send>)
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioTcpStream + Send>> {
+        self.native_accept().map(|s| box s as Box<rtio::RtioTcpStream + Send>)
     }
 
     fn accept_simultaneously(&mut self) -> IoResult<()> { Ok(()) }
@@ -719,12 +719,12 @@ fn ignore_broadcasts(&mut self) -> IoResult<()> {
         self.set_broadcast(false)
     }
 
-    fn clone(&self) -> Box<rtio::RtioUdpSocket:Send> {
+    fn clone(&self) -> Box<rtio::RtioUdpSocket + Send> {
         box UdpSocket {
             inner: self.inner.clone(),
             read_deadline: 0,
             write_deadline: 0,
-        } as Box<rtio::RtioUdpSocket:Send>
+        } as Box<rtio::RtioUdpSocket + Send>
     }
 
     fn set_timeout(&mut self, timeout: Option<u64>) {
index 1458b475ae9598729e4cc700ae52f7ea515f8800..db0d1743c7279c2222a4b844afbcbbb39737742f 100644 (file)
@@ -179,8 +179,8 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         }
     }
 
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
-        box UnixStream::new(self.inner.clone()) as Box<rtio::RtioPipe:Send>
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
+        box UnixStream::new(self.inner.clone()) as Box<rtio::RtioPipe + Send>
     }
 
     fn close_write(&mut self) -> IoResult<()> {
@@ -229,9 +229,9 @@ pub fn native_listen(self, backlog: int) -> IoResult<UnixAcceptor> {
 }
 
 impl rtio::RtioUnixListener for UnixListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor + Send>> {
         self.native_listen(128).map(|a| {
-            box a as Box<rtio::RtioUnixAcceptor:Send>
+            box a as Box<rtio::RtioUnixAcceptor + Send>
         })
     }
 }
@@ -264,8 +264,8 @@ pub fn native_accept(&mut self) -> IoResult<UnixStream> {
 }
 
 impl rtio::RtioUnixAcceptor for UnixAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe:Send>> {
-        self.native_accept().map(|s| box s as Box<rtio::RtioPipe:Send>)
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe + Send>> {
+        self.native_accept().map(|s| box s as Box<rtio::RtioPipe + Send>)
     }
     fn set_timeout(&mut self, timeout: Option<u64>) {
         self.deadline = timeout.map(|a| ::io::timer::now() + a).unwrap_or(0);
index b097bde2ad8d0d22b2a1e42cff7e424f749d4375..5d9ddb1f59c150dd389b0673c50fad7afc607ee2 100644 (file)
@@ -496,14 +496,14 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         Ok(())
     }
 
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
         box UnixStream {
             inner: self.inner.clone(),
             read: None,
             write: None,
             read_deadline: 0,
             write_deadline: 0,
-        } as Box<rtio::RtioPipe:Send>
+        } as Box<rtio::RtioPipe + Send>
     }
 
     fn close_read(&mut self) -> IoResult<()> {
@@ -588,9 +588,9 @@ fn drop(&mut self) {
 }
 
 impl rtio::RtioUnixListener for UnixListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor + Send>> {
         self.native_listen().map(|a| {
-            box a as Box<rtio::RtioUnixAcceptor:Send>
+            box a as Box<rtio::RtioUnixAcceptor + Send>
         })
     }
 }
@@ -702,8 +702,8 @@ pub fn native_accept(&mut self) -> IoResult<UnixStream> {
 }
 
 impl rtio::RtioUnixAcceptor for UnixAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe:Send>> {
-        self.native_accept().map(|s| box s as Box<rtio::RtioPipe:Send>)
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe + Send>> {
+        self.native_accept().map(|s| box s as Box<rtio::RtioPipe + Send>)
     }
     fn set_timeout(&mut self, timeout: Option<u64>) {
         self.deadline = timeout.map(|i| i + ::io::timer::now()).unwrap_or(0);
index 11f9c4b3d8cb8cebe6ef32cdce12213125a0cbd8..ab993997c85559e4e351e947b413fdfcf41b5693 100644 (file)
@@ -67,7 +67,7 @@ pub struct Timer {
 }
 
 struct Inner {
-    cb: Option<Box<rtio::Callback:Send>>,
+    cb: Option<Box<rtio::Callback + Send>>,
     interval: u64,
     repeat: bool,
     target: u64,
@@ -251,7 +251,7 @@ fn sleep(&mut self, msecs: u64) {
         Timer::sleep(msecs);
     }
 
-    fn oneshot(&mut self, msecs: u64, cb: Box<rtio::Callback:Send>) {
+    fn oneshot(&mut self, msecs: u64, cb: Box<rtio::Callback + Send>) {
         let now = now();
         let mut inner = self.inner();
 
@@ -263,7 +263,7 @@ fn oneshot(&mut self, msecs: u64, cb: Box<rtio::Callback:Send>) {
         unsafe { HELPER.send(NewTimer(inner)); }
     }
 
-    fn period(&mut self, msecs: u64, cb: Box<rtio::Callback:Send>) {
+    fn period(&mut self, msecs: u64, cb: Box<rtio::Callback + Send>) {
         let now = now();
         let mut inner = self.inner();
 
index d175060dd98606f04502e01e96c3d240d8e86a93..9be09c6de076284ba5a4233425236e1aa1c4c289 100644 (file)
@@ -36,7 +36,7 @@ pub struct Timer {
 }
 
 pub enum Req {
-    NewTimer(libc::HANDLE, Box<Callback:Send>, bool),
+    NewTimer(libc::HANDLE, Box<Callback + Send>, bool),
     RemoveTimer(libc::HANDLE, Sender<()>),
 }
 
@@ -148,7 +148,7 @@ fn sleep(&mut self, msecs: u64) {
         let _ = unsafe { imp::WaitForSingleObject(self.obj, libc::INFINITE) };
     }
 
-    fn oneshot(&mut self, msecs: u64, cb: Box<Callback:Send>) {
+    fn oneshot(&mut self, msecs: u64, cb: Box<Callback + Send>) {
         self.remove();
 
         // see above for the calculation
@@ -162,7 +162,7 @@ fn oneshot(&mut self, msecs: u64, cb: Box<Callback:Send>) {
         self.on_worker = true;
     }
 
-    fn period(&mut self, msecs: u64, cb: Box<Callback:Send>) {
+    fn period(&mut self, msecs: u64, cb: Box<Callback + Send>) {
         self.remove();
 
         // see above for the calculation
index cedc40df300b604c0f6f6e7c3e282df9c577d48d..2fea75746be732cd4b81620102e2610dc07b4dd2 100644 (file)
@@ -635,11 +635,6 @@ fn parse_unicode_name(&mut self) -> Result<Ast, Error> {
             let closer =
                 match self.pos('}') {
                     Some(i) => i,
-                    #[cfg(stage0)]
-                    None => return self.err(format!(
-                        "Missing '\\}' for unclosed '\\{' at position {}",
-                        self.chari).as_slice()),
-                    #[cfg(not(stage0))]
                     None => return self.err(format!(
                         "Missing '}}' for unclosed '{{' at position {}",
                         self.chari).as_slice()),
@@ -701,13 +696,6 @@ fn parse_hex(&mut self) -> Result<Ast, Error> {
         let start = self.chari + 2;
         let closer =
             match self.pos('}') {
-                #[cfg(stage0)]
-                None => {
-                    return self.err(format!("Missing '\\}' for unclosed \
-                                             '\\{' at position {}",
-                                            start).as_slice())
-                }
-                #[cfg(not(stage0))]
                 None => {
                     return self.err(format!("Missing '}}' for unclosed \
                                              '{{' at position {}",
index 1204a2d97b2983012c7a84636676347a741f3eb4..30d0c6d0564f242b7624b802eb54c496126ba92a 100644 (file)
@@ -108,16 +108,6 @@ struct Context<'a> {
 }
 
 impl<'a> Context<'a> {
-    #[cfg(stage0)]
-    fn gate_feature(&self, feature: &str, span: Span, explain: &str) {
-        if !self.has_feature(feature) {
-            self.sess.span_err(span, explain);
-            self.sess.span_note(span, format!("add \\#![feature({})] to the \
-                                                  crate attributes to enable",
-                                                 feature).as_slice());
-        }
-    }
-    #[cfg(not(stage0))]
     fn gate_feature(&self, feature: &str, span: Span, explain: &str) {
         if !self.has_feature(feature) {
             self.sess.span_err(span, explain);
index bdb884cc822056b6acb5054c8457277a616f8833..401d3fd9b244fa4f141d679a1108281ffd24623a 100644 (file)
@@ -63,14 +63,6 @@ struct StandardLibraryInjector<'a> {
 pub fn with_version(krate: &str) -> Option<(InternedString, ast::StrStyle)> {
     match option_env!("CFG_DISABLE_INJECT_STD_VERSION") {
         Some("1") => None,
-        #[cfg(stage0)]
-        _ => {
-            Some((token::intern_and_get_ident(format!("{}\\#{}",
-                                                      krate,
-                                                      VERSION).as_slice()),
-                  ast::CookedStr))
-        }
-        #[cfg(not(stage0))]
         _ => {
             Some((token::intern_and_get_ident(format!("{}#{}",
                                                       krate,
index 9e0bea75186db2ec5a9223b661a5165543e052d2..a9cec9c1842063f38e7eda788dd0f6540d37068f 100644 (file)
@@ -161,15 +161,6 @@ pub fn report_load_errs(&mut self) {
             }
             match self.root {
                 &None => {}
-                #[cfg(stage0)]
-                &Some(ref r) => {
-                    for (i, path) in r.paths().iter().enumerate() {
-                        self.sess.fileline_note(self.span,
-                            format!("crate `{}` path \\#{}: {}",
-                                    r.ident, i+1, path.display()).as_slice());
-                    }
-                }
-                #[cfg(not(stage0))]
                 &Some(ref r) => {
                     for (i, path) in r.paths().iter().enumerate() {
                         self.sess.fileline_note(self.span,
@@ -396,7 +387,7 @@ fn extract_one(&mut self, m: HashSet<Path>, flavor: &str,
                                            flavor,
                                            self.crate_id.name).as_slice());
                 self.sess.span_note(self.span,
-                                    format!(r"candidate \#1: {}",
+                                    format!(r"candidate #1: {}",
                                             ret.get_ref()
                                                .display()).as_slice());
                 error = 1;
@@ -405,7 +396,7 @@ fn extract_one(&mut self, m: HashSet<Path>, flavor: &str,
             if error > 0 {
                 error += 1;
                 self.sess.span_note(self.span,
-                                    format!(r"candidate \#{}: {}", error,
+                                    format!(r"candidate #{}: {}", error,
                                             lib.display()).as_slice());
                 continue
             }
index b8987a382daedfdfba2b87f1ab9ade03768aa396..830178ee880829c2021a53902c9680d642d816f3 100644 (file)
@@ -48,31 +48,6 @@ pub struct ty_abbrev {
 
 pub type abbrev_map = RefCell<HashMap<ty::t, ty_abbrev>>;
 
-#[cfg(stage0)]
-pub fn enc_ty(w: &mut MemWriter, cx: &ctxt, t: ty::t) {
-    match cx.abbrevs.borrow_mut().find(&t) {
-        Some(a) => { w.write(a.s.as_bytes()); return; }
-        None => {}
-    }
-    let pos = w.tell().unwrap();
-    enc_sty(w, cx, &ty::get(t).sty);
-    let end = w.tell().unwrap();
-    let len = end - pos;
-    fn estimate_sz(u: u64) -> u64 {
-        let mut n = u;
-        let mut len = 0;
-        while n != 0 { len += 1; n = n >> 4; }
-        return len;
-    }
-    let abbrev_len = 3 + estimate_sz(pos) + estimate_sz(len);
-    if abbrev_len < len {
-        // I.e. it's actually an abbreviation.
-        cx.abbrevs.borrow_mut().insert(t, ty_abbrev {
-            s: format!("\\#{:x}:{:x}\\#", pos, len)
-        });
-    }
-}
-#[cfg(not(stage0))]
 pub fn enc_ty(w: &mut MemWriter, cx: &ctxt, t: ty::t) {
     match cx.abbrevs.borrow_mut().find(&t) {
         Some(a) => { w.write(a.s.as_bytes()); return; }
index b3b690c804d231282dff3eaebcf594adeaa1d52c..392821a6ad381f04748d909579df2c1ce9bd9fca 100644 (file)
@@ -484,12 +484,6 @@ pub fn emit_lint(level: Level, src: LintSource, msg: &str, span: Span,
 
     let mut note = None;
     let msg = match src {
-        #[cfg(stage0)]
-        Default => {
-            format!("{}, \\#[{}({})] on by default", msg,
-                level_to_str(level), lint_str)
-        },
-        #[cfg(not(stage0))]
         Default => {
             format!("{}, #[{}({})] on by default", msg,
                 level_to_str(level), lint_str)
index 57c10e19e661a9cb8dd1c5d26ee8968f454ff17d..f2a29d14a0d4db8eefb39f3a11e91a1e9731e5b6 100644 (file)
@@ -1253,15 +1253,6 @@ pub fn freely_aliasable(&self, ctxt: &ty::ctxt) -> Option<AliasableReason> {
 }
 
 impl Repr for cmt_ {
-    #[cfg(stage0)]
-    fn repr(&self, tcx: &ty::ctxt) -> String {
-        format!("\\{{} id:{} m:{:?} ty:{}\\}",
-                self.cat.repr(tcx),
-                self.id,
-                self.mutbl,
-                self.ty.repr(tcx))
-    }
-    #[cfg(not(stage0))]
     fn repr(&self, tcx: &ty::ctxt) -> String {
         format!("{{{} id:{} m:{:?} ty:{}}}",
                 self.cat.repr(tcx),
@@ -1315,9 +1306,6 @@ fn repr(&self, _tcx: &ty::ctxt) -> String {
             InteriorField(NamedField(fld)) => {
                 token::get_name(fld).get().to_str()
             }
-            #[cfg(stage0)]
-            InteriorField(PositionalField(i)) => format!("\\#{:?}", i),
-            #[cfg(not(stage0))]
             InteriorField(PositionalField(i)) => format!("#{:?}", i),
             InteriorElement(_) => "[]".to_string(),
         }
index 112ecd66f4cc9023c418b2027b16ac49ce8beb9e..40a6713fe0ca2dda9ab66e40534979f5c71677ff 100644 (file)
@@ -642,10 +642,6 @@ fn check_field(&mut self,
         let msg = match name {
             NamedField(name) => format!("field `{}` of {} is private",
                                         token::get_ident(name), struct_desc),
-            #[cfg(stage0)]
-            UnnamedField(idx) => format!("field \\#{} of {} is private",
-                                         idx + 1, struct_desc),
-            #[cfg(not(stage0))]
             UnnamedField(idx) => format!("field #{} of {} is private",
                                          idx + 1, struct_desc),
         };
index 795c292b981f217056146b32d0ede66d5478ca5e..23ff1ff394acc7ed418b9f4b42a6ee6ab7f54ba2 100644 (file)
@@ -4070,16 +4070,6 @@ fn check_consistent_bindings(&mut self, arm: &Arm) {
 
             for (&key, &binding_0) in map_0.iter() {
                 match map_i.find(&key) {
-                  #[cfg(stage0)]
-                  None => {
-                    self.resolve_error(
-                        p.span,
-                        format!("variable `{}` from pattern \\#1 is \
-                                  not bound in pattern \\#{}",
-                                token::get_name(key),
-                                i + 1).as_slice());
-                  }
-                  #[cfg(not(stage0))]
                   None => {
                     self.resolve_error(
                         p.span,
@@ -4088,18 +4078,6 @@ fn check_consistent_bindings(&mut self, arm: &Arm) {
                                 token::get_name(key),
                                 i + 1).as_slice());
                   }
-                  #[cfg(stage0)]
-                  Some(binding_i) => {
-                    if binding_0.binding_mode != binding_i.binding_mode {
-                        self.resolve_error(
-                            binding_i.span,
-                            format!("variable `{}` is bound with different \
-                                      mode in pattern \\#{} than in pattern \\#1",
-                                    token::get_name(key),
-                                    i + 1).as_slice());
-                    }
-                  }
-                  #[cfg(not(stage0))]
                   Some(binding_i) => {
                     if binding_0.binding_mode != binding_i.binding_mode {
                         self.resolve_error(
@@ -5107,22 +5085,6 @@ fn resolve_expr(&mut self, expr: &Expr) {
                         // structs, which wouldn't result in this error.)
                         match self.with_no_errors(|this|
                             this.resolve_path(expr.id, path, TypeNS, false)) {
-                            #[cfg(stage0)]
-                            Some((DefTy(struct_id), _))
-                              if self.structs.contains_key(&struct_id) => {
-                                self.resolve_error(expr.span,
-                                        format!("`{}` is a structure name, but \
-                                                 this expression \
-                                                 uses it like a function name",
-                                                wrong_name).as_slice());
-
-                                self.session.span_note(expr.span,
-                                    format!("Did you mean to write: \
-                                            `{} \\{ /* fields */ \\}`?",
-                                            wrong_name).as_slice());
-
-                            }
-                            #[cfg(not(stage0))]
                             Some((DefTy(struct_id), _))
                               if self.structs.contains_key(&struct_id) => {
                                 self.resolve_error(expr.span,
index 6005d4fbda8959db336dd9125c0b77ad13688f1a..65bf0b8500821d820a9e87ade08fab792fd5d4f1 100644 (file)
@@ -73,16 +73,6 @@ pub struct VecTypes {
 }
 
 impl VecTypes {
-    #[cfg(stage0)]
-    pub fn to_str(&self, ccx: &CrateContext) -> String {
-        format!("VecTypes \\{unit_ty={}, llunit_ty={}, \
-                 llunit_size={}, llunit_alloc_size={}\\}",
-                ty_to_str(ccx.tcx(), self.unit_ty),
-                ccx.tn.type_to_str(self.llunit_ty),
-                ccx.tn.val_to_str(self.llunit_size),
-                self.llunit_alloc_size)
-    }
-    #[cfg(not(stage0))]
     pub fn to_str(&self, ccx: &CrateContext) -> String {
         format!("VecTypes {{unit_ty={}, llunit_ty={}, \
                  llunit_size={}, llunit_alloc_size={}}}",
index 443eec07cc2090a0f69309b758154e101521a8a1..3ac1027221b6191b4563760296d8aa4549fe9d48 100644 (file)
@@ -899,11 +899,6 @@ impl Vid for TyVid {
 }
 
 impl fmt::Show for TyVid {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result{
-        write!(f, "<generic \\#{}>", self.to_uint())
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result{
         write!(f, "<generic #{}>", self.to_uint())
     }
@@ -914,11 +909,6 @@ impl Vid for IntVid {
 }
 
 impl fmt::Show for IntVid {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "<generic integer \\#{}>", self.to_uint())
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "<generic integer #{}>", self.to_uint())
     }
@@ -929,11 +919,6 @@ impl Vid for FloatVid {
 }
 
 impl fmt::Show for FloatVid {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "<generic float \\#{}>", self.to_uint())
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         write!(f, "<generic float #{}>", self.to_uint())
     }
index aa6877584035def428b0fed06eac426271bc1241..864de344db2cdd12ccdd42ef0db2c24a6824fbcb 100644 (file)
@@ -1412,40 +1412,6 @@ fn report_candidate(&self, idx: uint, origin: &MethodOrigin) {
         }
     }
 
-    #[cfg(stage0)]
-    fn report_static_candidate(&self, idx: uint, did: DefId) {
-        let span = if did.krate == ast::LOCAL_CRATE {
-            self.tcx().map.span(did.node)
-        } else {
-            self.span
-        };
-        self.tcx().sess.span_note(
-            span,
-            format!("candidate \\#{} is `{}`",
-                    idx + 1u,
-                    ty::item_path_str(self.tcx(), did)).as_slice());
-    }
-
-    #[cfg(stage0)]
-    fn report_param_candidate(&self, idx: uint, did: DefId) {
-        self.tcx().sess.span_note(
-            self.span,
-            format!("candidate \\#{} derives from the bound `{}`",
-                    idx + 1u,
-                    ty::item_path_str(self.tcx(), did)).as_slice());
-    }
-
-    #[cfg(stage0)]
-    fn report_trait_candidate(&self, idx: uint, did: DefId) {
-        self.tcx().sess.span_note(
-            self.span,
-            format!("candidate \\#{} derives from the type of the receiver, \
-                     which is the trait `{}`",
-                    idx + 1u,
-                    ty::item_path_str(self.tcx(), did)).as_slice());
-    }
-
-    #[cfg(not(stage0))]
     fn report_static_candidate(&self, idx: uint, did: DefId) {
         let span = if did.krate == ast::LOCAL_CRATE {
             self.tcx().map.span(did.node)
@@ -1459,7 +1425,6 @@ fn report_static_candidate(&self, idx: uint, did: DefId) {
                     ty::item_path_str(self.tcx(), did)).as_slice());
     }
 
-    #[cfg(not(stage0))]
     fn report_param_candidate(&self, idx: uint, did: DefId) {
         self.tcx().sess.span_note(
             self.span,
@@ -1468,7 +1433,6 @@ fn report_param_candidate(&self, idx: uint, did: DefId) {
                     ty::item_path_str(self.tcx(), did)).as_slice());
     }
 
-    #[cfg(not(stage0))]
     fn report_trait_candidate(&self, idx: uint, did: DefId) {
         self.tcx().sess.span_note(
             self.span,
index 5be1b7ba791224306a1dc5953e0a16db58281d56..097c5dcfedaa34a5cc81af93ff2e5acd41b69a1c 100644 (file)
@@ -61,11 +61,6 @@ fn inf_str(&self, cx: &InferCtxt) -> String {
 }
 
 impl<T:InferStr> InferStr for Bounds<T> {
-    #[cfg(stage0)]
-    fn inf_str(&self, cx: &InferCtxt) -> String {
-        format!("\\{{} <: {}\\}", self.lb.inf_str(cx), self.ub.inf_str(cx))
-    }
-    #[cfg(not(stage0))]
     fn inf_str(&self, cx: &InferCtxt) -> String {
         format!("{{{} <: {}}}", self.lb.inf_str(cx), self.ub.inf_str(cx))
     }
index 80f3508d0cd354bd678b7fc3a8592803eba3e294..aac0b12e46f146cde21fdd5a464611b940f2d59b 100644 (file)
@@ -96,11 +96,6 @@ pub fn explain_region_and_span(cx: &ctxt, region: ty::Region)
 
       ReFree(ref fr) => {
         let prefix = match fr.bound_region {
-          #[cfg(stage0)]
-          BrAnon(idx) => {
-              format!("the anonymous lifetime \\#{} defined on", idx + 1)
-          }
-          #[cfg(not(stage0))]
           BrAnon(idx) => {
               format!("the anonymous lifetime #{} defined on", idx + 1)
           }
@@ -381,9 +376,6 @@ fn push_sig_to_str(cx: &ctxt,
               Some(def) => token::get_ident(def.ident).get().to_string(),
               // This can only happen when a type mismatch error happens and
               // the actual type has more type parameters than the expected one.
-              #[cfg(stage0)]
-              None => format!("<generic \\#{}>", id),
-              #[cfg(not(stage0))]
               None => format!("<generic #{}>", id),
           };
           if !cx.sess.verbose() {
@@ -758,13 +750,6 @@ fn repr(&self, tcx: &ctxt) -> String {
 }
 
 impl Repr for ty::ty_param_bounds_and_ty {
-    #[cfg(stage0)]
-    fn repr(&self, tcx: &ctxt) -> String {
-        format!("ty_param_bounds_and_ty \\{generics: {}, ty: {}\\}",
-                self.generics.repr(tcx),
-                self.ty.repr(tcx))
-    }
-    #[cfg(not(stage0))]
     fn repr(&self, tcx: &ctxt) -> String {
         format!("ty_param_bounds_and_ty {{generics: {}, ty: {}}}",
                 self.generics.repr(tcx),
@@ -836,14 +821,6 @@ fn repr(&self, _tcx: &ctxt) -> String {
 }
 
 impl Repr for ty::BareFnTy {
-    #[cfg(stage0)]
-    fn repr(&self, tcx: &ctxt) -> String {
-        format!("BareFnTy \\{fn_style: {:?}, abi: {}, sig: {}\\}",
-                self.fn_style,
-                self.abi.to_str(),
-                self.sig.repr(tcx))
-    }
-    #[cfg(not(stage0))]
     fn repr(&self, tcx: &ctxt) -> String {
         format!("BareFnTy {{fn_style: {:?}, abi: {}, sig: {}}}",
                 self.fn_style,
@@ -859,14 +836,6 @@ fn repr(&self, tcx: &ctxt) -> String {
 }
 
 impl Repr for typeck::MethodCallee {
-    #[cfg(stage0)]
-    fn repr(&self, tcx: &ctxt) -> String {
-        format!("MethodCallee \\{origin: {}, ty: {}, {}\\}",
-                self.origin.repr(tcx),
-                self.ty.repr(tcx),
-                self.substs.repr(tcx))
-    }
-    #[cfg(not(stage0))]
     fn repr(&self, tcx: &ctxt) -> String {
         format!("MethodCallee {{origin: {}, ty: {}, {}}}",
                 self.origin.repr(tcx),
index a71f702caca1fac2865aed72469f6f2d819378e7..29d1be888249bb7706f1f1c9e4b907f81c3a91cc 100644 (file)
@@ -91,7 +91,6 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 impl fmt::Show for clean::Lifetime {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(f.write("'".as_bytes()));
         try!(f.write(self.get_ref().as_bytes()));
         Ok(())
     }
index 3c9358b03a9837bd18de9adf30a836db9977fd08..f0d7b029debdc7cbc47af2252e973aca5884dceb 100644 (file)
@@ -126,7 +126,7 @@ fn doit(sess: &parse::ParseSess, mut lexer: lexer::StringReader,
             // span when we see the ']'.
             t::POUND => {
                 is_attribute = true;
-                try!(write!(out, r"<span class='attribute'>\#"));
+                try!(write!(out, r"<span class='attribute'>#"));
                 continue
             }
             t::RBRACKET => {
index dffb2118b931861a2676c99697e0c5ed857241cb..f48a93574e7e75715dacb3fd4aea5862b2936d1b 100644 (file)
@@ -86,7 +86,7 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
                 <dd>Move up in search results</dd>
                 <dt>&darr;</dt>
                 <dd>Move down in search results</dd>
-                <dt>&\#9166;</dt>
+                <dt>&#9166;</dt>
                 <dd>Go to active search result</dd>
             </dl>
         </div>
index 0cacf2f824faa3c4f1a6696b8655a1b45281a41a..ceb7bbbc23e7c06033e62664fe8613da32da4c56 100644 (file)
@@ -259,8 +259,8 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
         };
 
         // Render the HTML
-        let text = format!(r#"<h{lvl} id="{id}" class='section-header'><a
-                           href="\#{id}">{sec}{}</a></h{lvl}>"#,
+        let text = format!(r##"<h{lvl} id="{id}" class='section-header'><a
+                           href="#{id}">{sec}{}</a></h{lvl}>"##,
                            s, lvl = level, id = id,
                            sec = if sec.len() == 0 {
                                sec.to_string()
index c6d8632082ea7852a01b7449ddaa5869163274f7..45c75ccd1ab42df0bff008f5e3b04e31b3960160 100644 (file)
@@ -179,7 +179,7 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
             // recursively format this table of contents (the
             // `{children}` is the key).
             try!(write!(fmt,
-                        "\n<li><a href=\"\\#{id}\">{num} {name}</a>{children}</li>",
+                        "\n<li><a href=\"#{id}\">{num} {name}</a>{children}</li>",
                         id = entry.id,
                         num = entry.sec_number, name = entry.name,
                         children = entry.children))
index 411521fa0dbda0e039a050c7e319d68faccc5ae4..907d9fc7561d400eae83a41c513fe31c46f0dfcf 100644 (file)
@@ -136,7 +136,7 @@ fn runtest(test: &str, cratename: &str, libs: HashSet<Path>, should_fail: bool,
     let old = io::stdio::set_stderr(box w1);
     spawn(proc() {
         let mut p = io::ChanReader::new(rx);
-        let mut err = old.unwrap_or(box io::stderr() as Box<Writer:Send>);
+        let mut err = old.unwrap_or(box io::stderr() as Box<Writer + Send>);
         io::util::copy(&mut p, &mut err).unwrap();
     });
     let emitter = diagnostic::EmitterWriter::new(box w2);
index 215c0992bc022305b13b4a179a7d9fac1522fee3..2e7c3ef37b9dc60a063f56359f08d5d974e72cb8 100644 (file)
@@ -91,7 +91,7 @@ impl<T: 'static> LocalData for T {}
 //      a proper map.
 #[doc(hidden)]
 pub type Map = Vec<Option<(*u8, TLSValue, uint)>>;
-type TLSValue = Box<LocalData:Send>;
+type TLSValue = Box<LocalData + Send>;
 
 // Gets the map from the runtime. Lazily initialises if not done so already.
 unsafe fn get_local_map() -> Option<&mut Map> {
@@ -175,7 +175,7 @@ pub fn replace(&'static self, data: Option<T>) -> Option<T> {
         // anything.
         let newval = data.map(|d| {
             let d = box d as Box<LocalData>;
-            let d: Box<LocalData:Send> = unsafe { mem::transmute(d) };
+            let d: Box<LocalData + Send> = unsafe { mem::transmute(d) };
             (keyval, d, 0)
         });
 
@@ -236,7 +236,7 @@ pub fn get(&'static self) -> Option<Ref<T>> {
             // pointer part of the trait, (as ~T), and then use
             // compiler coercions to achieve a '&' pointer.
             let ptr = unsafe {
-                let data = data as *Box<LocalData:Send> as *raw::TraitObject;
+                let data = data as *Box<LocalData + Send> as *raw::TraitObject;
                 &mut *((*data).data as *mut T)
             };
             Ref { _ptr: ptr, _index: pos, _nosend: marker::NoSend, _key: self }
index 00f761bae2152e133780dea04f574ac05fe8f2a0..a68d453b77d89e48011f826e883dfcc0e6e5abd8 100644 (file)
 
 pub trait EventLoop {
     fn run(&mut self);
-    fn callback(&mut self, arg: proc():Send);
-    fn pausable_idle_callback(&mut self, Box<Callback:Send>)
-                              -> Box<PausableIdleCallback:Send>;
-    fn remote_callback(&mut self, Box<Callback:Send>)
-                       -> Box<RemoteCallback:Send>;
+    fn callback(&mut self, arg: proc(): Send);
+    fn pausable_idle_callback(&mut self, Box<Callback + Send>)
+                              -> Box<PausableIdleCallback + Send>;
+    fn remote_callback(&mut self, Box<Callback + Send>)
+                       -> Box<RemoteCallback + Send>;
 
     /// The asynchronous I/O services. Not all event loops may provide one.
     fn io<'a>(&'a mut self) -> Option<&'a mut IoFactory>;
@@ -189,24 +189,24 @@ pub fn get<'a>(&'a mut self) -> &'a mut IoFactory {
 pub trait IoFactory {
     // networking
     fn tcp_connect(&mut self, addr: SocketAddr,
-                   timeout: Option<u64>) -> IoResult<Box<RtioTcpStream:Send>>;
+                   timeout: Option<u64>) -> IoResult<Box<RtioTcpStream + Send>>;
     fn tcp_bind(&mut self, addr: SocketAddr)
-                -> IoResult<Box<RtioTcpListener:Send>>;
+                -> IoResult<Box<RtioTcpListener + Send>>;
     fn udp_bind(&mut self, addr: SocketAddr)
-                -> IoResult<Box<RtioUdpSocket:Send>>;
+                -> IoResult<Box<RtioUdpSocket + Send>>;
     fn unix_bind(&mut self, path: &CString)
-                 -> IoResult<Box<RtioUnixListener:Send>>;
+                 -> IoResult<Box<RtioUnixListener + Send>>;
     fn unix_connect(&mut self, path: &CString,
-                    timeout: Option<u64>) -> IoResult<Box<RtioPipe:Send>>;
+                    timeout: Option<u64>) -> IoResult<Box<RtioPipe + Send>>;
     fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
                           hint: Option<AddrinfoHint>)
                           -> IoResult<Vec<AddrinfoInfo>>;
 
     // filesystem operations
     fn fs_from_raw_fd(&mut self, fd: c_int, close: CloseBehavior)
-                      -> Box<RtioFileStream:Send>;
+                      -> Box<RtioFileStream + Send>;
     fn fs_open(&mut self, path: &CString, fm: FileMode, fa: FileAccess)
-               -> IoResult<Box<RtioFileStream:Send>>;
+               -> IoResult<Box<RtioFileStream + Send>>;
     fn fs_unlink(&mut self, path: &CString) -> IoResult<()>;
     fn fs_stat(&mut self, path: &CString) -> IoResult<FileStat>;
     fn fs_mkdir(&mut self, path: &CString, mode: uint) -> IoResult<()>;
@@ -225,24 +225,24 @@ fn fs_utime(&mut self, src: &CString, atime: u64, mtime: u64) ->
         IoResult<()>;
 
     // misc
-    fn timer_init(&mut self) -> IoResult<Box<RtioTimer:Send>>;
+    fn timer_init(&mut self) -> IoResult<Box<RtioTimer + Send>>;
     fn spawn(&mut self, cfg: ProcessConfig)
-            -> IoResult<(Box<RtioProcess:Send>,
-                         Vec<Option<Box<RtioPipe:Send>>>)>;
+            -> IoResult<(Box<RtioProcess + Send>,
+                         Vec<Option<Box<RtioPipe + Send>>>)>;
     fn kill(&mut self, pid: libc::pid_t, signal: int) -> IoResult<()>;
-    fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<RtioPipe:Send>>;
+    fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<RtioPipe + Send>>;
     fn tty_open(&mut self, fd: c_int, readable: bool)
-            -> IoResult<Box<RtioTTY:Send>>;
-    fn signal(&mut self, signal: int, cb: Box<Callback:Send>)
-        -> IoResult<Box<RtioSignal:Send>>;
+            -> IoResult<Box<RtioTTY + Send>>;
+    fn signal(&mut self, signal: int, cb: Box<Callback + Send>)
+        -> IoResult<Box<RtioSignal + Send>>;
 }
 
 pub trait RtioTcpListener : RtioSocket {
-    fn listen(~self) -> IoResult<Box<RtioTcpAcceptor:Send>>;
+    fn listen(~self) -> IoResult<Box<RtioTcpAcceptor + Send>>;
 }
 
 pub trait RtioTcpAcceptor : RtioSocket {
-    fn accept(&mut self) -> IoResult<Box<RtioTcpStream:Send>>;
+    fn accept(&mut self) -> IoResult<Box<RtioTcpStream + Send>>;
     fn accept_simultaneously(&mut self) -> IoResult<()>;
     fn dont_accept_simultaneously(&mut self) -> IoResult<()>;
     fn set_timeout(&mut self, timeout: Option<u64>);
@@ -256,7 +256,7 @@ pub trait RtioTcpStream : RtioSocket {
     fn nodelay(&mut self) -> IoResult<()>;
     fn keepalive(&mut self, delay_in_seconds: uint) -> IoResult<()>;
     fn letdie(&mut self) -> IoResult<()>;
-    fn clone(&self) -> Box<RtioTcpStream:Send>;
+    fn clone(&self) -> Box<RtioTcpStream + Send>;
     fn close_write(&mut self) -> IoResult<()>;
     fn close_read(&mut self) -> IoResult<()>;
     fn set_timeout(&mut self, timeout_ms: Option<u64>);
@@ -284,7 +284,7 @@ pub trait RtioUdpSocket : RtioSocket {
     fn hear_broadcasts(&mut self) -> IoResult<()>;
     fn ignore_broadcasts(&mut self) -> IoResult<()>;
 
-    fn clone(&self) -> Box<RtioUdpSocket:Send>;
+    fn clone(&self) -> Box<RtioUdpSocket + Send>;
     fn set_timeout(&mut self, timeout_ms: Option<u64>);
     fn set_read_timeout(&mut self, timeout_ms: Option<u64>);
     fn set_write_timeout(&mut self, timeout_ms: Option<u64>);
@@ -292,8 +292,8 @@ pub trait RtioUdpSocket : RtioSocket {
 
 pub trait RtioTimer {
     fn sleep(&mut self, msecs: u64);
-    fn oneshot(&mut self, msecs: u64, cb: Box<Callback:Send>);
-    fn period(&mut self, msecs: u64, cb: Box<Callback:Send>);
+    fn oneshot(&mut self, msecs: u64, cb: Box<Callback + Send>);
+    fn period(&mut self, msecs: u64, cb: Box<Callback + Send>);
 }
 
 pub trait RtioFileStream {
@@ -319,7 +319,7 @@ pub trait RtioProcess {
 pub trait RtioPipe {
     fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
     fn write(&mut self, buf: &[u8]) -> IoResult<()>;
-    fn clone(&self) -> Box<RtioPipe:Send>;
+    fn clone(&self) -> Box<RtioPipe + Send>;
 
     fn close_write(&mut self) -> IoResult<()>;
     fn close_read(&mut self) -> IoResult<()>;
@@ -329,11 +329,11 @@ pub trait RtioPipe {
 }
 
 pub trait RtioUnixListener {
-    fn listen(~self) -> IoResult<Box<RtioUnixAcceptor:Send>>;
+    fn listen(~self) -> IoResult<Box<RtioUnixAcceptor + Send>>;
 }
 
 pub trait RtioUnixAcceptor {
-    fn accept(&mut self) -> IoResult<Box<RtioPipe:Send>>;
+    fn accept(&mut self) -> IoResult<Box<RtioPipe + Send>>;
     fn set_timeout(&mut self, timeout: Option<u64>);
 }
 
index e99703a1f58bc6745e7b16779e1dafff4203e1a4..ce43f7858b64a19ad7a8fa239991f88240af9b9b 100644 (file)
@@ -46,12 +46,12 @@ pub struct Task {
     pub destroyed: bool,
     pub name: Option<SendStr>,
 
-    imp: Option<Box<Runtime:Send>>,
+    imp: Option<Box<Runtime + Send>>,
 }
 
 pub struct TaskOpts {
     /// Invoke this procedure with the result of the task when it finishes.
-    pub on_exit: Option<proc(Result):Send>,
+    pub on_exit: Option<proc(Result): Send>,
     /// A name for the task-to-be, for identification in failure messages
     pub name: Option<SendStr>,
     /// The size of the stack for the spawned task
@@ -64,7 +64,7 @@ pub struct TaskOpts {
 ///
 /// If you wish for this result's delivery to block until all
 /// children tasks complete, recommend using a result future.
-pub type Result = ::core::result::Result<(), Box<Any:Send>>;
+pub type Result = ::core::result::Result<(), Box<Any + Send>>;
 
 pub struct GarbageCollector;
 pub struct LocalStorage(pub Option<local_data::Map>);
@@ -79,7 +79,7 @@ pub enum BlockedTask {
 
 /// Per-task state related to task death, killing, failure, etc.
 pub struct Death {
-    pub on_exit: Option<proc(Result):Send>,
+    pub on_exit: Option<proc(Result): Send>,
 }
 
 pub struct BlockedTasks {
@@ -177,7 +177,7 @@ pub fn run(~self, mut f: ||) -> Box<Task> {
     /// Inserts a runtime object into this task, transferring ownership to the
     /// task. It is illegal to replace a previous runtime object in this task
     /// with this argument.
-    pub fn put_runtime(&mut self, ops: Box<Runtime:Send>) {
+    pub fn put_runtime(&mut self, ops: Box<Runtime + Send>) {
         assert!(self.imp.is_none());
         self.imp = Some(ops);
     }
@@ -207,7 +207,7 @@ pub fn maybe_take_runtime<T: 'static>(&mut self) -> Option<Box<T>> {
                 Ok(t) => Some(t),
                 Err(t) => {
                     let data = mem::transmute::<_, raw::TraitObject>(t).data;
-                    let obj: Box<Runtime:Send> =
+                    let obj: Box<Runtime + Send> =
                         mem::transmute(raw::TraitObject {
                             vtable: vtable,
                             data: data,
@@ -221,7 +221,7 @@ pub fn maybe_take_runtime<T: 'static>(&mut self) -> Option<Box<T>> {
 
     /// Spawns a sibling to this task. The newly spawned task is configured with
     /// the `opts` structure and will run `f` as the body of its code.
-    pub fn spawn_sibling(mut ~self, opts: TaskOpts, f: proc():Send) {
+    pub fn spawn_sibling(mut ~self, opts: TaskOpts, f: proc(): Send) {
         let ops = self.imp.take_unwrap();
         ops.spawn_sibling(self, opts, f)
     }
index aebed5a8829c5290c3acc2965ee623934c7086c7..86e2c3f3db9b0e381a0a9a43659ecfcd4beb8943 100644 (file)
 
 pub struct Unwinder {
     unwinding: bool,
-    cause: Option<Box<Any:Send>>
+    cause: Option<Box<Any + Send>>
 }
 
 struct Exception {
     uwe: uw::_Unwind_Exception,
-    cause: Option<Box<Any:Send>>,
+    cause: Option<Box<Any + Send>>,
 }
 
-pub type Callback = fn(msg: &Any:Send, file: &'static str, line: uint);
+pub type Callback = fn(msg: &Any + Send, file: &'static str, line: uint);
 
 // Variables used for invoking callbacks when a task starts to unwind.
 //
@@ -148,7 +148,7 @@ pub fn result(&mut self) -> Result {
 ///   guaranteed that a rust task is in place when invoking this function.
 ///   Unwinding twice can lead to resource leaks where some destructors are not
 ///   run.
-pub unsafe fn try(f: ||) -> ::core::result::Result<(), Box<Any:Send>> {
+pub unsafe fn try(f: ||) -> ::core::result::Result<(), Box<Any + Send>> {
     let closure: Closure = mem::transmute(f);
     let ep = rust_try(try_fn, closure.code as *c_void,
                       closure.env as *c_void);
@@ -187,7 +187,7 @@ fn rust_try(f: extern "C" fn(*c_void, *c_void),
 // An uninlined, unmangled function upon which to slap yer breakpoints
 #[inline(never)]
 #[no_mangle]
-fn rust_fail(cause: Box<Any:Send>) -> ! {
+fn rust_fail(cause: Box<Any + Send>) -> ! {
     rtdebug!("begin_unwind()");
 
     unsafe {
@@ -400,7 +400,7 @@ pub fn begin_unwind<M: Any + Send>(msg: M, file: &'static str, line: uint) -> !
 /// Do this split took the LLVM IR line counts of `fn main() { fail!()
 /// }` from ~1900/3700 (-O/no opts) to 180/590.
 #[inline(never)] #[cold] // this is the slow path, please never inline this
-fn begin_unwind_inner(msg: Box<Any:Send>,
+fn begin_unwind_inner(msg: Box<Any + Send>,
                       file: &'static str,
                       line: uint) -> ! {
     // First, invoke call the user-defined callbacks triggered on task failure.
index 5167ce5aff2d98430b9646f2f96c6ee2d9c5d333..323bd0fbce2f5f7c3068e93c1e40bc8c4275fc07 100644 (file)
@@ -27,12 +27,12 @@ pub struct AsyncWatcher {
 }
 
 struct Payload {
-    callback: Box<Callback:Send>,
+    callback: Box<Callback + Send>,
     exit_flag: Arc<Exclusive<bool>>,
 }
 
 impl AsyncWatcher {
-    pub fn new(loop_: &mut Loop, cb: Box<Callback:Send>) -> AsyncWatcher {
+    pub fn new(loop_: &mut Loop, cb: Box<Callback + Send>) -> AsyncWatcher {
         let handle = UvHandle::alloc(None::<AsyncWatcher>, uvll::UV_ASYNC);
         assert_eq!(unsafe {
             uvll::uv_async_init(loop_.handle, handle, async_cb)
index fe8935db2ec128278b9c7367ccce085e9513169c..43ddd2681b3e30b51ffbd869ae8e672aa2cb69f1 100644 (file)
 pub struct IdleWatcher {
     handle: *uvll::uv_idle_t,
     idle_flag: bool,
-    callback: Box<Callback:Send>,
+    callback: Box<Callback + Send>,
 }
 
 impl IdleWatcher {
-    pub fn new(loop_: &mut Loop, cb: Box<Callback:Send>) -> Box<IdleWatcher> {
+    pub fn new(loop_: &mut Loop, cb: Box<Callback + Send>) -> Box<IdleWatcher> {
         let handle = UvHandle::alloc(None::<IdleWatcher>, uvll::UV_IDLE);
         assert_eq!(unsafe {
             uvll::uv_idle_init(loop_.handle, handle)
@@ -127,7 +127,7 @@ fn call(&mut self) {
     fn mk(v: uint) -> (Box<IdleWatcher>, Chan) {
         let rc = Rc::new(RefCell::new((None, 0)));
         let cb = box MyCallback(rc.clone(), v);
-        let cb = cb as Box<Callback:>;
+        let cb = cb as Box<Callback>;
         let cb = unsafe { mem::transmute(cb) };
         (IdleWatcher::new(&mut local_loop().loop_, cb), rc)
     }
index d67adfe501e62e5db7202c634a238ded8c432461..78c2c5ff630576d46c46a8b9b6d32497e069dc18 100644 (file)
@@ -125,8 +125,8 @@ fn start(argc: int, argv: **u8) -> int {
 ///     // this code is running inside of a green task powered by libuv
 /// }
 /// ```
-pub fn event_loop() -> Box<rtio::EventLoop:Send> {
-    box uvio::UvEventLoop::new() as Box<rtio::EventLoop:Send>
+pub fn event_loop() -> Box<rtio::EventLoop + Send> {
+    box uvio::UvEventLoop::new() as Box<rtio::EventLoop + Send>
 }
 
 /// A type that wraps a uv handle
index 47b321b068b36ae6046cd91107d38e428f3e51d0..c8fb0f496dcb72182d931114d5a8e81aef9b1c22 100644 (file)
@@ -165,8 +165,8 @@ pub struct TcpWatcher {
 pub struct TcpListener {
     home: HomeHandle,
     handle: *uvll::uv_pipe_t,
-    outgoing: Sender<Result<Box<rtio::RtioTcpStream:Send>, IoError>>,
-    incoming: Receiver<Result<Box<rtio::RtioTcpStream:Send>, IoError>>,
+    outgoing: Sender<Result<Box<rtio::RtioTcpStream + Send>, IoError>>,
+    incoming: Receiver<Result<Box<rtio::RtioTcpStream + Send>, IoError>>,
 }
 
 pub struct TcpAcceptor {
@@ -274,7 +274,7 @@ fn letdie(&mut self) -> Result<(), IoError> {
         })
     }
 
-    fn clone(&self) -> Box<rtio::RtioTcpStream:Send> {
+    fn clone(&self) -> Box<rtio::RtioTcpStream + Send> {
         box TcpWatcher {
             handle: self.handle,
             stream: StreamWatcher::new(self.handle),
@@ -282,7 +282,7 @@ fn clone(&self) -> Box<rtio::RtioTcpStream:Send> {
             refcount: self.refcount.clone(),
             read_access: self.read_access.clone(),
             write_access: self.write_access.clone(),
-        } as Box<rtio::RtioTcpStream:Send>
+        } as Box<rtio::RtioTcpStream + Send>
     }
 
     fn close_read(&mut self) -> Result<(), IoError> {
@@ -388,7 +388,7 @@ fn socket_name(&mut self) -> Result<rtio::SocketAddr, IoError> {
 }
 
 impl rtio::RtioTcpListener for TcpListener {
-    fn listen(~self) -> Result<Box<rtio::RtioTcpAcceptor:Send>, IoError> {
+    fn listen(~self) -> Result<Box<rtio::RtioTcpAcceptor + Send>, IoError> {
         // create the acceptor object from ourselves
         let mut acceptor = box TcpAcceptor {
             listener: self,
@@ -398,7 +398,7 @@ fn listen(~self) -> Result<Box<rtio::RtioTcpAcceptor:Send>, IoError> {
         let _m = acceptor.fire_homing_missile();
         // FIXME: the 128 backlog should be configurable
         match unsafe { uvll::uv_listen(acceptor.listener.handle, 128, listen_cb) } {
-            0 => Ok(acceptor as Box<rtio::RtioTcpAcceptor:Send>),
+            0 => Ok(acceptor as Box<rtio::RtioTcpAcceptor + Send>),
             n => Err(uv_error_to_io_error(UvError(n))),
         }
     }
@@ -414,7 +414,7 @@ fn listen(~self) -> Result<Box<rtio::RtioTcpAcceptor:Send>, IoError> {
             });
             let client = TcpWatcher::new_home(&loop_, tcp.home().clone());
             assert_eq!(unsafe { uvll::uv_accept(server, client.handle) }, 0);
-            Ok(box client as Box<rtio::RtioTcpStream:Send>)
+            Ok(box client as Box<rtio::RtioTcpStream + Send>)
         }
         n => Err(uv_error_to_io_error(UvError(n)))
     };
@@ -442,7 +442,7 @@ fn socket_name(&mut self) -> Result<rtio::SocketAddr, IoError> {
 }
 
 impl rtio::RtioTcpAcceptor for TcpAcceptor {
-    fn accept(&mut self) -> Result<Box<rtio::RtioTcpStream:Send>, IoError> {
+    fn accept(&mut self) -> Result<Box<rtio::RtioTcpStream + Send>, IoError> {
         self.timeout.accept(&self.listener.incoming)
     }
 
@@ -740,7 +740,7 @@ fn ignore_broadcasts(&mut self) -> Result<(), IoError> {
         })
     }
 
-    fn clone(&self) -> Box<rtio::RtioUdpSocket:Send> {
+    fn clone(&self) -> Box<rtio::RtioUdpSocket + Send> {
         box UdpWatcher {
             handle: self.handle,
             home: self.home.clone(),
@@ -748,7 +748,7 @@ fn clone(&self) -> Box<rtio::RtioUdpSocket:Send> {
             write_access: self.write_access.clone(),
             read_access: self.read_access.clone(),
             blocked_sender: None,
-        } as Box<rtio::RtioUdpSocket:Send>
+        } as Box<rtio::RtioUdpSocket + Send>
     }
 
     fn set_timeout(&mut self, timeout: Option<u64>) {
index e5c134b6b92687b7285f3b88935efd9158bbe104..2ac9bfd202b8e8bcd011af3b1c896a41befbeb38 100644 (file)
@@ -38,8 +38,8 @@ pub struct PipeWatcher {
 pub struct PipeListener {
     home: HomeHandle,
     pipe: *uvll::uv_pipe_t,
-    outgoing: Sender<IoResult<Box<rtio::RtioPipe:Send>>>,
-    incoming: Receiver<IoResult<Box<rtio::RtioPipe:Send>>>,
+    outgoing: Sender<IoResult<Box<rtio::RtioPipe + Send>>>,
+    incoming: Receiver<IoResult<Box<rtio::RtioPipe + Send>>>,
 }
 
 pub struct PipeAcceptor {
@@ -129,7 +129,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         self.stream.write(buf, guard.can_timeout).map_err(uv_error_to_io_error)
     }
 
-    fn clone(&self) -> Box<rtio::RtioPipe:Send> {
+    fn clone(&self) -> Box<rtio::RtioPipe + Send> {
         box PipeWatcher {
             stream: StreamWatcher::new(self.stream.handle),
             defused: false,
@@ -137,7 +137,7 @@ fn clone(&self) -> Box<rtio::RtioPipe:Send> {
             refcount: self.refcount.clone(),
             read_access: self.read_access.clone(),
             write_access: self.write_access.clone(),
-        } as Box<rtio::RtioPipe:Send>
+        } as Box<rtio::RtioPipe + Send>
     }
 
     fn close_read(&mut self) -> IoResult<()> {
@@ -248,7 +248,7 @@ pub fn bind(io: &mut UvIoFactory, name: &CString)
 }
 
 impl rtio::RtioUnixListener for PipeListener {
-    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
+    fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor + Send>> {
         // create the acceptor object from ourselves
         let mut acceptor = box PipeAcceptor {
             listener: self,
@@ -258,7 +258,7 @@ fn listen(~self) -> IoResult<Box<rtio::RtioUnixAcceptor:Send>> {
         let _m = acceptor.fire_homing_missile();
         // FIXME: the 128 backlog should be configurable
         match unsafe { uvll::uv_listen(acceptor.listener.pipe, 128, listen_cb) } {
-            0 => Ok(acceptor as Box<rtio::RtioUnixAcceptor:Send>),
+            0 => Ok(acceptor as Box<rtio::RtioUnixAcceptor + Send>),
             n => Err(uv_error_to_io_error(UvError(n))),
         }
     }
@@ -283,7 +283,7 @@ fn uv_handle(&self) -> *uvll::uv_pipe_t { self.pipe }
             });
             let client = PipeWatcher::new_home(&loop_, pipe.home().clone(), false);
             assert_eq!(unsafe { uvll::uv_accept(server, client.handle()) }, 0);
-            Ok(box client as Box<rtio::RtioPipe:Send>)
+            Ok(box client as Box<rtio::RtioPipe + Send>)
         }
         n => Err(uv_error_to_io_error(UvError(n)))
     };
@@ -300,7 +300,7 @@ fn drop(&mut self) {
 // PipeAcceptor implementation and traits
 
 impl rtio::RtioUnixAcceptor for PipeAcceptor {
-    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe:Send>> {
+    fn accept(&mut self) -> IoResult<Box<rtio::RtioPipe + Send>> {
         self.timeout.accept(&self.listener.incoming)
     }
 
index fd0b6acb8ae746ecef398637aeae07240f4faceb..b478738ec8e722849b9263d89f2de7feb8e2a546 100644 (file)
@@ -20,11 +20,11 @@ pub struct SignalWatcher {
     handle: *uvll::uv_signal_t,
     home: HomeHandle,
 
-    cb: Box<Callback:Send>,
+    cb: Box<Callback + Send>,
 }
 
 impl SignalWatcher {
-    pub fn new(io: &mut UvIoFactory, signum: int, cb: Box<Callback:Send>)
+    pub fn new(io: &mut UvIoFactory, signum: int, cb: Box<Callback + Send>)
                -> Result<Box<SignalWatcher>, UvError> {
         let s = box SignalWatcher {
             handle: UvHandle::alloc(None::<SignalWatcher>, uvll::UV_SIGNAL),
index b940774323a2a57dae027e26afaf0fa07da7cfb0..34cd2e489a00cb27e7aa9c844a67da8c15a37b15 100644 (file)
@@ -27,8 +27,8 @@ pub struct TimerWatcher {
 
 pub enum NextAction {
     WakeTask,
-    CallOnce(Box<Callback:Send>),
-    CallMany(Box<Callback:Send>, uint),
+    CallOnce(Box<Callback + Send>),
+    CallMany(Box<Callback + Send>, uint),
 }
 
 impl TimerWatcher {
@@ -103,7 +103,7 @@ fn sleep(&mut self, msecs: u64) {
         self.stop();
     }
 
-    fn oneshot(&mut self, msecs: u64, cb: Box<Callback:Send>) {
+    fn oneshot(&mut self, msecs: u64, cb: Box<Callback + Send>) {
         // similarly to the destructor, we must drop the previous action outside
         // of the homing missile
         let _prev_action = {
@@ -115,7 +115,7 @@ fn oneshot(&mut self, msecs: u64, cb: Box<Callback:Send>) {
         };
     }
 
-    fn period(&mut self, msecs: u64, cb: Box<Callback:Send>) {
+    fn period(&mut self, msecs: u64, cb: Box<Callback + Send>) {
         // similarly to the destructor, we must drop the previous action outside
         // of the homing missile
         let _prev_action = {
index cf2a2d73d4d9f11e2b7e2efda60db9366a7e44c3..8c9d29ee9147b69ec6859640f0cead77aecbde05 100644 (file)
@@ -84,16 +84,16 @@ fn callback(&mut self, f: proc()) {
         IdleWatcher::onetime(&mut self.uvio.loop_, f);
     }
 
-    fn pausable_idle_callback(&mut self, cb: Box<rtio::Callback:Send>)
-                              -> Box<rtio::PausableIdleCallback:Send> {
+    fn pausable_idle_callback(&mut self, cb: Box<rtio::Callback + Send>)
+                              -> Box<rtio::PausableIdleCallback + Send> {
         IdleWatcher::new(&mut self.uvio.loop_, cb)
-                         as Box<rtio::PausableIdleCallback:Send>
+                         as Box<rtio::PausableIdleCallback + Send>
     }
 
-    fn remote_callback(&mut self, f: Box<rtio::Callback:Send>)
-                       -> Box<rtio::RemoteCallback:Send> {
+    fn remote_callback(&mut self, f: Box<rtio::Callback + Send>)
+                       -> Box<rtio::RemoteCallback + Send> {
         box AsyncWatcher::new(&mut self.uvio.loop_, f) as
-            Box<rtio::RemoteCallback:Send>
+            Box<rtio::RemoteCallback + Send>
     }
 
     fn io<'a>(&'a mut self) -> Option<&'a mut rtio::IoFactory> {
@@ -141,31 +141,31 @@ impl IoFactory for UvIoFactory {
     // NB: This blocks the task waiting on the connection.
     // It would probably be better to return a future
     fn tcp_connect(&mut self, addr: rtio::SocketAddr, timeout: Option<u64>)
-                   -> IoResult<Box<rtio::RtioTcpStream:Send>> {
+                   -> IoResult<Box<rtio::RtioTcpStream + Send>> {
         match TcpWatcher::connect(self, addr, timeout) {
-            Ok(t) => Ok(box t as Box<rtio::RtioTcpStream:Send>),
+            Ok(t) => Ok(box t as Box<rtio::RtioTcpStream + Send>),
             Err(e) => Err(uv_error_to_io_error(e)),
         }
     }
 
     fn tcp_bind(&mut self, addr: rtio::SocketAddr)
-                -> IoResult<Box<rtio::RtioTcpListener:Send>> {
+                -> IoResult<Box<rtio::RtioTcpListener + Send>> {
         match TcpListener::bind(self, addr) {
-            Ok(t) => Ok(t as Box<rtio::RtioTcpListener:Send>),
+            Ok(t) => Ok(t as Box<rtio::RtioTcpListener + Send>),
             Err(e) => Err(uv_error_to_io_error(e)),
         }
     }
 
     fn udp_bind(&mut self, addr: rtio::SocketAddr)
-                -> IoResult<Box<rtio::RtioUdpSocket:Send>> {
+                -> IoResult<Box<rtio::RtioUdpSocket + Send>> {
         match UdpWatcher::bind(self, addr) {
-            Ok(u) => Ok(box u as Box<rtio::RtioUdpSocket:Send>),
+            Ok(u) => Ok(box u as Box<rtio::RtioUdpSocket + Send>),
             Err(e) => Err(uv_error_to_io_error(e)),
         }
     }
 
-    fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer:Send>> {
-        Ok(TimerWatcher::new(self) as Box<rtio::RtioTimer:Send>)
+    fn timer_init(&mut self) -> IoResult<Box<rtio::RtioTimer + Send>> {
+        Ok(TimerWatcher::new(self) as Box<rtio::RtioTimer + Send>)
     }
 
     fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
@@ -177,14 +177,14 @@ fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
     }
 
     fn fs_from_raw_fd(&mut self, fd: c_int, close: rtio::CloseBehavior)
-                      -> Box<rtio::RtioFileStream:Send> {
+                      -> Box<rtio::RtioFileStream + Send> {
         box FileWatcher::new(self, fd, close) as
-            Box<rtio::RtioFileStream:Send>
+            Box<rtio::RtioFileStream + Send>
     }
 
     fn fs_open(&mut self, path: &CString, fm: rtio::FileMode,
                fa: rtio::FileAccess)
-        -> IoResult<Box<rtio::RtioFileStream:Send>>
+        -> IoResult<Box<rtio::RtioFileStream + Send>>
     {
         let flags = match fm {
             rtio::Open => 0,
@@ -201,7 +201,7 @@ fn fs_open(&mut self, path: &CString, fm: rtio::FileMode,
         };
 
         match FsRequest::open(self, path, flags as int, mode as int) {
-            Ok(fs) => Ok(box fs as Box<rtio::RtioFileStream:Send>),
+            Ok(fs) => Ok(box fs as Box<rtio::RtioFileStream + Send>),
             Err(e) => Err(uv_error_to_io_error(e))
         }
     }
@@ -264,14 +264,14 @@ fn fs_utime(&mut self, path: &CString, atime: u64, mtime: u64)
     }
 
     fn spawn(&mut self, cfg: ProcessConfig)
-            -> IoResult<(Box<rtio::RtioProcess:Send>,
-                         Vec<Option<Box<rtio::RtioPipe:Send>>>)>
+            -> IoResult<(Box<rtio::RtioProcess + Send>,
+                         Vec<Option<Box<rtio::RtioPipe + Send>>>)>
     {
         match Process::spawn(self, cfg) {
             Ok((p, io)) => {
-                Ok((p as Box<rtio::RtioProcess:Send>,
+                Ok((p as Box<rtio::RtioProcess + Send>,
                     io.move_iter().map(|i| i.map(|p| {
-                        box p as Box<rtio::RtioPipe:Send>
+                        box p as Box<rtio::RtioPipe + Send>
                     })).collect()))
             }
             Err(e) => Err(uv_error_to_io_error(e)),
@@ -283,43 +283,43 @@ fn kill(&mut self, pid: libc::pid_t, signum: int) -> IoResult<()> {
     }
 
     fn unix_bind(&mut self, path: &CString)
-                 -> IoResult<Box<rtio::RtioUnixListener:Send>> {
+                 -> IoResult<Box<rtio::RtioUnixListener + Send>> {
         match PipeListener::bind(self, path) {
-            Ok(p) => Ok(p as Box<rtio::RtioUnixListener:Send>),
+            Ok(p) => Ok(p as Box<rtio::RtioUnixListener + Send>),
             Err(e) => Err(uv_error_to_io_error(e)),
         }
     }
 
     fn unix_connect(&mut self, path: &CString, timeout: Option<u64>)
-                    -> IoResult<Box<rtio::RtioPipe:Send>> {
+                    -> IoResult<Box<rtio::RtioPipe + Send>> {
         match PipeWatcher::connect(self, path, timeout) {
-            Ok(p) => Ok(box p as Box<rtio::RtioPipe:Send>),
+            Ok(p) => Ok(box p as Box<rtio::RtioPipe + Send>),
             Err(e) => Err(uv_error_to_io_error(e)),
         }
     }
 
     fn tty_open(&mut self, fd: c_int, readable: bool)
-            -> IoResult<Box<rtio::RtioTTY:Send>> {
+            -> IoResult<Box<rtio::RtioTTY + Send>> {
         match TtyWatcher::new(self, fd, readable) {
-            Ok(tty) => Ok(box tty as Box<rtio::RtioTTY:Send>),
+            Ok(tty) => Ok(box tty as Box<rtio::RtioTTY + Send>),
             Err(e) => Err(uv_error_to_io_error(e))
         }
     }
 
     fn pipe_open(&mut self, fd: c_int)
-        -> IoResult<Box<rtio::RtioPipe:Send>>
+        -> IoResult<Box<rtio::RtioPipe + Send>>
     {
         match PipeWatcher::open(self, fd) {
-            Ok(s) => Ok(box s as Box<rtio::RtioPipe:Send>),
+            Ok(s) => Ok(box s as Box<rtio::RtioPipe + Send>),
             Err(e) => Err(uv_error_to_io_error(e))
         }
     }
 
-    fn signal(&mut self, signum: int, cb: Box<rtio::Callback:Send>)
-        -> IoResult<Box<rtio::RtioSignal:Send>>
+    fn signal(&mut self, signum: int, cb: Box<rtio::Callback + Send>)
+        -> IoResult<Box<rtio::RtioSignal + Send>>
     {
         match SignalWatcher::new(self, signum, cb) {
-            Ok(s) => Ok(s as Box<rtio::RtioSignal:Send>),
+            Ok(s) => Ok(s as Box<rtio::RtioSignal + Send>),
             Err(e) => Err(uv_error_to_io_error(e)),
         }
     }
index 8dfd4e778c2a8f8ac9f9c25db06257af55823dc1..436e969c48c92d04b938346b896d36d3bea5e5c3 100644 (file)
@@ -430,26 +430,6 @@ fn emit_enum(&mut self,
                  _name: &str,
                  f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult { f(self) }
 
-    #[cfg(stage0)]
-    fn emit_enum_variant(&mut self,
-                         name: &str,
-                         _id: uint,
-                         cnt: uint,
-                         f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
-        // enums are encoded as strings or objects
-        // Bunny => "Bunny"
-        // Kangaroo(34,"William") => {"variant": "Kangaroo", "fields": [34,"William"]}
-        if cnt == 0 {
-            write!(self.wr, "{}", escape_str(name))
-        } else {
-            try!(write!(self.wr, "\\{\"variant\":"));
-            try!(write!(self.wr, "{}", escape_str(name)));
-            try!(write!(self.wr, ",\"fields\":["));
-            try!(f(self));
-            write!(self.wr, "]\\}")
-        }
-    }
-    #[cfg(not(stage0))]
     fn emit_enum_variant(&mut self,
                          name: &str,
                          _id: uint,
@@ -493,16 +473,6 @@ fn emit_enum_struct_variant_field(&mut self,
         self.emit_enum_variant_arg(idx, f)
     }
 
-    #[cfg(stage0)]
-    fn emit_struct(&mut self,
-                   _: &str,
-                   _: uint,
-                   f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
-        try!(write!(self.wr, r"\{"));
-        try!(f(self));
-        write!(self.wr, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn emit_struct(&mut self,
                    _: &str,
                    _: uint,
@@ -563,13 +533,6 @@ fn emit_seq_elt(&mut self, idx: uint, f: |&mut Encoder<'a>| -> EncodeResult) ->
         f(self)
     }
 
-    #[cfg(stage0)]
-    fn emit_map(&mut self, _len: uint, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
-        try!(write!(self.wr, r"\{"));
-        try!(f(self));
-        write!(self.wr, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn emit_map(&mut self, _len: uint, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
         try!(write!(self.wr, "{{"));
         try!(f(self));
@@ -707,22 +670,6 @@ fn emit_enum_struct_variant_field(&mut self,
     }
 
 
-    #[cfg(stage0)]
-    fn emit_struct(&mut self,
-                   _: &str,
-                   len: uint,
-                   f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
-        if len == 0 {
-            write!(self.wr, "\\{\\}")
-        } else {
-            try!(write!(self.wr, "\\{"));
-            self.indent += 2;
-            try!(f(self));
-            self.indent -= 2;
-            write!(self.wr, "\n{}\\}", spaces(self.indent))
-        }
-    }
-    #[cfg(not(stage0))]
     fn emit_struct(&mut self,
                    _: &str,
                    len: uint,
@@ -808,21 +755,6 @@ fn emit_seq_elt(&mut self,
         f(self)
     }
 
-    #[cfg(stage0)]
-    fn emit_map(&mut self,
-                len: uint,
-                f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
-        if len == 0 {
-            write!(self.wr, "\\{\\}")
-        } else {
-            try!(write!(self.wr, "\\{"));
-            self.indent += 2;
-            try!(f(self));
-            self.indent -= 2;
-            write!(self.wr, "\n{}\\}", spaces(self.indent))
-        }
-    }
-    #[cfg(not(stage0))]
     fn emit_map(&mut self,
                 len: uint,
                 f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
index f11e68c7a46712ed586b6710ebc4832dd4879876..8feb0e0b7eef0f95a61d455bc3e7811e231af64f 100644 (file)
@@ -1424,18 +1424,6 @@ fn eq(&self, other: &HashMap<K, V, H>) -> bool {
 impl<K: Eq + Hash<S>, V: Eq, S, H: Hasher<S>> Eq for HashMap<K, V, H> {}
 
 impl<K: Eq + Hash<S> + Show, V: Show, S, H: Hasher<S>> Show for HashMap<K, V, H> {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, r"\{"));
-
-        for (i, (k, v)) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{}: {}", *k, *v));
-        }
-
-        write!(f, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
 
@@ -1629,18 +1617,6 @@ pub fn union<'a>(&'a self, other: &'a HashSet<T, H>)
 }
 
 impl<T: Eq + Hash<S> + fmt::Show, S, H: Hasher<S>> fmt::Show for HashSet<T, H> {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, r"\{"));
-
-        for (i, x) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{}", *x));
-        }
-
-        write!(f, r"\}")
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
 
index 0075a50f38974294d2226af2f6725afacc903a25..8ec5146c7b20fd35b39c92c0efc326ecbf5d5383 100644 (file)
@@ -208,26 +208,6 @@ fn attach(&mut self, node: *mut LruEntry<K, V>) {
 impl<A: fmt::Show + Hash + Eq, B: fmt::Show> fmt::Show for LruCache<A, B> {
     /// Return a string that lists the key-value pairs from most-recently
     /// used to least-recently used.
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, r"\{"));
-        let mut cur = self.head;
-        for i in range(0, self.len()) {
-            if i > 0 { try!(write!(f, ", ")) }
-            unsafe {
-                cur = (*cur).next;
-                try!(write!(f, "{}", (*cur).key));
-            }
-            try!(write!(f, ": "));
-            unsafe {
-                try!(write!(f, "{}", (*cur).value));
-            }
-        }
-        write!(f, r"\}")
-    }
-    /// Return a string that lists the key-value pairs from most-recently
-    /// used to least-recently used.
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
         let mut cur = self.head;
index 903f39c7b06a3ef717f9acf304a7117b8a0c5f41..d1552f0bd10122e3d10c455e1099c298aae51dbc 100644 (file)
@@ -23,7 +23,7 @@
 use string::String;
 
 // Defined in this module instead of io::stdio so that the unwinding
-local_data_key!(pub local_stderr: Box<Writer:Send>)
+local_data_key!(pub local_stderr: Box<Writer + Send>)
 
 impl Writer for Stdio {
     fn write(&mut self, bytes: &[u8]) -> IoResult<()> {
@@ -35,7 +35,7 @@ fn fmt_write<F: fmt::FormatWriter>(f: &mut F, bytes: &[u8]) {
     }
 }
 
-pub fn on_fail(obj: &Any:Send, file: &'static str, line: uint) {
+pub fn on_fail(obj: &Any + Send, file: &'static str, line: uint) {
     let msg = match obj.as_ref::<&'static str>() {
         Some(s) => *s,
         None => match obj.as_ref::<String>() {
index 10dfec0f566091cab9072b7853e206c6a36f7e76..20187a6dcde6b53479178e356ea2fb03c5a0f8eb 100644 (file)
@@ -84,7 +84,7 @@
 /// configured at creation time, via the `FileAccess` parameter to
 /// `File::open_mode()`.
 pub struct File {
-    fd: Box<rtio::RtioFileStream:Send>,
+    fd: Box<rtio::RtioFileStream + Send>,
     path: Path,
     last_nread: int,
 }
index 6c773467553d2f055d46a744cc3a251521bd1413..8ffb057c934588bf242d516bb684ec9b71e45398 100644 (file)
 /// drop(stream); // close the connection
 /// ```
 pub struct TcpStream {
-    obj: Box<RtioTcpStream:Send>,
+    obj: Box<RtioTcpStream + Send>,
 }
 
 impl TcpStream {
-    fn new(s: Box<RtioTcpStream:Send>) -> TcpStream {
+    fn new(s: Box<RtioTcpStream + Send>) -> TcpStream {
         TcpStream { obj: s }
     }
 
@@ -326,7 +326,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
 /// # }
 /// ```
 pub struct TcpListener {
-    obj: Box<RtioTcpListener:Send>,
+    obj: Box<RtioTcpListener + Send>,
 }
 
 impl TcpListener {
@@ -382,7 +382,7 @@ fn listen(self) -> IoResult<TcpAcceptor> {
 /// a `TcpListener`'s `listen` method, and this object can be used to accept new
 /// `TcpStream` instances.
 pub struct TcpAcceptor {
-    obj: Box<RtioTcpAcceptor:Send>,
+    obj: Box<RtioTcpAcceptor + Send>,
 }
 
 impl TcpAcceptor {
index 538bba36958115447410a84c59f2ed5e274068d8..e1f9cb3889f8ce3d378819549d742a02860b7e33 100644 (file)
@@ -57,7 +57,7 @@
 /// drop(socket); // close the socket
 /// ```
 pub struct UdpSocket {
-    obj: Box<RtioUdpSocket:Send>,
+    obj: Box<RtioUdpSocket + Send>,
 }
 
 impl UdpSocket {
index 9715a821e4fcba5d17704f83c4e5de5dcdea4977..8f4f66836ad3d16923f7b0051d9b1ff4b3202410 100644 (file)
@@ -36,7 +36,7 @@
 
 /// A stream which communicates over a named pipe.
 pub struct UnixStream {
-    obj: Box<RtioPipe:Send>,
+    obj: Box<RtioPipe + Send>,
 }
 
 impl UnixStream {
@@ -144,7 +144,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
 /// A value that can listen for incoming named pipe connection requests.
 pub struct UnixListener {
     /// The internal, opaque runtime Unix listener.
-    obj: Box<RtioUnixListener:Send>,
+    obj: Box<RtioUnixListener + Send>,
 }
 
 impl UnixListener {
@@ -188,7 +188,7 @@ fn listen(self) -> IoResult<UnixAcceptor> {
 /// A value that can accept named pipe connections, returned from `listen()`.
 pub struct UnixAcceptor {
     /// The internal, opaque runtime Unix acceptor.
-    obj: Box<RtioUnixAcceptor:Send>,
+    obj: Box<RtioUnixAcceptor + Send>,
 }
 
 impl UnixAcceptor {
index 11bb27573c29afece830187f28e270c62c839a28..6e2009545aad51f490e3ac5dcea14c883017e19b 100644 (file)
@@ -24,7 +24,7 @@
 /// A synchronous, in-memory pipe.
 pub struct PipeStream {
     /// The internal, opaque runtime pipe object.
-    obj: Box<RtioPipe:Send>,
+    obj: Box<RtioPipe + Send>,
 }
 
 impl PipeStream {
@@ -55,7 +55,7 @@ pub fn open(fd: libc::c_int) -> IoResult<PipeStream> {
     }
 
     #[doc(hidden)]
-    pub fn new(inner: Box<RtioPipe:Send>) -> PipeStream {
+    pub fn new(inner: Box<RtioPipe + Send>) -> PipeStream {
         PipeStream { obj: inner }
     }
 }
index a626d1f3a6c08660b413f289e1d662d32a6350f7..38d8475ddf7a3550ab058f1775f428cb671ac749 100644 (file)
@@ -58,7 +58,7 @@
 /// assert!(child.wait().unwrap().success());
 /// ```
 pub struct Process {
-    handle: Box<RtioProcess:Send>,
+    handle: Box<RtioProcess + Send>,
 
     /// Handle to the child's stdin, if the `stdin` field of this process's
     /// `ProcessConfig` was `CreatePipe`. By default, this handle is `Some`.
index 598a8667d41e93a4d4e4fab53a3e702c55b717b9..4a7655a63ce8c257a27f6a482173de26bc3bc82b 100644 (file)
@@ -82,7 +82,7 @@ pub enum Signum {
 /// ```
 pub struct Listener {
     /// A map from signums to handles to keep the handles in memory
-    handles: Vec<(Signum, Box<RtioSignal:Send>)>,
+    handles: Vec<(Signum, Box<RtioSignal + Send>)>,
     /// This is where all the handles send signums, which are received by
     /// the clients from the receiver.
     tx: Sender<Signum>,
index 84b91814c877902571a87c6bccee98dc93dba925..071480fb5ee7cdbb6d54a73246ae706dab4770e4 100644 (file)
@@ -71,8 +71,8 @@
 // tl;dr; TTY works on everything but when windows stdout is redirected, in that
 //        case pipe also doesn't work, but magically file does!
 enum StdSource {
-    TTY(Box<RtioTTY:Send>),
-    File(Box<RtioFileStream:Send>),
+    TTY(Box<RtioTTY + Send>),
+    File(Box<RtioFileStream + Send>),
 }
 
 fn src<T>(fd: libc::c_int, readable: bool, f: |StdSource| -> T) -> T {
@@ -84,7 +84,7 @@ fn src<T>(fd: libc::c_int, readable: bool, f: |StdSource| -> T) -> T {
     }).map_err(IoError::from_rtio_error).unwrap()
 }
 
-local_data_key!(local_stdout: Box<Writer:Send>)
+local_data_key!(local_stdout: Box<Writer + Send>)
 
 /// Creates a new non-blocking handle to the stdin of the current process.
 ///
@@ -163,7 +163,7 @@ pub fn stderr_raw() -> StdWriter {
 ///
 /// Note that this does not need to be called for all new tasks; the default
 /// output handle is to the process's stdout stream.
-pub fn set_stdout(stdout: Box<Writer:Send>) -> Option<Box<Writer:Send>> {
+pub fn set_stdout(stdout: Box<Writer + Send>) -> Option<Box<Writer + Send>> {
     local_stdout.replace(Some(stdout)).and_then(|mut s| {
         let _ = s.flush();
         Some(s)
@@ -178,7 +178,7 @@ pub fn set_stdout(stdout: Box<Writer:Send>) -> Option<Box<Writer:Send>> {
 ///
 /// Note that this does not need to be called for all new tasks; the default
 /// output handle is to the process's stderr stream.
-pub fn set_stderr(stderr: Box<Writer:Send>) -> Option<Box<Writer:Send>> {
+pub fn set_stderr(stderr: Box<Writer + Send>) -> Option<Box<Writer + Send>> {
     local_stderr.replace(Some(stderr)).and_then(|mut s| {
         let _ = s.flush();
         Some(s)
@@ -198,7 +198,7 @@ pub fn set_stderr(stderr: Box<Writer:Send>) -> Option<Box<Writer:Send>> {
 fn with_task_stdout(f: |&mut Writer| -> IoResult<()>) {
     let result = if Local::exists(None::<Task>) {
         let mut my_stdout = local_stdout.replace(None).unwrap_or_else(|| {
-            box stdout() as Box<Writer:Send>
+            box stdout() as Box<Writer + Send>
         });
         let result = f(my_stdout);
         local_stdout.replace(Some(my_stdout));
index 1529cf8f92d6b50af9683b741d9929d83ab5c103..da099953a49281c0c17d0173d4acefed93127418 100644 (file)
@@ -64,7 +64,7 @@
 /// # }
 /// ```
 pub struct Timer {
-    obj: Box<RtioTimer:Send>,
+    obj: Box<RtioTimer + Send>,
 }
 
 struct TimerCallback { tx: Sender<()> }
index b9bb0054d441a4216210956e032b0d2009ab259d..553c7af18cb26cb1f4d17ffca6c97b3642225d91 100644 (file)
@@ -899,12 +899,6 @@ pub fn make_non_verbatim(path: &Path) -> Option<Path> {
             // \\?\D:\
             Path::new(repr.slice_from(4))
         }
-        #[cfg(stage0)]
-        Some(VerbatimUNCPrefix(_,_)) => {
-            // \\?\UNC\server\share
-            Path::new(format!(r"\\{}", repr.slice_from(7)))
-        }
-        #[cfg(not(stage0))]
         Some(VerbatimUNCPrefix(_,_)) => {
             // \\?\UNC\server\share
             Path::new(format!(r"\{}", repr.slice_from(7)))
index a4e1ad84252b1295a2154af3f65bac1ad747dd53..f543188af4295a628f946fbf89baa870fe86b11a 100644 (file)
@@ -63,9 +63,9 @@ pub struct TaskOpts {
     /// The size of the stack for the spawned task
     pub stack_size: Option<uint>,
     /// Task-local stdout
-    pub stdout: Option<Box<Writer:Send>>,
+    pub stdout: Option<Box<Writer + Send>>,
     /// Task-local stderr
-    pub stderr: Option<Box<Writer:Send>>,
+    pub stderr: Option<Box<Writer + Send>>,
 }
 
 /**
@@ -83,7 +83,7 @@ pub struct TaskOpts {
 pub struct TaskBuilder {
     /// Options to spawn the new task with
     pub opts: TaskOpts,
-    gen_body: Option<proc(v: proc():Send):Send -> proc():Send>,
+    gen_body: Option<proc(v: proc(): Send): Send -> proc(): Send>,
     nocopy: marker::NoCopy,
 }
 
@@ -146,7 +146,7 @@ pub fn named<S: IntoMaybeOwned<'static>>(mut self, name: S) -> TaskBuilder {
      * existing body generator to the new body generator.
      */
     pub fn with_wrapper(mut self,
-                        wrapper: proc(v: proc():Send):Send -> proc():Send)
+                        wrapper: proc(v: proc(): Send): Send -> proc(): Send)
         -> TaskBuilder
     {
         self.gen_body = match self.gen_body.take() {
@@ -163,7 +163,7 @@ pub fn with_wrapper(mut self,
      * the provided unique closure. The task has the properties and behavior
      * specified by the task_builder.
      */
-    pub fn spawn(mut self, f: proc():Send) {
+    pub fn spawn(mut self, f: proc(): Send) {
         let gen_body = self.gen_body.take();
         let f = match gen_body {
             Some(gen) => gen(f),
@@ -204,8 +204,8 @@ pub fn spawn(mut self, f: proc():Send) {
      * # Failure
      * Fails if a future_result was already set for this task.
      */
-    pub fn try<T:Send>(mut self, f: proc():Send -> T)
-               -> Result<T, Box<Any:Send>> {
+    pub fn try<T: Send>(mut self, f: proc(): Send -> T)
+               -> Result<T, Box<Any + Send>> {
         let (tx, rx) = channel();
 
         let result = self.future_result();
@@ -247,7 +247,7 @@ pub fn new() -> TaskOpts {
 /// the provided unique closure.
 ///
 /// This function is equivalent to `TaskBuilder::new().spawn(f)`.
-pub fn spawn(f: proc():Send) {
+pub fn spawn(f: proc(): Send) {
     TaskBuilder::new().spawn(f)
 }
 
@@ -255,7 +255,7 @@ pub fn spawn(f: proc():Send) {
 /// the function or an error if the task failed
 ///
 /// This is equivalent to TaskBuilder::new().try
-pub fn try<T:Send>(f: proc():Send -> T) -> Result<T, Box<Any:Send>> {
+pub fn try<T: Send>(f: proc(): Send -> T) -> Result<T, Box<Any + Send>> {
     TaskBuilder::new().try(f)
 }
 
@@ -344,7 +344,7 @@ fn test_run_basic() {
 fn test_with_wrapper() {
     let (tx, rx) = channel();
     TaskBuilder::new().with_wrapper(proc(body) {
-        let result: proc():Send = proc() {
+        let result: proc(): Send = proc() {
             body();
             tx.send(());
         };
@@ -430,7 +430,7 @@ fn test_spawn_sched_childs_on_default_sched() {
 }
 
 #[cfg(test)]
-fn avoid_copying_the_body(spawnfn: |v: proc():Send|) {
+fn avoid_copying_the_body(spawnfn: |v: proc(): Send|) {
     let (tx, rx) = channel::<uint>();
 
     let x = box 1;
@@ -476,7 +476,7 @@ fn test_child_doesnt_ref_parent() {
     // (well, it would if the constant were 8000+ - I lowered it to be more
     // valgrind-friendly. try this at home, instead..!)
     static generations: uint = 16;
-    fn child_no(x: uint) -> proc():Send {
+    fn child_no(x: uint) -> proc(): Send {
         return proc() {
             if x < generations {
                 TaskBuilder::new().spawn(child_no(x+1));
@@ -522,10 +522,10 @@ fn test_try_fail_message_owned_str() {
 #[test]
 fn test_try_fail_message_any() {
     match try(proc() {
-        fail!(box 413u16 as Box<Any:Send>);
+        fail!(box 413u16 as Box<Any + Send>);
     }) {
         Err(e) => {
-            type T = Box<Any:Send>;
+            type T = Box<Any + Send>;
             assert!(e.is::<T>());
             let any = e.move::<T>().unwrap();
             assert!(any.is::<u16>());
index 5df08790c41d299d3d48a7141312276543d14043..c5f452d3e58e2322ba329a58e8780428d1925ac7 100644 (file)
@@ -828,7 +828,7 @@ fn test_mutex_killed_simple() {
         let m = Arc::new(Mutex::new());
         let m2 = m.clone();
 
-        let result: result::Result<(), Box<Any:Send>> = task::try(proc() {
+        let result: result::Result<(), Box<Any + Send>> = task::try(proc() {
             let _lock = m2.lock();
             fail!();
         });
@@ -1068,7 +1068,7 @@ fn rwlock_kill_helper(mode1: RWLockMode, mode2: RWLockMode) {
         let x = Arc::new(RWLock::new());
         let x2 = x.clone();
 
-        let result: result::Result<(), Box<Any:Send>> = task::try(proc() {
+        let result: result::Result<(), Box<Any + Send>> = task::try(proc() {
             lock_rwlock_in_mode(&x2, mode1, || {
                 fail!();
             })
index d5e0a4e80d4480d59b2c63844ccd0f34d12989e1..8ac54a191f295031c44bbf920054a0902872a7ec 100644 (file)
@@ -32,23 +32,6 @@ pub struct CrateId {
 }
 
 impl fmt::Show for CrateId {
-    #[cfg(stage0)]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "{}", self.path));
-        let version = match self.version {
-            None => "0.0",
-            Some(ref version) => version.as_slice(),
-        };
-        if self.path == self.name ||
-                self.path
-                    .as_slice()
-                    .ends_with(format!("/{}", self.name).as_slice()) {
-            write!(f, "\\#{}", version)
-        } else {
-            write!(f, "\\#{}:{}", self.name, version)
-        }
-    }
-    #[cfg(not(stage0))]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{}", self.path));
         let version = match self.version {
index ee06efbec134376164aee599b294e190408b3ef8..16c463f0c96fffd1a050edd39e3ace962218cbc9 100644 (file)
@@ -118,7 +118,7 @@ pub fn handler<'a>(&'a self) -> &'a Handler {
 // others log errors for later reporting.
 pub struct Handler {
     err_count: Cell<uint>,
-    emit: RefCell<Box<Emitter:Send>>,
+    emit: RefCell<Box<Emitter + Send>>,
 }
 
 impl Handler {
@@ -187,7 +187,7 @@ pub fn default_handler(color_config: ColorConfig) -> Handler {
     mk_handler(box EmitterWriter::stderr(color_config))
 }
 
-pub fn mk_handler(e: Box<Emitter:Send>) -> Handler {
+pub fn mk_handler(e: Box<Emitter + Send>) -> Handler {
     Handler {
         err_count: Cell::new(0),
         emit: RefCell::new(e),
@@ -281,8 +281,8 @@ pub struct EmitterWriter {
 }
 
 enum Destination {
-    Terminal(Box<term::Terminal<Box<Writer:Send>>:Send>),
-    Raw(Box<Writer:Send>),
+    Terminal(Box<term::Terminal<Box<Writer + Send>> + Send>),
+    Raw(Box<Writer + Send>),
 }
 
 impl EmitterWriter {
@@ -306,7 +306,7 @@ pub fn stderr(color_config: ColorConfig) -> EmitterWriter {
         }
     }
 
-    pub fn new(dst: Box<Writer:Send>) -> EmitterWriter {
+    pub fn new(dst: Box<Writer + Send>) -> EmitterWriter {
         EmitterWriter { dst: Raw(dst) }
     }
 }
index 7aa93dee11df98acd3c4dceca3c0beb15158a863..50b1639484d9415385357240cc69d669db1a3179 100644 (file)
@@ -145,29 +145,6 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
                     inputs.push((constraint, input));
                 }
             }
-            #[cfg(stage0)]
-            Clobbers => {
-                let mut clobs = Vec::new();
-                while p.token != token::EOF &&
-                      p.token != token::COLON &&
-                      p.token != token::MOD_SEP {
-
-                    if clobs.len() != 0 {
-                        p.eat(&token::COMMA);
-                    }
-
-                    let (s, _str_style) = p.parse_str();
-                    let clob = format!("~\\{{}\\}", s);
-                    clobs.push(clob);
-
-                    if OPTIONS.iter().any(|opt| s.equiv(opt)) {
-                        cx.span_warn(p.last_span, "expected a clobber, but found an option");
-                    }
-                }
-
-                cons = clobs.connect(",");
-            }
-            #[cfg(not(stage0))]
             Clobbers => {
                 let mut clobs = Vec::new();
                 while p.token != token::EOF &&
index 421f8b1294d6a3208a3b3b1823236705e11064fd..960894e69636aa637a39e9ef4c5674bd537a0612 100644 (file)
@@ -257,13 +257,13 @@ pub enum SyntaxExtension {
     /// A normal, function-like syntax extension.
     ///
     /// `bytes!` is a `NormalTT`.
-    NormalTT(Box<MacroExpander:'static>, Option<Span>),
+    NormalTT(Box<MacroExpander + 'static>, Option<Span>),
 
     /// A function-like syntax extension that has an extra ident before
     /// the block.
     ///
     /// `macro_rules!` is an `IdentTT`.
-    IdentTT(Box<IdentMacroExpander:'static>, Option<Span>),
+    IdentTT(Box<IdentMacroExpander + 'static>, Option<Span>),
 }
 
 pub type NamedSyntaxExtension = (Name, SyntaxExtension);
index f48ddf4417bf65dff1c82bc6530652fe218705c4..e47080dadfd72361dd5eb1cfc94b62e5b5b13736 100644 (file)
@@ -90,13 +90,6 @@ fn parse_attribute(&mut self, permit_inner: bool) -> ast::Attribute {
                 let hi = self.span.hi;
                 (mk_sp(lo, hi), meta_item, style)
             }
-            #[cfg(stage0)]
-            _ => {
-                let token_str = self.this_token_to_str();
-                self.fatal(format!("expected `\\#` but found `{}`",
-                                   token_str).as_slice());
-            }
-            #[cfg(not(stage0))]
             _ => {
                 let token_str = self.this_token_to_str();
                 self.fatal(format!("expected `#` but found `{}`",
index ae3b8587ee5109a9c477ffa0d61e1cba317c66c9..8b50a6270bca56077c32330e5666c7cb6cd9f07b 100644 (file)
@@ -302,7 +302,7 @@ pub struct Parser<'a> {
     pub tokens_consumed: uint,
     pub restriction: restriction,
     pub quote_depth: uint, // not (yet) related to the quasiquoter
-    pub reader: Box<Reader:>,
+    pub reader: Box<Reader>,
     pub interner: Rc<token::IdentInterner>,
     /// The set of seen errors about obsolete syntax. Used to suppress
     /// extra detail when the same error is seen twice
@@ -325,7 +325,8 @@ fn is_plain_ident_or_underscore(t: &token::Token) -> bool {
 }
 
 impl<'a> Parser<'a> {
-    pub fn new(sess: &'a ParseSess, cfg: ast::CrateConfig, mut rdr: Box<Reader:>) -> Parser<'a> {
+    pub fn new(sess: &'a ParseSess, cfg: ast::CrateConfig,
+               mut rdr: Box<Reader>) -> Parser<'a> {
         let tok0 = rdr.next_token();
         let span = tok0.sp;
         let placeholder = TokenAndSpan {
@@ -1232,13 +1233,6 @@ pub fn parse_trait_methods(&mut self) -> Vec<TraitMethod> {
                 })
               }
 
-              #[cfg(stage0)]
-              _ => {
-                  let token_str = p.this_token_to_str();
-                  p.fatal((format!("expected `;` or `\\{` but found `{}`",
-                                   token_str)).as_slice())
-              }
-              #[cfg(not(stage0))]
               _ => {
                   let token_str = p.this_token_to_str();
                   p.fatal((format!("expected `;` or `{{` but found `{}`",
@@ -1645,12 +1639,9 @@ pub fn parse_path(&mut self, mode: PathParsingMode) -> PathAndBounds {
         }
 
         // Next, parse a plus and bounded type parameters, if applicable.
-        //
-        // NOTE(stage0, pcwalton): Remove `token::COLON` after a snapshot.
         let bounds = if mode == LifetimeAndTypesAndBounds {
             let bounds = {
-                if self.eat(&token::BINOP(token::PLUS)) ||
-                        self.eat(&token::COLON) {
+                if self.eat(&token::BINOP(token::PLUS)) {
                     let (_, bounds) = self.parse_ty_param_bounds(false);
                     Some(bounds)
                 } else {
@@ -3208,21 +3199,6 @@ fn check_expected_item(p: &mut Parser, found_attrs: bool) {
             // consuming more tokens).
             let (bra, ket) = match token::close_delimiter_for(&self.token) {
                 Some(ket) => (self.token.clone(), ket),
-                #[cfg(stage0)]
-                None      => {
-                    // we only expect an ident if we didn't parse one
-                    // above.
-                    let ident_str = if id == token::special_idents::invalid {
-                        "identifier, "
-                    } else {
-                        ""
-                    };
-                    let tok_str = self.this_token_to_str();
-                    self.fatal(format!("expected {}`(` or `\\{`, but found `{}`",
-                                       ident_str,
-                                       tok_str).as_slice())
-                }
-                #[cfg(not(stage0))]
                 None      => {
                     // we only expect an ident if we didn't parse one
                     // above.
@@ -4153,15 +4129,6 @@ pub fn parse_single_struct_field(&mut self,
                 self.bump();
             }
             token::RBRACE => {}
-            #[cfg(stage0)]
-            _ => {
-                let span = self.span;
-                let token_str = self.this_token_to_str();
-                self.span_fatal(span,
-                                format!("expected `,`, or `\\}` but found `{}`",
-                                        token_str).as_slice())
-            }
-            #[cfg(not(stage0))]
             _ => {
                 let span = self.span;
                 let token_str = self.this_token_to_str();
index 33e61b97420869ed785bb0ddc3a981ed5a514cd0..472501754859892ed2b859ad85676def460d9a74 100644 (file)
 #[cfg(not(windows))]
 /// Return a Terminal wrapping stdout, or None if a terminal couldn't be
 /// opened.
-pub fn stdout() -> Option<Box<Terminal<Box<Writer:Send>>:Send>> {
-    let ti: Option<TerminfoTerminal<Box<Writer:Send>>>
-        = Terminal::new(box std::io::stdout() as Box<Writer:Send>);
-    ti.map(|t| box t as Box<Terminal<Box<Writer:Send>:Send>:Send>)
+pub fn stdout() -> Option<Box<Terminal<Box<Writer + Send>> + Send>> {
+    let ti: Option<TerminfoTerminal<Box<Writer + Send>>>
+        = Terminal::new(box std::io::stdout() as Box<Writer + Send>);
+    ti.map(|t| box t as Box<Terminal<Box<Writer + Send> + Send> + Send>)
 }
 
 #[cfg(windows)]
 /// Return a Terminal wrapping stdout, or None if a terminal couldn't be
 /// opened.
-pub fn stdout() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>> {
-    let ti: Option<TerminfoTerminal<Box<Writer:Send>>>
-        = Terminal::new(box std::io::stdout() as Box<Writer:Send>);
+pub fn stdout() -> Option<Box<Terminal<Box<Writer + Send> + Send> + Send>> {
+    let ti: Option<TerminfoTerminal<Box<Writer + Send>>>
+        = Terminal::new(box std::io::stdout() as Box<Writer + Send>);
 
     match ti {
-        Some(t) => Some(box t as Box<Terminal<Box<Writer:Send>:Send>:Send>),
+        Some(t) => Some(box t as Box<Terminal<Box<Writer + Send> + Send> + Send>),
         None => {
-            let wc: Option<WinConsole<Box<Writer:Send>>>
-                = Terminal::new(box std::io::stdout() as Box<Writer:Send>);
-            wc.map(|w| box w as Box<Terminal<Box<Writer:Send>:Send>:Send>)
+            let wc: Option<WinConsole<Box<Writer + Send>>>
+                = Terminal::new(box std::io::stdout() as Box<Writer + Send>);
+            wc.map(|w| box w as Box<Terminal<Box<Writer + Send> + Send> + Send>)
         }
     }
 }
@@ -94,25 +94,25 @@ pub fn stdout() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>> {
 #[cfg(not(windows))]
 /// Return a Terminal wrapping stderr, or None if a terminal couldn't be
 /// opened.
-pub fn stderr() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>:Send> {
-    let ti: Option<TerminfoTerminal<Box<Writer:Send>>>
-        = Terminal::new(box std::io::stderr() as Box<Writer:Send>);
-    ti.map(|t| box t as Box<Terminal<Box<Writer:Send>:Send>:Send>)
+pub fn stderr() -> Option<Box<Terminal<Box<Writer + Send> + Send> + Send> + Send> {
+    let ti: Option<TerminfoTerminal<Box<Writer + Send>>>
+        = Terminal::new(box std::io::stderr() as Box<Writer + Send>);
+    ti.map(|t| box t as Box<Terminal<Box<Writer + Send> + Send> + Send>)
 }
 
 #[cfg(windows)]
 /// Return a Terminal wrapping stderr, or None if a terminal couldn't be
 /// opened.
-pub fn stderr() -> Option<Box<Terminal<Box<Writer:Send>:Send>:Send>> {
-    let ti: Option<TerminfoTerminal<Box<Writer:Send>>>
-        = Terminal::new(box std::io::stderr() as Box<Writer:Send>);
+pub fn stderr() -> Option<Box<Terminal<Box<Writer + Send> + Send> + Send>> {
+    let ti: Option<TerminfoTerminal<Box<Writer + Send>>>
+        = Terminal::new(box std::io::stderr() as Box<Writer + Send>);
 
     match ti {
-        Some(t) => Some(box t as Box<Terminal<Box<Writer:Send>:Send>:Send>),
+        Some(t) => Some(box t as Box<Terminal<Box<Writer + Send> + Send> + Send>),
         None => {
-            let wc: Option<WinConsole<Box<Writer:Send>>>
-                = Terminal::new(box std::io::stderr() as Box<Writer:Send>);
-            wc.map(|w| box w as Box<Terminal<Box<Writer:Send>:Send>:Send>)
+            let wc: Option<WinConsole<Box<Writer + Send>>>
+                = Terminal::new(box std::io::stderr() as Box<Writer + Send>);
+            wc.map(|w| box w as Box<Terminal<Box<Writer + Send> + Send> + Send>)
         }
     }
 }
index 9108a2c94598bf87e38b8a2f532841285b66b680..e7c35fb59eee560e219a5c6d551f2848b19a57ba 100644 (file)
@@ -346,16 +346,16 @@ fn usage(binary: &str) {
 
 Test Attributes:
 
-    \#[test]        - Indicates a function is a test to be run. This function
+    #[test]        - Indicates a function is a test to be run. This function
                      takes no arguments.
-    \#[bench]       - Indicates a function is a benchmark to be run. This
+    #[bench]       - Indicates a function is a benchmark to be run. This
                      function takes one argument (test::Bencher).
-    \#[should_fail] - This function (also labeled with \#[test]) will only pass if
+    #[should_fail] - This function (also labeled with #[test]) will only pass if
                      the code causes a failure (an assertion failure or fail!)
-    \#[ignore]      - When applied to a function which is already attributed as a
+    #[ignore]      - When applied to a function which is already attributed as a
                      test, then the test runner will ignore these tests during
                      normal test runs. Running with --ignored will run these
-                     tests. This may also be written as \#[ignore(cfg(...))] to
+                     tests. This may also be written as #[ignore(cfg(...))] to
                      ignore the test on certain configurations.",
              usage = getopts::usage(message.as_slice(),
                                     optgroups().as_slice()));
@@ -473,7 +473,7 @@ pub enum TestResult {
 }
 
 enum OutputLocation<T> {
-    Pretty(Box<term::Terminal<Box<Writer:Send>>:Send>),
+    Pretty(Box<term::Terminal<Box<Writer + Send>> + Send>),
     Raw(T),
 }
 
@@ -1049,8 +1049,8 @@ fn run_test_inner(desc: TestDesc,
             if nocapture {
                 drop((stdout, stderr));
             } else {
-                task.opts.stdout = Some(box stdout as Box<Writer:Send>);
-                task.opts.stderr = Some(box stderr as Box<Writer:Send>);
+                task.opts.stdout = Some(box stdout as Box<Writer + Send>);
+                task.opts.stderr = Some(box stderr as Box<Writer + Send>);
             }
             let result_future = task.future_result();
             task.spawn(testfn);
index e137b54e54a54a2eec4b4c5fe3b3d9760ffb46f5..d528cb16e72dc73c2057a0cde7f61157d1dcb3a7 100644 (file)
@@ -1,3 +1,11 @@
+S 2014-06-14 2c6caad
+  freebsd-x86_64 0152ba43f238014f0aede7c29f1c684c21077b0b
+  linux-i386 2eb1897c25abe0d5978ff03171ca943e92666046
+  linux-x86_64 c974465b482334461bf9771864eee3873e3cb3f9
+  macos-i386 5b138c0ea9028ec56ed215ad86ec3e69e5a9ffd3
+  macos-x86_64 294afb78328d63c7774f07303ef7138219ee02e7
+  winnt-i386 303afde8b5ca002c151f42df727d6ae701d086cd
+
 S 2014-06-11 f9260d4
   freebsd-x86_64 57f155da12e561a277506f999a616ff689a55dcc
   linux-i386 df46b5dab3620375d6175c284ea0aeb3f9c6a11e
index 3028db00f5871801fdcd0c06cc12e91ebafa522d..bff8ba629aa1416e1241f49c878b00584ba149a5 100644 (file)
@@ -27,7 +27,7 @@ fn set(&mut self, v: Rc<RefCell<A>>)
 }
 
 struct A {
-    v: Box<Foo:Send>,
+    v: Box<Foo + Send>,
 }
 
 fn main() {
index 3f6c622dd0d6ed2a933fda237b82a5c2f081c119..6921acde45e252bb03764838d7a8b796c59bda55 100644 (file)
@@ -15,8 +15,8 @@ impl<A:Clone> Repeat<A> for A {
     fn get(&self) -> A { self.clone() }
 }
 
-fn repeater<A:Clone>(v: A) -> Box<Repeat<A>:> {
-    box v as Box<Repeat<A>:> // No
+fn repeater<A:Clone>(v: A) -> Box<Repeat<A>> {
+    box v as Box<Repeat<A>> // No
 }
 
 fn main() {
index 48f04c334941ac4e1c8226c207e799938725b000..dc6e8b1d6be5f73ea1994e5524beac0f637996f9 100644 (file)
@@ -15,16 +15,16 @@ trait A<T> {}
 trait X {}
 impl<'a, T> X for B<'a, T> {}
 
-fn f<'a, T, U>(v: Box<A<T>>) -> Box<X:> {
-    box B(v) as Box<X:> //~ ERROR value may contain references; add `'static` bound to `T`
+fn f<'a, T, U>(v: Box<A<T>>) -> Box<X> {
+    box B(v) as Box<X> //~ ERROR value may contain references; add `'static` bound to `T`
 }
 
-fn g<'a, T, U>(v: Box<A<U>>) -> Box<X:> {
-    box B(v) as Box<X:> //~ ERROR value may contain references; add `'static` bound to `U`
+fn g<'a, T, U>(v: Box<A<U>>) -> Box<X> {
+    box B(v) as Box<X> //~ ERROR value may contain references; add `'static` bound to `U`
 }
 
-fn h<'a, T: 'static>(v: Box<A<T>>) -> Box<X:> {
-    box B(v) as Box<X:> // ok
+fn h<'a, T: 'static>(v: Box<A<T>>) -> Box<X> {
+    box B(v) as Box<X> // ok
 }
 
 fn main() {}
index aa398bcd55746c9e09390ab6c22d85520d936f4a..de3b2faef861f4826fc2552be58ebc7f2749f0a6 100644 (file)
@@ -11,7 +11,7 @@
 
 trait Foo { }
 
-fn foo<'a>(x: Box<Foo:'a>) { //~ ERROR only the 'static lifetime is accepted here
+fn foo<'a>(x: Box<Foo + 'a>) { //~ ERROR only the 'static lifetime is accepted here
 }
 
 fn bar<'a, T:'a>() { //~ ERROR only the 'static lifetime is accepted here
index 435c90c78305ba28c823f49c4566029732883af1..f0f388a5a078e4ce698666352d5ee51c9bb6a4d0 100644 (file)
@@ -13,7 +13,7 @@ trait Foo {
 
 // This should emit the less confusing error, not the more confusing one.
 
-fn foo(_x: Foo:Send) {
+fn foo(_x: Foo + Send) {
     //~^ERROR reference to trait `Foo` where a type is expected; try `Box<Foo>` or `&Foo`
 }
 
index ac88b21b456e148815e8914437e6f602b695e104..38c7814460147c0cfb975e50e24d8d6f080ebe8b 100644 (file)
@@ -13,7 +13,7 @@ trait Foo {
 
 struct Bar;
 
-impl Foo:Owned for Bar { //~ ERROR bounded traits are only valid in type position
+impl Foo + Owned for Bar { //~ ERROR bounded traits are only valid in type position
 }
 
 fn main() { }
index be5375d29384d8568a949e1f5f47321fc00b93dc..0a5909ff2efbebdaf4b69b790edb4e28c1c2dcad 100644 (file)
@@ -11,6 +11,6 @@
 
 struct Foo;
 
-fn foo(_x: Box<Foo:Send>) { } //~ ERROR kind bounds can only be used on trait types
+fn foo(_x: Box<Foo + Send>) { } //~ ERROR kind bounds can only be used on trait types
 
 fn main() { }
index 4fa695de5228dd89d7954ca8a77d95a97058d4da..dec53672d87f28841d12df25c758a273f8ad9116 100644 (file)
@@ -29,11 +29,11 @@ fn f(&self) -> (A, u16) {
     }
 }
 
-fn f<A:Clone + 'static>(a: A, b: u16) -> Box<Invokable<A>:> {
+fn f<A:Clone + 'static>(a: A, b: u16) -> Box<Invokable<A>> {
     box Invoker {
         a: a,
         b: b,
-    } as (Box<Invokable<A>>+)
+    } as (Box<Invokable<A>>)
 }
 
 pub fn main() {
index 3422b9a799dfe6c82c5192ddff1e38b4af88a2fb..e331173a1589d871066e35347af35facc4a1890d 100644 (file)
@@ -12,8 +12,8 @@
 trait hax { }
 impl<A> hax for A { }
 
-fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax:> {
-    box x as Box<hax:>
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax> {
+    box x as Box<hax>
 }
 
 fn deadcode() {
index 8a5391773bb592d879a202d4e1c9c9d18f8fcd5d..622b35b93aeadcf5ad19cecadc11b79f7c34558a 100644 (file)
@@ -12,8 +12,8 @@
 trait hax { }
 impl<A> hax for A { }
 
-fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax:> {
-    box x as Box<hax:>
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax> {
+    box x as Box<hax>
 }
 
 fn deadcode() {
index 7cd7e70be74faaf4af1261fd3ecf3202662555f3..47a09d55438e40ec9dc301c3fd15af26e3154205 100644 (file)
@@ -20,6 +20,6 @@ pub fn main() {}
 trait A {}
 impl<T: 'static> A for T {}
 
-fn owned1<T: 'static>(a: T) { box a as Box<A:>; } /* note `:` */
-fn owned2<T: 'static>(a: Box<T>) { a as Box<A:>; }
-fn owned3<T: 'static>(a: Box<T>) { box a as Box<A:>; }
+fn owned1<T: 'static>(a: T) { box a as Box<A+>; } /* note `:` */
+fn owned2<T: 'static>(a: Box<T>) { a as Box<A>; }
+fn owned3<T: 'static>(a: Box<T>) { box a as Box<A>; }
index 3dae50bda33763ddee47b30dc27ad8eac0c74a0e..ed8115cd6cad0c41d42d605966c15bad11fcf313 100644 (file)
@@ -17,9 +17,9 @@ fn get(&self) -> A {
     }
 }
 
-fn repeater<A:Clone + 'static>(v: Box<A>) -> Box<repeat<A>:> {
+fn repeater<A:Clone + 'static>(v: Box<A>) -> Box<repeat<A>> {
     // Note: owned kind is not necessary as A appears in the trait type
-    box v as Box<repeat<A>:> // No
+    box v as Box<repeat<A>> // No
 }
 
 pub fn main() {
index be1b135ddc96626374ea8721df7b0e296a419dfd..815488b8c66e0e792cb8860bd362c9e85ca53aae 100644 (file)
@@ -31,10 +31,10 @@ fn foo(&self) -> uint {
 }
 
 pub fn main() {
-    let foos: Vec<Box<FooTrait:>> = vec!(
-        box BarStruct{ x: box(GC) 0 } as Box<FooTrait:>,
-        box BarStruct{ x: box(GC) 1 } as Box<FooTrait:>,
-        box BarStruct{ x: box(GC) 2 } as Box<FooTrait:>
+    let foos: Vec<Box<FooTrait>> = vec!(
+        box BarStruct{ x: box(GC) 0 } as Box<FooTrait>,
+        box BarStruct{ x: box(GC) 1 } as Box<FooTrait>,
+        box BarStruct{ x: box(GC) 2 } as Box<FooTrait>
     );
 
     for i in range(0u, foos.len()) {
index cac132b8e3662d8933c65ce2f5ac639c3fbfff01..540593c43fbfd6b84f59381b6f4158cf28c6c81f 100644 (file)
@@ -28,6 +28,6 @@ fn foo(~self) -> uint {
 }
 
 pub fn main() {
-    let foo = box BarStruct{ x: 22 } as Box<FooTrait:>;
+    let foo = box BarStruct{ x: 22 } as Box<FooTrait>;
     assert_eq!(22, foo.foo());
 }
index 6f33fb470e7ecf0f37801a5182fd39d6943790e8..fbc2829816567b9e50f00e1bd83a1409eff7ae00 100644 (file)
@@ -19,10 +19,10 @@ mod foo {
     pub trait D<'a, T> {}
 }
 
-fn foo1<T>(_: &A<T>: Send) {}
-fn foo2<T>(_: Box<A<T>: Send + Share>) {}
-fn foo3<T>(_: Box<B<int, uint>: 'static>) {}
-fn foo4<'a, T>(_: Box<C<'a, T>: 'static + Send>) {}
-fn foo5<'a, T>(_: Box<foo::D<'a, T>: 'static + Send>) {}
+fn foo1<T>(_: &A<T> + Send) {}
+fn foo2<T>(_: Box<A<T> + Send + Share>) {}
+fn foo3<T>(_: Box<B<int, uint> + 'static>) {}
+fn foo4<'a, T>(_: Box<C<'a, T> + 'static + Send>) {}
+fn foo5<'a, T>(_: Box<foo::D<'a, T> + 'static + Send>) {}
 
 pub fn main() {}
index 3e23c1d4d64ff5945157da2220b474caa4d13613..c5baecf7272fae1311fb9abc3918998897c709ed 100644 (file)
 
 trait Foo { }
 
-fn foo<'a>(x: Box<Foo:'a>) {
+fn foo<'a>(x: Box<Foo + 'a>) {
 }
 
-fn bar<'a, T:'a>() {
+fn bar<'a, T: 'a>() {
 }
 
 pub fn main() { }