Skip to content
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ A [separate changelog is kept for rand_core](https://github.com/rust-random/core

You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful.

## [Unreleased]
- Document panic behavior of `make_rng` and add `#[track_caller]` (#1761)

## [0.10.0] - 2026-02-08

### Changes
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ use crate::distr::{Distribution, StandardUniform};
/// # let _ = rand::Rng::next_u32(&mut rng);
/// ```
///
/// # Panics
///
/// If [`SysRng`] fails to obtain entropy from the OS. This is unlikely
/// outside of early boot or unusual system conditions.
///
/// # Security
///
/// Refer to [`ThreadRng#Security`].
Expand All @@ -110,6 +115,7 @@ use crate::distr::{Distribution, StandardUniform};
/// [`ThreadRng`]: crate::rngs::ThreadRng
/// [`ThreadRng#Security`]: crate::rngs::ThreadRng#security
#[cfg(feature = "sys_rng")]
#[track_caller]
pub fn make_rng<R: SeedableRng>() -> R {
#[cfg(feature = "thread_rng")]
{
Expand Down