about summary refs log tree commit diff
path: root/src/libcore/macros.rs
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-01-12 16:59:34 -0500
committerSteve Klabnik <steve@steveklabnik.com>2015-01-17 10:49:49 -0500
commit078bd498b9fa6eab40df147ce6015ab9aae62b40 (patch)
tree6f3ce07b5482affc2c534e937bf9bb23ccfd8f65 /src/libcore/macros.rs
parenta03701defaf00f323aeaff033d84d93545448b77 (diff)
Evaluate # fn in docs
I searched for times when we were hiding functions with # in the documentation,
and fixed them to not use it unless neccesary.

I also made random improvements whenever I changed something. For example,
I changed Example to Examples, for consistency.

Fixes #13423
Diffstat (limited to 'src/libcore/macros.rs')
-rw-r--r--src/libcore/macros.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 3d3b9f8cf65..1c37126e8e9 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -39,13 +39,16 @@ macro_rules! panic {
 /// // the panic message for these assertions is the stringified value of the
 /// // expression given.
 /// assert!(true);
-/// # fn some_computation() -> bool { true }
+///
+/// fn some_computation() -> bool { true } // a very simple function
+///
 /// assert!(some_computation());
 ///
 /// // assert with a custom message
-/// # let x = true;
+/// let x = true;
 /// assert!(x, "x wasn't true!");
-/// # let a = 3i; let b = 27i;
+///
+/// let a = 3i; let b = 27i;
 /// assert!(a + b == 30, "a = {}, b = {}", a, b);
 /// ```
 #[macro_export]
@@ -108,13 +111,15 @@ macro_rules! assert_eq {
 /// // the panic message for these assertions is the stringified value of the
 /// // expression given.
 /// debug_assert!(true);
-/// # fn some_expensive_computation() -> bool { true }
+///
+/// fn some_expensive_computation() -> bool { true } // a very simple function
 /// debug_assert!(some_expensive_computation());
 ///
 /// // assert with a custom message
-/// # let x = true;
+/// let x = true;
 /// debug_assert!(x, "x wasn't true!");
-/// # let a = 3i; let b = 27i;
+///
+/// let a = 3; let b = 27;
 /// debug_assert!(a + b == 30, "a = {}, b = {}", a, b);
 /// ```
 #[macro_export]