summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-23 17:20:36 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-25 14:27:42 -0700
commit3585c64d092082ab2aa16a6d674d063c5d68e1a8 (patch)
tree0474a6b6ae66322964afdef0ddff18c5af3ef73f /src/libstd/num
parentdb28c2998015446dd4f3c9615484f0666225aa60 (diff)
downloadrust-3585c64d092082ab2aa16a6d674d063c5d68e1a8.tar.gz
rust-3585c64d092082ab2aa16a6d674d063c5d68e1a8.zip
rustdoc: Change all code-blocks with a script
    find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g'
    find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g'
    find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/f32.rs4
-rw-r--r--src/libstd/num/f64.rs4
-rw-r--r--src/libstd/num/float.rs4
-rw-r--r--src/libstd/num/int_macros.rs24
-rw-r--r--src/libstd/num/num.rs8
5 files changed, 22 insertions, 22 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index a2a0a1ab13b..afa1acd0897 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -346,9 +346,9 @@ impl Round for f32 {
     ///
     /// The fractional part of the number, satisfying:
     ///
-    /// ~~~ {.rust}
+    /// ```rust
     /// assert!(x == trunc(x) + fract(x))
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn fract(&self) -> f32 { *self - self.trunc() }
diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs
index f7c31c40250..5dbeb6c298f 100644
--- a/src/libstd/num/f64.rs
+++ b/src/libstd/num/f64.rs
@@ -364,9 +364,9 @@ impl Round for f64 {
     ///
     /// The fractional part of the number, satisfying:
     ///
-    /// ~~~ {.rust}
+    /// ```rust
     /// assert!(x == trunc(x) + fract(x))
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn fract(&self) -> f64 { *self - self.trunc() }
diff --git a/src/libstd/num/float.rs b/src/libstd/num/float.rs
index dc46d4fec32..7af47355c8c 100644
--- a/src/libstd/num/float.rs
+++ b/src/libstd/num/float.rs
@@ -414,9 +414,9 @@ impl Round for float {
     ///
     /// The fractional part of the number, satisfying:
     ///
-    /// ~~~ {.rust}
+    /// ```rust
     /// assert!(x == trunc(x) + fract(x))
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn fract(&self) -> float { *self - self.trunc() }
diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs
index ba8beeba4f6..1070e8e592f 100644
--- a/src/libstd/num/int_macros.rs
+++ b/src/libstd/num/int_macros.rs
@@ -118,7 +118,7 @@ impl Div<$T,$T> for $T {
     ///
     /// # Examples
     ///
-    /// ~~~
+    /// ```
     /// assert!( 8 /  3 ==  2);
     /// assert!( 8 / -3 == -2);
     /// assert!(-8 /  3 == -2);
@@ -128,7 +128,7 @@ impl Div<$T,$T> for $T {
     /// assert!( 1 / -2 ==  0);
     /// assert!(-1 /  2 ==  0);
     /// assert!(-1 / -2 ==  0);
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn div(&self, other: &$T) -> $T { *self / *other }
@@ -139,13 +139,13 @@ impl Rem<$T,$T> for $T {
     ///
     /// Returns the integer remainder after division, satisfying:
     ///
-    /// ~~~
+    /// ```
     /// assert!((n / d) * d + (n % d) == n)
-    /// ~~~
+    /// ```
     ///
     /// # Examples
     ///
-    /// ~~~
+    /// ```
     /// assert!( 8 %  3 ==  2);
     /// assert!( 8 % -3 ==  2);
     /// assert!(-8 %  3 == -2);
@@ -155,7 +155,7 @@ impl Rem<$T,$T> for $T {
     /// assert!( 1 % -2 ==  1);
     /// assert!(-1 %  2 == -1);
     /// assert!(-1 % -2 == -1);
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn rem(&self, other: &$T) -> $T { *self % *other }
@@ -214,7 +214,7 @@ impl Integer for $T {
     ///
     /// # Examples
     ///
-    /// ~~~
+    /// ```
     /// assert!(( 8).div_floor( 3) ==  2);
     /// assert!(( 8).div_floor(-3) == -3);
     /// assert!((-8).div_floor( 3) == -3);
@@ -224,7 +224,7 @@ impl Integer for $T {
     /// assert!(( 1).div_floor(-2) == -1);
     /// assert!((-1).div_floor( 2) == -1);
     /// assert!((-1).div_floor(-2) ==  0);
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn div_floor(&self, other: &$T) -> $T {
@@ -240,13 +240,13 @@ impl Integer for $T {
     ///
     /// Integer modulo, satisfying:
     ///
-    /// ~~~
+    /// ```
     /// assert!(n.div_floor(d) * d + n.mod_floor(d) == n)
-    /// ~~~
+    /// ```
     ///
     /// # Examples
     ///
-    /// ~~~
+    /// ```
     /// assert!(( 8).mod_floor( 3) ==  2);
     /// assert!(( 8).mod_floor(-3) == -1);
     /// assert!((-8).mod_floor( 3) ==  1);
@@ -256,7 +256,7 @@ impl Integer for $T {
     /// assert!(( 1).mod_floor(-2) == -1);
     /// assert!((-1).mod_floor( 2) ==  1);
     /// assert!((-1).mod_floor(-2) == -1);
-    /// ~~~
+    /// ```
     ///
     #[inline]
     fn mod_floor(&self, other: &$T) -> $T {
diff --git a/src/libstd/num/num.rs b/src/libstd/num/num.rs
index 634c86104fb..a60bf2f33a9 100644
--- a/src/libstd/num/num.rs
+++ b/src/libstd/num/num.rs
@@ -82,12 +82,12 @@ pub trait Unsigned: Num {}
 
 /// Times trait
 ///
-/// ~~~ {.rust}
+/// ```rust
 /// use num::Times;
 /// let ten = 10 as uint;
 /// let mut accum = 0;
 /// do ten.times { accum += 1; }
-/// ~~~
+/// ```
 ///
 pub trait Times {
     fn times(&self, it: &fn());
@@ -357,10 +357,10 @@ pub trait Float: Real
 ///
 /// # Example
 ///
-/// ~~~
+/// ```
 /// let twenty: f32 = num::cast(0x14);
 /// assert_eq!(twenty, 20f32);
-/// ~~~
+/// ```
 ///
 #[inline]
 pub fn cast<T:NumCast,U:NumCast>(n: T) -> U {