Skip to content

Commit 5e77fe5

Browse files
Fix trait references in documentation (#1752)
1 parent da89185 commit 5e77fe5

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎src/rng.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use rand_core::Rng;
1818
/// User-level interface for RNGs
1919
///
2020
/// [`Rng`] is the `dyn`-safe implementation-level interface for Random
21-
/// (Number) Generators. This trait, `Rng`, provides a user-level interface on
22-
/// RNGs. It is implemented automatically for any `R: Rng`.
21+
/// (Number) Generators. This trait, `RngExt`, provides a user-level interface
22+
/// on RNGs. It is implemented automatically for any <code>R: [Rng][]</code>.
2323
///
2424
/// This trait must usually be brought into scope via `use rand::RngExt;` or
2525
/// `use rand::prelude::*;`.

‎src/rngs/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
//! ## Traits and functionality
6868
//!
6969
//! All generators implement [`TryRng`]. Most implement [`Rng`] (i.e.
70-
//! `TryRng<Error = Infallible>`) and thus also implement [`Rng`][crate::Rng].
70+
//! `TryRng<Error = Infallible>`) and thus also implement [`RngExt`].
7171
//! See also the [Random Values] chapter in the book.
7272
//!
7373
//! Secure RNGs may additionally implement the [`CryptoRng`] trait.
@@ -80,7 +80,7 @@
8080
//! [Types of generators]: https://rust-random.github.io/book/guide-gen.html
8181
//! [Our RNGs]: https://rust-random.github.io/book/guide-rngs.html
8282
//! [Random Values]: https://rust-random.github.io/book/guide-values.html
83-
//! [`Rng`]: crate::RngExt
83+
//! [`RngExt`]: crate::RngExt
8484
//! [`TryRng`]: crate::TryRng
8585
//! [`Rng`]: crate::Rng
8686
//! [`CryptoRng`]: crate::CryptoRng

‎src/rngs/small.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
6161
///
6262
/// ## Generation
6363
///
64-
/// The generators implements [`Rng`] and thus also [`Rng`][crate::Rng].
64+
/// The generator implements [`Rng`] and thus also [`RngExt`].
6565
/// See also the [Random Values] chapter in the book.
6666
///
6767
/// [portable]: https://rust-random.github.io/book/crate-reprod.html
@@ -73,6 +73,7 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
7373
/// [rand_xoshiro]: https://crates.io/crates/rand_xoshiro
7474
/// [`rand_seeder`]: https://docs.rs/rand_seeder/latest/rand_seeder/
7575
/// [`Rng`]: rand_core::Rng
76+
/// [`RngExt`]: crate::RngExt
7677
/// [`rand::make_rng()`]: crate::make_rng
7778
#[derive(Clone, Debug, PartialEq, Eq)]
7879
pub struct SmallRng(Rng);

‎src/rngs/std.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use chacha20::ChaCha12Rng as Rng;
5555
///
5656
/// ## Generation
5757
///
58-
/// The generators implements [`Rng`] and thus also [`Rng`][crate::Rng].
58+
/// The generator implements [`Rng`] and thus also [`RngExt`].
5959
/// See also the [Random Values] chapter in the book.
6060
///
6161
/// [portable]: https://rust-random.github.io/book/crate-reprod.html
@@ -66,6 +66,7 @@ use chacha20::ChaCha12Rng as Rng;
6666
/// [chacha20]: https://crates.io/crates/chacha20
6767
/// [rand issue]: https://github.com/rust-random/rand/issues/932
6868
/// [`Rng`]: rand_core::Rng
69+
/// [`RngExt`]: crate::RngExt
6970
/// [`rand::make_rng()`]: crate::make_rng
7071
/// [`rand::rng()`]: crate::rng
7172
#[derive(Debug, PartialEq, Eq)]

0 commit comments

Comments
 (0)