about summary refs log tree commit diff
path: root/src/libcollections/enum_set.rs
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2014-11-24 20:06:06 -0500
committerSteve Klabnik <steve@steveklabnik.com>2014-11-25 21:24:16 -0500
commitf38e4e6d97bf1691858d007afd36b1f356de4774 (patch)
tree8b7da6e5965cfdd680908d294bb6814b14b36298 /src/libcollections/enum_set.rs
parent689ef2dabfa3b2b379c953e5fb68ce2c805c2231 (diff)
downloadrust-f38e4e6d97bf1691858d007afd36b1f356de4774.tar.gz
rust-f38e4e6d97bf1691858d007afd36b1f356de4774.zip
/** -> ///
This is considered good convention.
Diffstat (limited to 'src/libcollections/enum_set.rs')
-rw-r--r--src/libcollections/enum_set.rs40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs
index 3d750a30c29..d21465c822f 100644
--- a/src/libcollections/enum_set.rs
+++ b/src/libcollections/enum_set.rs
@@ -42,27 +42,25 @@ impl<E:CLike+fmt::Show> fmt::Show for EnumSet<E> {
     }
 }
 
-/**
-An interface for casting C-like enum to uint and back.
-A typically implementation is as below.
-
-```{rust,ignore}
-#[repr(uint)]
-enum Foo {
-    A, B, C
-}
-
-impl CLike for Foo {
-    fn to_uint(&self) -> uint {
-        *self as uint
-    }
-
-    fn from_uint(v: uint) -> Foo {
-        unsafe { mem::transmute(v) }
-    }
-}
-```
-*/
+/// An interface for casting C-like enum to uint and back.
+/// A typically implementation is as below.
+///
+/// ```{rust,ignore}
+/// #[repr(uint)]
+/// enum Foo {
+///     A, B, C
+/// }
+///
+/// impl CLike for Foo {
+///     fn to_uint(&self) -> uint {
+///         *self as uint
+///     }
+///
+///     fn from_uint(v: uint) -> Foo {
+///         unsafe { mem::transmute(v) }
+///     }
+/// }
+/// ```
 pub trait CLike {
     /// Converts a C-like enum to a `uint`.
     fn to_uint(&self) -> uint;