about summary refs log tree commit diff
path: root/src/libstd/workcache.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-02-20 18:04:57 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-02-21 08:29:48 -0800
commitc0defda4994b2cf292901c24bef88b37a088861e (patch)
tree07d17e8e78042ffcc42adcb40f80689431bff855 /src/libstd/workcache.rs
parentbf2a225c0b6f90f61bcaf4a6f33d9eaf424795b6 (diff)
downloadrust-c0defda4994b2cf292901c24bef88b37a088861e.tar.gz
rust-c0defda4994b2cf292901c24bef88b37a088861e.zip
librustc: Separate the rest of the trait bounds with `+` and stop parsing space-separated ones. rs=plussing
Diffstat (limited to 'src/libstd/workcache.rs')
-rw-r--r--src/libstd/workcache.rs28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index 4de7c1b9925..a06dee723c8 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -260,9 +260,7 @@ impl Context {
         Context{db: db, logger: lg, cfg: cfg, freshness: LinearMap::new()}
     }
 
-    fn prep<T:Owned
-              Encodable<json::Encoder>
-              Decodable<json::Decoder>>(
+    fn prep<T:Owned + Encodable<json::Encoder> + Decodable<json::Decoder>>(
                   @self,
                   fn_name:&str,
                   blk: fn(@Mut<Prep>)->Work<T>) -> Work<T> {
@@ -278,9 +276,8 @@ trait TPrep {
     fn declare_input(&self, kind:&str, name:&str, val:&str);
     fn is_fresh(&self, cat:&str, kind:&str, name:&str, val:&str) -> bool;
     fn all_fresh(&self, cat:&str, map:&WorkMap) -> bool;
-    fn exec<T:Owned
-        Encodable<json::Encoder>
-        Decodable<json::Decoder>>(&self, blk: ~fn(&Exec) -> T) -> Work<T>;
+    fn exec<T:Owned + Encodable<json::Encoder> + Decodable<json::Decoder>>(
+        &self, blk: ~fn(&Exec) -> T) -> Work<T>;
 }
 
 impl TPrep for @Mut<Prep> {
@@ -318,11 +315,8 @@ impl TPrep for @Mut<Prep> {
         return true;
     }
 
-    fn exec<T:Owned
-        Encodable<json::Encoder>
-        Decodable<json::Decoder>>(&self,
-                                  blk: ~fn(&Exec) -> T) -> Work<T> {
-
+    fn exec<T:Owned + Encodable<json::Encoder> + Decodable<json::Decoder>>(
+            &self, blk: ~fn(&Exec) -> T) -> Work<T> {
         let mut bo = Some(blk);
 
         do self.borrow_imm |p| {
@@ -360,20 +354,15 @@ impl TPrep for @Mut<Prep> {
     }
 }
 
-impl<T:Owned
-       Encodable<json::Encoder>
-       Decodable<json::Decoder>>
-    Work<T> {
+impl<T:Owned + Encodable<json::Encoder> + Decodable<json::Decoder>> Work<T> {
     static fn new(p: @Mut<Prep>, e: Either<T,PortOne<(Exec,T)>>) -> Work<T> {
         Work { prep: p, res: Some(e) }
     }
 }
 
 // FIXME (#3724): movable self. This should be in impl Work.
-fn unwrap<T:Owned
-            Encodable<json::Encoder>
-            Decodable<json::Decoder>>(w: Work<T>) -> T {
-
+fn unwrap<T:Owned + Encodable<json::Encoder> + Decodable<json::Decoder>>(
+        w: Work<T>) -> T {
     let mut ww = w;
     let mut s = None;
 
@@ -383,7 +372,6 @@ fn unwrap<T:Owned
         None => fail!(),
         Some(Left(v)) => v,
         Some(Right(port)) => {
-
             let (exe, v) = match recv(port) {
                 oneshot::send(data) => data
             };