about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-01-23 18:07:05 -0800
committerBrian Anderson <banderson@mozilla.com>2012-01-23 18:07:05 -0800
commit04351a84ca342f4580e40b9c195b5403b864090b (patch)
tree3b92348bab1ac3f7db3b89f3a18ff243a4d4d72a /src
parentef941998bea47c601adbb4af03beda98412aee6d (diff)
core: Format comm docs correctly
Diffstat (limited to 'src')
-rw-r--r--src/libcore/comm.rs36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs
index b37ccd62aeb..b1376ca3ba2 100644
--- a/src/libcore/comm.rs
+++ b/src/libcore/comm.rs
@@ -1,21 +1,25 @@
 #[doc(
   brief = "Communication between tasks",
-  desc  = "Communication between tasks is facilitated by ports (in the \
-           receiving task), and channels (in the sending task). Any \
-           number of channels may feed into a single port. \
-           Ports and channels may only transmit values of unique \
-           types; that is, values that are statically guaranteed to \
-           be accessed by a single 'owner' at a time.  Unique types \
-           include scalars, vectors, strings, and records, tags, \
-           tuples and unique boxes (~T) thereof. Most notably, \
-           shared boxes (@T) may not be transmitted across channels. \
-           Example: \
-               let p = comm::port(); \
-               task::spawn(comm::chan(p), fn (c: chan<str>) { \
-                   comm::send(c, \"Hello, World\"); \
-               }); \
-               io::println(comm::recv(p));"
-)];
+  desc  = "
+
+Communication between tasks is facilitated by ports (in the receiving
+task), and channels (in the sending task). Any number of channels may
+feed into a single port.  Ports and channels may only transmit values
+of unique types; that is, values that are statically guaranteed to be
+accessed by a single 'owner' at a time.  Unique types include scalars,
+vectors, strings, and records, tags, tuples and unique boxes (`~T`)
+thereof. Most notably, shared boxes (`@T`) may not be transmitted
+across channels.
+
+Example:
+
+    let p = comm::port();
+    task::spawn(comm::chan(p), fn (c: chan<str>) {
+        comm::send(c, \"Hello, World\");
+    });
+    io::println(comm::recv(p));
+
+")];
 
 import sys;
 import task;