about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-11-26 09:44:33 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-11-26 16:49:36 -0800
commitf40fa8304fea63e04364645260112ddaf91ce70f (patch)
treed1809a9e7677512378a32cb89bed64602a789296 /src/libcollections
parent34b98b306ad23ab895f701de1d009ff026a1d2b1 (diff)
parentf38e4e6d97bf1691858d007afd36b1f356de4774 (diff)
downloadrust-f40fa8304fea63e04364645260112ddaf91ce70f.tar.gz
rust-f40fa8304fea63e04364645260112ddaf91ce70f.zip
rollup merge of #19288: steveklabnik/doc_style_cleanup
This is considered good convention.

This is about half of them in total, I just don't want an impossible to land patch. :smile:
Diffstat (limited to 'src/libcollections')
-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;