diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-17 15:20:27 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-17 15:20:27 +0530 |
| commit | 0b463b075e221a779ee65d90f603447baf6fe2cb (patch) | |
| tree | df1c86ae3fa09eae3899d7cdf9bd7d9293d6cf8e /src/libcore | |
| parent | 46200e5090c94f2ab1812a00c0fd778a6784e2e9 (diff) | |
| parent | fcf3f3209accbb9240ea44a24165e35e50eba1d2 (diff) | |
| download | rust-0b463b075e221a779ee65d90f603447baf6fe2cb.tar.gz rust-0b463b075e221a779ee65d90f603447baf6fe2cb.zip | |
Rollup merge of #23329 - jbcrail:rm-syntax-highlight, r=sanxiyn
As suggested by @steveklabnik in #23254, I removed the redundant Rust syntax highlighting from the documentation.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/macros.rs | 4 | ||||
| -rw-r--r-- | src/libcore/marker.rs | 4 | ||||
| -rw-r--r-- | src/libcore/mem.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/f32.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/f64.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 32 | ||||
| -rw-r--r-- | src/libcore/ops.rs | 8 | ||||
| -rw-r--r-- | src/libcore/option.rs | 2 | ||||
| -rw-r--r-- | src/libcore/result.rs | 2 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 4 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 6 |
11 files changed, 34 insertions, 34 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 6575bac501f..6dcae9879a0 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -216,7 +216,7 @@ macro_rules! writeln { /// /// Match arms: /// -/// ```rust +/// ``` /// fn foo(x: Option<int>) { /// match x { /// Some(n) if n >= 0 => println!("Some(Non-negative)"), @@ -229,7 +229,7 @@ macro_rules! writeln { /// /// Iterators: /// -/// ```rust +/// ``` /// fn divide_by_three(x: u32) -> u32 { // one of the poorest implementations of x/3 /// for i in std::iter::count(0, 1) { /// if 3*i < i { panic!("u32 overflow"); } diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index d596a06709c..1b866501b8e 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -310,7 +310,7 @@ impl<T:?Sized> MarkerTrait for T { } /// /// Therefore, we can model a method like this as follows: /// -/// ```rust +/// ``` /// use std::marker::PhantomFn; /// trait Even : PhantomFn<Self> { } /// ``` @@ -318,7 +318,7 @@ impl<T:?Sized> MarkerTrait for T { } /// Another equivalent, but clearer, option would be to use /// `MarkerTrait`: /// -/// ```rust +/// ``` /// use std::marker::MarkerTrait; /// trait Even : MarkerTrait { } /// ``` diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 2aa8ec0c548..551f97ead12 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -251,7 +251,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) { /// `self.buf`. But `replace` can be used to disassociate the original value of `self.buf` from /// `self`, allowing it to be returned: /// -/// ```rust +/// ``` /// use std::mem; /// # struct Buffer<T> { buf: Vec<T> } /// impl<T> Buffer<T> { diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 0d8e3044ecc..ae1b5f65eeb 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -281,7 +281,7 @@ impl Float for f32 { /// The fractional part of the number, satisfying: /// - /// ```rust + /// ``` /// use core::num::Float; /// /// let x = 1.65f32; diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index d7e91058a46..4a73c1e8fcf 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -288,7 +288,7 @@ impl Float for f64 { /// The fractional part of the number, satisfying: /// - /// ```rust + /// ``` /// use core::num::Float; /// /// let x = 1.65f64; diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 4381b1fb3c9..a77f9709600 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -84,7 +84,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -99,7 +99,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0b01001100u8; @@ -118,7 +118,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -134,7 +134,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0b0101000u16; @@ -150,7 +150,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -167,7 +167,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -183,7 +183,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -200,7 +200,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -223,7 +223,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -246,7 +246,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -269,7 +269,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// let n = 0x0123456789ABCDEFu64; @@ -291,7 +291,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// assert_eq!(5u16.checked_add(65530), Some(65535)); @@ -305,7 +305,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// assert_eq!((-127i8).checked_sub(1), Some(-128)); @@ -319,7 +319,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// assert_eq!(5u8.checked_mul(51), Some(255)); @@ -333,7 +333,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// assert_eq!((-127i8).checked_div(-1), Some(127)); @@ -371,7 +371,7 @@ pub trait Int /// /// # Examples /// - /// ```rust + /// ``` /// use std::num::Int; /// /// assert_eq!(2.pow(4), 16); diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 077b44f2dd2..6324e8fa874 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -78,7 +78,7 @@ use fmt; /// A trivial implementation of `Drop`. The `drop` method is called when `_x` goes /// out of scope, and therefore `main` prints `Dropping!`. /// -/// ```rust +/// ``` /// struct HasDrop; /// /// impl Drop for HasDrop { @@ -162,7 +162,7 @@ macro_rules! forward_ref_binop { /// A trivial implementation of `Add`. When `Foo + Foo` happens, it ends up /// calling `add`, and therefore, `main` prints `Adding!`. /// -/// ```rust +/// ``` /// use std::ops::Add; /// /// #[derive(Copy)] @@ -216,7 +216,7 @@ add_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } /// A trivial implementation of `Sub`. When `Foo - Foo` happens, it ends up /// calling `sub`, and therefore, `main` prints `Subtracting!`. /// -/// ```rust +/// ``` /// use std::ops::Sub; /// /// #[derive(Copy)] @@ -270,7 +270,7 @@ sub_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } /// A trivial implementation of `Mul`. When `Foo * Foo` happens, it ends up /// calling `mul`, and therefore, `main` prints `Multiplying!`. /// -/// ```rust +/// ``` /// use std::ops::Mul; /// /// #[derive(Copy)] diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 2dd8bf67220..455c68d4319 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -897,7 +897,7 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> { /// Here is an example which increments every integer in a vector, /// checking for overflow: /// - /// ```rust + /// ``` /// use std::u16; /// /// let v = vec!(1, 2); diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 9fba9a4d8ec..fee8caa04c4 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -896,7 +896,7 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> { /// Here is an example which increments every integer in a vector, /// checking for overflow: /// - /// ```rust + /// ``` /// use std::u32; /// /// let v = vec!(1, 2); diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index c8a8dd88501..b1576c0d377 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -1449,7 +1449,7 @@ pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] { /// /// # Examples /// -/// ```rust +/// ``` /// use std::slice; /// /// // manifest a slice out of thin air! @@ -1492,7 +1492,7 @@ pub unsafe fn from_raw_parts_mut<'a, T>(p: *mut T, len: usize) -> &'a mut [T] { /// /// # Examples /// -/// ```rust +/// ``` /// use std::slice; /// /// // manifest a slice out of thin air! diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 3873f305b42..bd46b093b76 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -140,7 +140,7 @@ impl FromStr for bool { /// /// # Examples /// - /// ```rust + /// ``` /// use std::str::FromStr; /// /// assert_eq!(FromStr::from_str("true"), Ok(true)); @@ -151,7 +151,7 @@ impl FromStr for bool { /// Note, in many cases, the StrExt::parse() which is based on /// this FromStr::from_str() is more proper. /// - /// ```rust + /// ``` /// assert_eq!("true".parse(), Ok(true)); /// assert_eq!("false".parse(), Ok(false)); /// assert!("not even a boolean".parse::<bool>().is_err()); @@ -1186,7 +1186,7 @@ mod traits { /// /// # Examples /// - /// ```rust + /// ``` /// let s = "Löwe 老虎 Léopard"; /// assert_eq!(&s[0 .. 1], "L"); /// |
