Skip to content

Commit 2f2e429

Browse files
committed
Remove unnecessary rust annotation from doc code
1 parent 3898e00 commit 2f2e429

File tree

15 files changed

+37
-37
lines changed

15 files changed

+37
-37
lines changed

rand_core/src/impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ macro_rules! fill_via_chunks {
120120
/// # Example
121121
/// (from `IsaacRng`)
122122
///
123-
/// ```rust,ignore
123+
/// ```ignore
124124
/// fn fill_bytes(&mut self, dest: &mut [u8]) {
125125
/// let mut read_len = 0;
126126
/// while read_len < dest.len() {

rand_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub mod le;
108108
///
109109
/// A simple example, obviously not generating very *random* output:
110110
///
111-
/// ```rust
111+
/// ```
112112
/// #![allow(dead_code)]
113113
/// use rand_core::{RngCore, Error, impls};
114114
///

src/distributions/binomial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::f64::consts::PI;
2222
///
2323
/// # Example
2424
///
25-
/// ```rust
25+
/// ```
2626
/// use rand::distributions::{Binomial, Distribution};
2727
///
2828
/// let bin = Binomial::new(20, 0.3);

src/distributions/exponential.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use distributions::{ziggurat, ziggurat_tables, Distribution};
2929
/// College, Oxford
3030
///
3131
/// # Example
32-
/// ```rust
32+
/// ```
3333
/// use rand::{FromEntropy, SmallRng, Rng};
3434
/// use rand::distributions::Exp1;
3535
///
@@ -66,7 +66,7 @@ impl Distribution<f64> for Exp1 {
6666
///
6767
/// # Example
6868
///
69-
/// ```rust
69+
/// ```
7070
/// use rand::distributions::{Exp, Distribution};
7171
///
7272
/// let exp = Exp::new(2.0);

src/distributions/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use distributions::{Distribution, Standard};
2727
/// ranges.
2828
///
2929
/// # Example
30-
/// ```rust
30+
/// ```
3131
/// use rand::{thread_rng, Rng};
3232
/// use rand::distributions::OpenClosed01;
3333
///
@@ -53,7 +53,7 @@ pub struct OpenClosed01;
5353
/// ranges.
5454
///
5555
/// # Example
56-
/// ```rust
56+
/// ```
5757
/// use rand::{thread_rng, Rng};
5858
/// use rand::distributions::Open01;
5959
///

src/distributions/gamma.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use distributions::{Distribution, Exp, Open01};
3535
///
3636
/// # Example
3737
///
38-
/// ```rust
38+
/// ```
3939
/// use rand::distributions::{Distribution, Gamma};
4040
///
4141
/// let gamma = Gamma::new(2.0, 5.0);
@@ -178,7 +178,7 @@ impl Distribution<f64> for GammaLargeShape {
178178
///
179179
/// # Example
180180
///
181-
/// ```rust
181+
/// ```
182182
/// use rand::distributions::{ChiSquared, Distribution};
183183
///
184184
/// let chi = ChiSquared::new(11.0);
@@ -233,7 +233,7 @@ impl Distribution<f64> for ChiSquared {
233233
///
234234
/// # Example
235235
///
236-
/// ```rust
236+
/// ```
237237
/// use rand::distributions::{FisherF, Distribution};
238238
///
239239
/// let f = FisherF::new(2.0, 32.0);
@@ -274,7 +274,7 @@ impl Distribution<f64> for FisherF {
274274
///
275275
/// # Example
276276
///
277-
/// ```rust
277+
/// ```
278278
/// use rand::distributions::{StudentT, Distribution};
279279
///
280280
/// let t = StudentT::new(11.0);

src/distributions/normal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use distributions::{ziggurat, ziggurat_tables, Distribution, Open01};
2727
/// College, Oxford
2828
///
2929
/// # Example
30-
/// ```rust
30+
/// ```
3131
/// use rand::{FromEntropy, SmallRng, Rng};
3232
/// use rand::distributions::StandardNormal;
3333
///
@@ -79,7 +79,7 @@ impl Distribution<f64> for StandardNormal {
7979
///
8080
/// # Example
8181
///
82-
/// ```rust
82+
/// ```
8383
/// use rand::distributions::{Normal, Distribution};
8484
///
8585
/// // mean 2, standard deviation 3
@@ -124,7 +124,7 @@ impl Distribution<f64> for Normal {
124124
///
125125
/// # Example
126126
///
127-
/// ```rust
127+
/// ```
128128
/// use rand::distributions::{LogNormal, Distribution};
129129
///
130130
/// // mean 2, standard deviation 3

src/distributions/other.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use distributions::{Distribution, Standard, Uniform};
2222
///
2323
/// # Example
2424
///
25-
/// ```rust
25+
/// ```
2626
/// use std::iter;
2727
/// use rand::{Rng, thread_rng};
2828
/// use rand::distributions::Alphanumeric;

src/distributions/poisson.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::f64::consts::PI;
2222
///
2323
/// # Example
2424
///
25-
/// ```rust
25+
/// ```
2626
/// use rand::distributions::{Poisson, Distribution};
2727
///
2828
/// let poi = Poisson::new(2.0);

src/lib.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ use distributions::uniform::SampleUniform;
278278

279279
/// An automatically-implemented extension trait on [`RngCore`] providing high-level
280280
/// generic methods for sampling values and other convenience methods.
281-
///
281+
///
282282
/// This is the primary trait to use when generating random values.
283283
///
284284
/// # Generic usage
@@ -303,7 +303,7 @@ use distributions::uniform::SampleUniform;
303303
///
304304
/// Example:
305305
///
306-
/// ```rust
306+
/// ```
307307
/// # use rand::thread_rng;
308308
/// use rand::Rng;
309309
///
@@ -322,7 +322,7 @@ pub trait Rng: RngCore {
322322
///
323323
/// # Example
324324
///
325-
/// ```rust
325+
/// ```
326326
/// use rand::{thread_rng, Rng};
327327
///
328328
/// let mut rng = thread_rng();
@@ -351,7 +351,7 @@ pub trait Rng: RngCore {
351351
///
352352
/// # Example
353353
///
354-
/// ```rust
354+
/// ```
355355
/// use rand::{thread_rng, Rng};
356356
///
357357
/// let mut rng = thread_rng();
@@ -368,7 +368,7 @@ pub trait Rng: RngCore {
368368
///
369369
/// ### Example
370370
///
371-
/// ```rust
371+
/// ```
372372
/// use rand::{thread_rng, Rng};
373373
/// use rand::distributions::Uniform;
374374
///
@@ -383,7 +383,7 @@ pub trait Rng: RngCore {
383383
///
384384
/// # Example
385385
///
386-
/// ```rust
386+
/// ```
387387
/// use rand::{thread_rng, Rng};
388388
/// use rand::distributions::{Alphanumeric, Uniform, Standard};
389389
///
@@ -425,7 +425,7 @@ pub trait Rng: RngCore {
425425
///
426426
/// # Example
427427
///
428-
/// ```rust
428+
/// ```
429429
/// use rand::{thread_rng, Rng};
430430
///
431431
/// let mut arr = [0i8; 20];
@@ -454,7 +454,7 @@ pub trait Rng: RngCore {
454454
///
455455
/// # Example
456456
///
457-
/// ```rust
457+
/// ```
458458
/// # use rand::Error;
459459
/// use rand::{thread_rng, Rng};
460460
///
@@ -481,7 +481,7 @@ pub trait Rng: RngCore {
481481
///
482482
/// # Example
483483
///
484-
/// ```rust
484+
/// ```
485485
/// use rand::{thread_rng, Rng};
486486
///
487487
/// let mut rng = thread_rng();
@@ -546,7 +546,7 @@ pub trait Rng: RngCore {
546546
///
547547
/// # Example
548548
///
549-
/// ```rust
549+
/// ```
550550
/// use rand::{thread_rng, Rng};
551551
///
552552
/// let mut rng = thread_rng();
@@ -591,7 +591,7 @@ pub trait Rng: RngCore {
591591
///
592592
/// # Example
593593
///
594-
/// ```rust
594+
/// ```
595595
/// # #![allow(deprecated)]
596596
/// use rand::{thread_rng, Rng};
597597
///
@@ -614,7 +614,7 @@ pub trait Rng: RngCore {
614614
///
615615
/// # Example
616616
///
617-
/// ```rust
617+
/// ```
618618
/// # #![allow(deprecated)]
619619
/// use rand::{thread_rng, Rng};
620620
///
@@ -673,7 +673,7 @@ pub trait FromEntropy: SeedableRng {
673673
/// If all entropy sources fail this will panic. If you need to handle
674674
/// errors, use the following code, equivalent aside from error handling:
675675
///
676-
/// ```rust
676+
/// ```
677677
/// # use rand::Error;
678678
/// use rand::{Rng, StdRng, EntropyRng, SeedableRng};
679679
///
@@ -951,7 +951,7 @@ pub fn weak_rng() -> XorShiftRng {
951951
///
952952
/// # Example
953953
///
954-
/// ```rust
954+
/// ```
955955
/// # #![allow(deprecated)]
956956
/// use rand::{thread_rng, sample};
957957
///

src/prng/chacha.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl ChaChaRng {
107107
///
108108
/// # Examples
109109
///
110-
/// ```rust
110+
/// ```
111111
/// # #![allow(deprecated)]
112112
/// use rand::{RngCore, ChaChaRng};
113113
///

src/rngs/jitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl JitterRng {
311311
///
312312
/// # Example
313313
///
314-
/// ```rust
314+
/// ```
315315
/// # use rand::{Rng, Error};
316316
/// use rand::jitter::JitterRng;
317317
///

src/rngs/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rand_core::{RngCore, Error, impls};
1818
/// over a `u64` number, using wrapping arithmetic. If the increment is 0
1919
/// the generator yields a constant.
2020
///
21-
/// ```rust
21+
/// ```
2222
/// use rand::Rng;
2323
/// use rand::rngs::mock::StepRng;
2424
///

src/rngs/read.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use rand_core::{RngCore, Error, ErrorKind, impls};
2828
///
2929
/// # Example
3030
///
31-
/// ```rust
31+
/// ```
3232
/// use rand::{read, Rng};
3333
///
3434
/// let data = vec![1, 2, 3, 4, 5, 6, 7, 8];

src/seq.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use super::Rng;
3232
///
3333
/// # Example
3434
///
35-
/// ```rust
35+
/// ```
3636
/// use rand::{thread_rng, seq};
3737
///
3838
/// let mut rng = thread_rng();
@@ -77,7 +77,7 @@ pub fn sample_iter<T, I, R>(rng: &mut R, iterable: I, amount: usize) -> Result<V
7777
///
7878
/// # Example
7979
///
80-
/// ```rust
80+
/// ```
8181
/// use rand::{thread_rng, seq};
8282
///
8383
/// let mut rng = thread_rng();
@@ -105,7 +105,7 @@ pub fn sample_slice<R, T>(rng: &mut R, slice: &[T], amount: usize) -> Vec<T>
105105
///
106106
/// # Example
107107
///
108-
/// ```rust
108+
/// ```
109109
/// use rand::{thread_rng, seq};
110110
///
111111
/// let mut rng = thread_rng();

0 commit comments

Comments
 (0)