From 9306e840f59ac22651c6177a89352bf5d607fcbd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 2 May 2014 17:56:35 -0700 Subject: rustdoc: Migrate from sundown to hoedown This primary fix brought on by this upgrade is the proper matching of the ``` and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a bundled repository. Additionally, hoedown is stricter about code blocks, so this ended up fixing a lot of invalid code blocks (ending with " ```" instead of "```", or ending with "~~~~" instead of "~~~"). Closes #12776 --- src/libstd/c_str.rs | 2 +- src/libstd/iter.rs | 2 +- src/libstd/local_data.rs | 2 +- src/libstd/slice.rs | 8 ++++---- src/libstd/str.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/c_str.rs b/src/libstd/c_str.rs index 310bc861cd3..7de74dbe507 100644 --- a/src/libstd/c_str.rs +++ b/src/libstd/c_str.rs @@ -61,7 +61,7 @@ fn main() { unsafe { puts(c_buffer); } }); } - ``` +``` */ diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs index 18532c39443..62088e5b646 100644 --- a/src/libstd/iter.rs +++ b/src/libstd/iter.rs @@ -52,7 +52,7 @@ loop { None => { break } } } - ``` +``` This `for` loop syntax can be applied to any iterator over any type. diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index a6199aa43ab..072884a1f74 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -33,7 +33,7 @@ local_data::get(key_int, |opt| assert_eq!(opt.map(|x| *x), Some(3))); local_data::set(key_vector, ~[4]); local_data::get(key_vector, |opt| assert_eq!(*opt.unwrap(), ~[4])); - ``` +``` */ diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index 64f6b59be24..43159bcb44a 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -19,7 +19,7 @@ homogeneous types: ```rust let int_vector = [1,2,3]; let str_vector = ["one", "two", "three"]; - ``` +``` This is a big module, but for a high-level overview: @@ -44,7 +44,7 @@ a vector or a vector slice from the index interval `[a, b)`: let numbers = [0, 1, 2]; let last_numbers = numbers.slice(1, 3); // last_numbers is now &[1, 2] - ``` +``` Traits defined for the `~[T]` type, like `OwnedVector`, can only be called on such vectors. These methods deal with adding elements or otherwise changing @@ -57,7 +57,7 @@ of the vector: let mut numbers = vec![0, 1, 2]; numbers.push(7); // numbers is now vec![0, 1, 2, 7]; - ``` +``` ## Implementations of other traits @@ -79,7 +79,7 @@ let numbers = [0, 1, 2]; for &x in numbers.iter() { println!("{} is a number!", x); } - ``` +``` * `.mut_iter()` returns an iterator that allows modifying each value. * `.move_iter()` converts an owned vector into an iterator that diff --git a/src/libstd/str.rs b/src/libstd/str.rs index b105dd0ca5a..adb0c299876 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -37,7 +37,7 @@ fn main() { let borrowed_string1 = "This string is borrowed with the 'static lifetime"; let borrowed_string2: &str = owned_string; // owned strings can be borrowed } - ``` +``` From the example above, you can see that Rust has 2 different kinds of string literals. The owned literals correspond to the owned string types, but the -- cgit 1.4.1-3-g733a5