Skip to content

Commit 0b463b0

Browse files
committed
Rollup merge of rust-lang#23329 - jbcrail:rm-syntax-highlight, r=sanxiyn
As suggested by @steveklabnik in rust-lang#23254, I removed the redundant Rust syntax highlighting from the documentation.
2 parents 46200e5 + fcf3f32 commit 0b463b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+172
-167
lines changed

Diff for: src/liballoc/arc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ use heap::deallocate;
9494
/// With simple pipes, without `Arc`, a copy would have to be made for each
9595
/// task.
9696
///
97-
/// ```rust
97+
/// ```
9898
/// use std::sync::Arc;
9999
/// use std::thread;
100100
///

Diff for: src/liballoc/boxed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ use core::raw::TraitObject;
6464
///
6565
/// The following two examples are equivalent:
6666
///
67-
/// ```rust
67+
/// ```
6868
/// #![feature(box_syntax)]
6969
/// use std::boxed::HEAP;
7070
///

Diff for: src/libcollections/bit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static FALSE: bool = false;
133133
///
134134
/// # Examples
135135
///
136-
/// ```rust
136+
/// ```
137137
/// use std::collections::BitVec;
138138
///
139139
/// let mut bv = BitVec::from_elem(10, false);

Diff for: src/libcollections/borrow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<T> ToOwned for T where T: Clone {
129129
///
130130
/// # Examples
131131
///
132-
/// ```rust
132+
/// ```
133133
/// use std::borrow::Cow;
134134
///
135135
/// fn abs_all(input: &mut Cow<[i32]>) {

Diff for: src/libcollections/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ use string;
422422
///
423423
/// # Examples
424424
///
425-
/// ```rust
425+
/// ```
426426
/// use std::fmt;
427427
///
428428
/// let s = fmt::format(format_args!("Hello, {}!", "world"));

Diff for: src/libcollections/slice.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub trait SliceExt {
136136
///
137137
/// # Examples
138138
///
139-
/// ```rust
139+
/// ```
140140
/// let mut v = [5, 4, 1, 3, 2];
141141
/// v.sort_by(|a, b| a.cmp(b));
142142
/// assert!(v == [1, 2, 3, 4, 5]);
@@ -162,7 +162,7 @@ pub trait SliceExt {
162162
///
163163
/// # Examples
164164
///
165-
/// ```rust
165+
/// ```
166166
/// let mut a = [1, 2, 3, 4, 5];
167167
/// let b = vec![6, 7, 8];
168168
/// let num_moved = a.move_from(b, 0, 3);
@@ -284,7 +284,7 @@ pub trait SliceExt {
284284
/// Print the adjacent pairs of a slice (i.e. `[1,2]`, `[2,3]`,
285285
/// `[3,4]`):
286286
///
287-
/// ```rust
287+
/// ```
288288
/// let v = &[1, 2, 3, 4];
289289
/// for win in v.windows(2) {
290290
/// println!("{:?}", win);
@@ -307,7 +307,7 @@ pub trait SliceExt {
307307
/// Print the slice two elements at a time (i.e. `[1,2]`,
308308
/// `[3,4]`, `[5]`):
309309
///
310-
/// ```rust
310+
/// ```
311311
/// let v = &[1, 2, 3, 4, 5];
312312
/// for win in v.chunks(2) {
313313
/// println!("{:?}", win);
@@ -398,7 +398,7 @@ pub trait SliceExt {
398398
/// uniquely determined position; the second and third are not
399399
/// found; the fourth could match any position in `[1,4]`.
400400
///
401-
/// ```rust
401+
/// ```
402402
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
403403
/// let s = s.as_slice();
404404
///
@@ -533,7 +533,7 @@ pub trait SliceExt {
533533
///
534534
/// # Examples
535535
///
536-
/// ```rust
536+
/// ```
537537
/// let mut v = ["a", "b", "c", "d"];
538538
/// v.swap(1, 3);
539539
/// assert!(v == ["a", "d", "c", "b"]);
@@ -553,7 +553,7 @@ pub trait SliceExt {
553553
///
554554
/// # Examples
555555
///
556-
/// ```rust
556+
/// ```
557557
/// let mut v = [1, 2, 3, 4, 5, 6];
558558
///
559559
/// // scoped to restrict the lifetime of the borrows
@@ -582,7 +582,7 @@ pub trait SliceExt {
582582
///
583583
/// # Examples
584584
///
585-
/// ```rust
585+
/// ```
586586
/// let mut v = [1, 2, 3];
587587
/// v.reverse();
588588
/// assert!(v == [3, 2, 1]);
@@ -614,7 +614,7 @@ pub trait SliceExt {
614614
///
615615
/// # Examples
616616
///
617-
/// ```rust
617+
/// ```
618618
/// let v = [1, 2, 3];
619619
/// let mut perms = v.permutations();
620620
///
@@ -625,7 +625,7 @@ pub trait SliceExt {
625625
///
626626
/// Iterating through permutations one by one.
627627
///
628-
/// ```rust
628+
/// ```
629629
/// let v = [1, 2, 3];
630630
/// let mut perms = v.permutations();
631631
///
@@ -642,7 +642,7 @@ pub trait SliceExt {
642642
///
643643
/// # Examples
644644
///
645-
/// ```rust
645+
/// ```
646646
/// let mut dst = [0, 0, 0];
647647
/// let src = [1, 2];
648648
///
@@ -662,7 +662,7 @@ pub trait SliceExt {
662662
///
663663
/// # Examples
664664
///
665-
/// ```rust
665+
/// ```
666666
/// let mut v = [-5, 4, 1, -3, 2];
667667
///
668668
/// v.sort();
@@ -684,7 +684,7 @@ pub trait SliceExt {
684684
/// uniquely determined position; the second and third are not
685685
/// found; the fourth could match any position in `[1,4]`.
686686
///
687-
/// ```rust
687+
/// ```
688688
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
689689
/// let s = s.as_slice();
690690
///
@@ -711,7 +711,7 @@ pub trait SliceExt {
711711
///
712712
/// # Examples
713713
///
714-
/// ```rust
714+
/// ```
715715
/// let v: &mut [_] = &mut [0, 1, 2];
716716
/// v.next_permutation();
717717
/// let b: &mut [_] = &mut [0, 2, 1];
@@ -731,7 +731,7 @@ pub trait SliceExt {
731731
///
732732
/// # Examples
733733
///
734-
/// ```rust
734+
/// ```
735735
/// let v: &mut [_] = &mut [1, 0, 2];
736736
/// v.prev_permutation();
737737
/// let b: &mut [_] = &mut [0, 2, 1];

Diff for: src/libcollections/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ pub trait StrExt: Index<RangeFull, Output = str> {
911911
///
912912
/// # Examples
913913
///
914-
/// ```rust
914+
/// ```
915915
/// assert!("banana".ends_with("nana"));
916916
/// ```
917917
#[stable(feature = "rust1", since = "1.0.0")]

Diff for: src/libcollections/string.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl String {
138138
///
139139
/// # Examples
140140
///
141-
/// ```rust
141+
/// ```
142142
/// use std::str::Utf8Error;
143143
///
144144
/// let hello_vec = vec![104, 101, 108, 108, 111];
@@ -164,7 +164,7 @@ impl String {
164164
///
165165
/// # Examples
166166
///
167-
/// ```rust
167+
/// ```
168168
/// let input = b"Hello \xF0\x90\x80World";
169169
/// let output = String::from_utf8_lossy(input);
170170
/// assert_eq!(output, "Hello \u{FFFD}World");
@@ -296,7 +296,7 @@ impl String {
296296
///
297297
/// # Examples
298298
///
299-
/// ```rust
299+
/// ```
300300
/// // 𝄞music
301301
/// let mut v = &mut [0xD834, 0xDD1E, 0x006d, 0x0075,
302302
/// 0x0073, 0x0069, 0x0063];
@@ -324,7 +324,7 @@ impl String {
324324
///
325325
/// # Examples
326326
///
327-
/// ```rust
327+
/// ```
328328
/// // 𝄞mus<invalid>ic<invalid>
329329
/// let v = &[0xD834, 0xDD1E, 0x006d, 0x0075,
330330
/// 0x0073, 0xDD1E, 0x0069, 0x0063,

Diff for: src/libcollections/vec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ impl<T> Vec<T> {
633633
///
634634
/// # Examples
635635
///
636-
/// ```rust
636+
/// ```
637637
/// let mut vec = vec!(1, 2);
638638
/// vec.push(3);
639639
/// assert_eq!(vec, [1, 2, 3]);
@@ -671,7 +671,7 @@ impl<T> Vec<T> {
671671
///
672672
/// # Examples
673673
///
674-
/// ```rust
674+
/// ```
675675
/// let mut vec = vec![1, 2, 3];
676676
/// assert_eq!(vec.pop(), Some(3));
677677
/// assert_eq!(vec, [1, 2]);

Diff for: src/libcollections/vec_deque.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl<T> VecDeque<T> {
201201
///
202202
/// # Examples
203203
///
204-
/// ```rust
204+
/// ```
205205
/// use std::collections::VecDeque;
206206
///
207207
/// let mut buf = VecDeque::new();
@@ -224,7 +224,7 @@ impl<T> VecDeque<T> {
224224
///
225225
/// # Examples
226226
///
227-
/// ```rust
227+
/// ```
228228
/// use std::collections::VecDeque;
229229
///
230230
/// let mut buf = VecDeque::new();
@@ -258,7 +258,7 @@ impl<T> VecDeque<T> {
258258
///
259259
/// # Examples
260260
///
261-
/// ```rust
261+
/// ```
262262
/// use std::collections::VecDeque;
263263
///
264264
/// let mut buf = VecDeque::new();
@@ -513,7 +513,7 @@ impl<T> VecDeque<T> {
513513
///
514514
/// # Examples
515515
///
516-
/// ```rust
516+
/// ```
517517
/// use std::collections::VecDeque;
518518
///
519519
/// let mut buf = VecDeque::new();
@@ -536,7 +536,7 @@ impl<T> VecDeque<T> {
536536
///
537537
/// # Examples
538538
///
539-
/// ```rust
539+
/// ```
540540
/// use std::collections::VecDeque;
541541
///
542542
/// let mut buf = VecDeque::new();
@@ -824,7 +824,7 @@ impl<T> VecDeque<T> {
824824
///
825825
/// # Examples
826826
///
827-
/// ```rust
827+
/// ```
828828
/// use std::collections::VecDeque;
829829
///
830830
/// let mut buf = VecDeque::new();
@@ -849,7 +849,7 @@ impl<T> VecDeque<T> {
849849
///
850850
/// # Examples
851851
///
852-
/// ```rust
852+
/// ```
853853
/// use std::collections::VecDeque;
854854
///
855855
/// let mut buf = VecDeque::new();
@@ -949,7 +949,7 @@ impl<T> VecDeque<T> {
949949
/// Panics if `i` is greater than ringbuf's length
950950
///
951951
/// # Examples
952-
/// ```rust
952+
/// ```
953953
/// use std::collections::VecDeque;
954954
///
955955
/// let mut buf = VecDeque::new();
@@ -1151,7 +1151,7 @@ impl<T> VecDeque<T> {
11511151
/// Returns `None` if `i` is out of bounds.
11521152
///
11531153
/// # Examples
1154-
/// ```rust
1154+
/// ```
11551155
/// use std::collections::VecDeque;
11561156
///
11571157
/// let mut buf = VecDeque::new();

Diff for: src/libcore/macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ macro_rules! writeln {
216216
///
217217
/// Match arms:
218218
///
219-
/// ```rust
219+
/// ```
220220
/// fn foo(x: Option<int>) {
221221
/// match x {
222222
/// Some(n) if n >= 0 => println!("Some(Non-negative)"),
@@ -229,7 +229,7 @@ macro_rules! writeln {
229229
///
230230
/// Iterators:
231231
///
232-
/// ```rust
232+
/// ```
233233
/// fn divide_by_three(x: u32) -> u32 { // one of the poorest implementations of x/3
234234
/// for i in std::iter::count(0, 1) {
235235
/// if 3*i < i { panic!("u32 overflow"); }

Diff for: src/libcore/marker.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ impl<T:?Sized> MarkerTrait for T { }
310310
///
311311
/// Therefore, we can model a method like this as follows:
312312
///
313-
/// ```rust
313+
/// ```
314314
/// use std::marker::PhantomFn;
315315
/// trait Even : PhantomFn<Self> { }
316316
/// ```
317317
///
318318
/// Another equivalent, but clearer, option would be to use
319319
/// `MarkerTrait`:
320320
///
321-
/// ```rust
321+
/// ```
322322
/// use std::marker::MarkerTrait;
323323
/// trait Even : MarkerTrait { }
324324
/// ```

Diff for: src/libcore/mem.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
251251
/// `self.buf`. But `replace` can be used to disassociate the original value of `self.buf` from
252252
/// `self`, allowing it to be returned:
253253
///
254-
/// ```rust
254+
/// ```
255255
/// use std::mem;
256256
/// # struct Buffer<T> { buf: Vec<T> }
257257
/// impl<T> Buffer<T> {

Diff for: src/libcore/num/f32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ impl Float for f32 {
281281

282282
/// The fractional part of the number, satisfying:
283283
///
284-
/// ```rust
284+
/// ```
285285
/// use core::num::Float;
286286
///
287287
/// let x = 1.65f32;

Diff for: src/libcore/num/f64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ impl Float for f64 {
288288

289289
/// The fractional part of the number, satisfying:
290290
///
291-
/// ```rust
291+
/// ```
292292
/// use core::num::Float;
293293
///
294294
/// let x = 1.65f64;

0 commit comments

Comments
 (0)