Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit syntax highlight from docs. #23329

Merged
merged 1 commit into from
Mar 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ use heap::deallocate;
/// With simple pipes, without `Arc`, a copy would have to be made for each
/// task.
///
/// ```rust
/// ```
/// use std::sync::Arc;
/// use std::thread;
///
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use core::raw::TraitObject;
///
/// The following two examples are equivalent:
///
/// ```rust
/// ```
/// #![feature(box_syntax)]
/// use std::boxed::HEAP;
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static FALSE: bool = false;
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::BitVec;
///
/// let mut bv = BitVec::from_elem(10, false);
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl<T> ToOwned for T where T: Clone {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::borrow::Cow;
///
/// fn abs_all(input: &mut Cow<[i32]>) {
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ use string;
///
/// # Examples
///
/// ```rust
/// ```
/// use std::fmt;
///
/// let s = fmt::format(format_args!("Hello, {}!", "world"));
Expand Down
30 changes: 15 additions & 15 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut v = [5, 4, 1, 3, 2];
/// v.sort_by(|a, b| a.cmp(b));
/// assert!(v == [1, 2, 3, 4, 5]);
Expand All @@ -160,7 +160,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut a = [1, 2, 3, 4, 5];
/// let b = vec![6, 7, 8];
/// let num_moved = a.move_from(b, 0, 3);
Expand Down Expand Up @@ -282,7 +282,7 @@ pub trait SliceExt {
/// Print the adjacent pairs of a slice (i.e. `[1,2]`, `[2,3]`,
/// `[3,4]`):
///
/// ```rust
/// ```
/// let v = &[1, 2, 3, 4];
/// for win in v.windows(2) {
/// println!("{:?}", win);
Expand All @@ -305,7 +305,7 @@ pub trait SliceExt {
/// Print the slice two elements at a time (i.e. `[1,2]`,
/// `[3,4]`, `[5]`):
///
/// ```rust
/// ```
/// let v = &[1, 2, 3, 4, 5];
/// for win in v.chunks(2) {
/// println!("{:?}", win);
Expand Down Expand Up @@ -396,7 +396,7 @@ pub trait SliceExt {
/// uniquely determined position; the second and third are not
/// found; the fourth could match any position in `[1,4]`.
///
/// ```rust
/// ```
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
/// let s = s.as_slice();
///
Expand Down Expand Up @@ -531,7 +531,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut v = ["a", "b", "c", "d"];
/// v.swap(1, 3);
/// assert!(v == ["a", "d", "c", "b"]);
Expand All @@ -551,7 +551,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut v = [1, 2, 3, 4, 5, 6];
///
/// // scoped to restrict the lifetime of the borrows
Expand Down Expand Up @@ -580,7 +580,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut v = [1, 2, 3];
/// v.reverse();
/// assert!(v == [3, 2, 1]);
Expand Down Expand Up @@ -612,7 +612,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let v = [1, 2, 3];
/// let mut perms = v.permutations();
///
Expand All @@ -623,7 +623,7 @@ pub trait SliceExt {
///
/// Iterating through permutations one by one.
///
/// ```rust
/// ```
/// let v = [1, 2, 3];
/// let mut perms = v.permutations();
///
Expand All @@ -640,7 +640,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut dst = [0, 0, 0];
/// let src = [1, 2];
///
Expand All @@ -660,7 +660,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut v = [-5, 4, 1, -3, 2];
///
/// v.sort();
Expand All @@ -682,7 +682,7 @@ pub trait SliceExt {
/// uniquely determined position; the second and third are not
/// found; the fourth could match any position in `[1,4]`.
///
/// ```rust
/// ```
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
/// let s = s.as_slice();
///
Expand All @@ -709,7 +709,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let v: &mut [_] = &mut [0, 1, 2];
/// v.next_permutation();
/// let b: &mut [_] = &mut [0, 2, 1];
Expand All @@ -729,7 +729,7 @@ pub trait SliceExt {
///
/// # Examples
///
/// ```rust
/// ```
/// let v: &mut [_] = &mut [1, 0, 2];
/// v.prev_permutation();
/// let b: &mut [_] = &mut [0, 2, 1];
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ pub trait StrExt: Index<RangeFull, Output = str> {
///
/// # Examples
///
/// ```rust
/// ```
/// assert!("banana".ends_with("nana"));
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
8 changes: 4 additions & 4 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl String {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::str::Utf8Error;
///
/// let hello_vec = vec![104, 101, 108, 108, 111];
Expand All @@ -136,7 +136,7 @@ impl String {
///
/// # Examples
///
/// ```rust
/// ```
/// let input = b"Hello \xF0\x90\x80World";
/// let output = String::from_utf8_lossy(input);
/// assert_eq!(output, "Hello \u{FFFD}World");
Expand Down Expand Up @@ -268,7 +268,7 @@ impl String {
///
/// # Examples
///
/// ```rust
/// ```
/// // 𝄞music
/// let mut v = &mut [0xD834, 0xDD1E, 0x006d, 0x0075,
/// 0x0073, 0x0069, 0x0063];
Expand Down Expand Up @@ -296,7 +296,7 @@ impl String {
///
/// # Examples
///
/// ```rust
/// ```
/// // 𝄞mus<invalid>ic<invalid>
/// let v = &[0xD834, 0xDD1E, 0x006d, 0x0075,
/// 0x0073, 0xDD1E, 0x0069, 0x0063,
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ impl<T> Vec<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut vec = vec!(1, 2);
/// vec.push(3);
/// assert_eq!(vec, [1, 2, 3]);
Expand Down Expand Up @@ -674,7 +674,7 @@ impl<T> Vec<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// let mut vec = vec![1, 2, 3];
/// assert_eq!(vec.pop(), Some(3));
/// assert_eq!(vec, [1, 2]);
Expand Down
18 changes: 9 additions & 9 deletions src/libcollections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand All @@ -223,7 +223,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand Down Expand Up @@ -257,7 +257,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand Down Expand Up @@ -512,7 +512,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand All @@ -535,7 +535,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand Down Expand Up @@ -823,7 +823,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand All @@ -848,7 +848,7 @@ impl<T> VecDeque<T> {
///
/// # Examples
///
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand Down Expand Up @@ -948,7 +948,7 @@ impl<T> VecDeque<T> {
/// Panics if `i` is greater than ringbuf's length
///
/// # Examples
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand Down Expand Up @@ -1150,7 +1150,7 @@ impl<T> VecDeque<T> {
/// Returns `None` if `i` is out of bounds.
///
/// # Examples
/// ```rust
/// ```
/// use std::collections::VecDeque;
///
/// let mut buf = VecDeque::new();
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)"),
Expand All @@ -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"); }
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ 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> { }
/// ```
///
/// Another equivalent, but clearer, option would be to use
/// `MarkerTrait`:
///
/// ```rust
/// ```
/// use std::marker::MarkerTrait;
/// trait Even : MarkerTrait { }
/// ```
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl Float for f32 {

/// The fractional part of the number, satisfying:
///
/// ```rust
/// ```
/// use core::num::Float;
///
/// let x = 1.65f32;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl Float for f64 {

/// The fractional part of the number, satisfying:
///
/// ```rust
/// ```
/// use core::num::Float;
///
/// let x = 1.65f64;
Expand Down
Loading