rand breaking changes
Updated December 4, 2026
On this page
Latest version 0.10.4, released November 15, 2026. Source repository
Its 0.8.0 release requires Rust 1.36 or later. Rust end of life dates.
rand 0.10.4 breaking changes
- Signature changed
rand::prelude::StdRng
Was struct StdRng(Rng); now struct StdRng(ChaCha12Rng). crates.io - Signature changed
rand::rngs::StdRng
Was struct StdRng(Rng); now struct StdRng(ChaCha12Rng). crates.io
rand 0.10.0 breaking changes
- Removed
Builds that enable the nightly feature will fail. github.com - Removed
Builds that enable the small_rng feature will fail. github.com - Removed
rand::Fill::fill
rand::Fill::fill was removed in rand 0.10.0 crates.io - Removed
rand::prelude::RngCore
rand::prelude::RngCore was removed in rand 0.10.0 crates.io - Removed
rand::RngCore
rand::RngCore was removed in rand 0.10.0 crates.io - Removed
rand::rngs::mock
rand::rngs::mock was removed in rand 0.10.0 crates.io - Removed
rand::rngs::OsRng
Use SysRng in place of OsRng. crates.io - Removed
rand::rngs::ReseedingRng
Code that clones ReseedingRng will no longer compile. crates.io - Removed
rand::thread_rng
Use rng instead. crates.io - Removed
rand::TryRngCore
rand::TryRngCore was removed in rand 0.10.0 crates.io
And 32 more in this version. Sign up to see every change
rand 0.9.2 breaking changes
- Signature changed
rand::prelude::IndexedRandom::choose_multiple
Was fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<Self, Self::Output> where Self::Output: Sized, R: Rng + ?Sized,; now fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<'_, Self... crates.io - Signature changed
rand::prelude::IndexedRandom::choose_multiple_weighted
Was fn choose_multiple_weighted<R, F, X>(&self, rng: &mut R, amount: usize, weight: F) -> Result<SliceChooseIter<Self, Self::Output>, WeightError> where Self::Output: Sized, R: Rng + ?Sized, F: Fn(&Self::Output) -> X, X: Into<f64>,; now fn... crates.io - Signature changed
rand::seq::IndexedRandom::choose_multiple
Was fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<Self, Self::Output> where Self::Output: Sized, R: Rng + ?Sized,; now fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<'_, Self... crates.io - Signature changed
rand::seq::IndexedRandom::choose_multiple_weighted
Was fn choose_multiple_weighted<R, F, X>(&self, rng: &mut R, amount: usize, weight: F) -> Result<SliceChooseIter<Self, Self::Output>, WeightError> where Self::Output: Sized, R: Rng + ?Sized, F: Fn(&Self::Output) -> X, X: Into<f64>,; now fn... crates.io
rand 0.9.1 breaking changes
- Behavior changed
IndexedRandom.choose_multiple_weighted
choose_multiple_weighted can return fewer than amount results again, reverting an undocumented change from 0.9.0. Code that expects exactly amount results must handle a shorter result. github.com - Behavior changed
rand.seq.index.sample_weighted
sample_weighted can return fewer than amount results again, reverting an undocumented change from 0.9.0. Code that expects exactly amount results must handle a shorter result. github.com
rand 0.9.0 breaking changes
- Removed
isize
StandardUniform, Uniform, Fill and WeightedAliasIndex no longer support isize and usize, except via UniformUsize. github.com - Removed
rand_chacha
The implicit rand_chacha feature is removed; use std_rng instead. github.com - Removed
rand::distributions
The rand::distributions module was renamed to rand::distr. crates.io - Removed
rand::Error
rand::Error was removed in rand 0.9.0 crates.io - Removed
rand::Fill::try_fill
rand::Fill::try_fill was removed in rand 0.9.0 crates.io - Removed
rand::prelude::random
rand::prelude::random was removed in rand 0.9.0 crates.io - Removed
rand::prelude::Rng::gen
rand::prelude::Rng::gen was removed in rand 0.9.0 crates.io - Removed
rand::prelude::Rng::try_fill
rand::prelude::Rng::try_fill was removed in rand 0.9.0 crates.io - Removed
rand::prelude::SliceRandom::choose
rand::prelude::SliceRandom::choose was removed in rand 0.9.0 crates.io - Removed
rand::prelude::SliceRandom::choose_multiple
rand::prelude::SliceRandom::choose_multiple was removed in rand 0.9.0 crates.io
And 82 more in this version. Sign up to see every change
rand 0.8.6 breaking changes
- Removed
simd_support
The experimental simd_support cargo feature is removed. Code or Cargo.toml entries that enable it must stop using it. github.com - Signature changed
rand::prelude::SliceRandom::choose_multiple
Was fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<Self, Self::Item> where R: Rng + ?Sized; now fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<'_, Self, Self::Item> where R: Rng +... crates.io - Signature changed
rand::prelude::SliceRandom::choose_multiple_weighted
Was fn choose_multiple_weighted<R, F, X>(&self, rng: &mut R, amount: usize, weight: F) -> Result<SliceChooseIter<Self, Self::Item>, WeightedError> where R: Rng + ?Sized, F: Fn(&Self::Item) -> X, X: Into<f64>; now fn... crates.io - Signature changed
rand::seq::SliceRandom::choose_multiple
Was fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<Self, Self::Item> where R: Rng + ?Sized; now fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<'_, Self, Self::Item> where R: Rng +... crates.io - Signature changed
rand::seq::SliceRandom::choose_multiple_weighted
Was fn choose_multiple_weighted<R, F, X>(&self, rng: &mut R, amount: usize, weight: F) -> Result<SliceChooseIter<Self, Self::Item>, WeightedError> where R: Rng + ?Sized, F: Fn(&Self::Item) -> X, X: Into<f64>; now fn... crates.io
Older versions
2 older versions, each with its first changes. Sign up to see every change
Show 2 older versions
rand 0.8.5 breaking changes
- Behavior changed
StdRng
StdRng now uses ChaCha12 on emscripten instead of HC128, so random sequences produced on that platform change. github.com
rand 0.8.0 breaking changes
- Removed
gen_range
Call gen_range(a..b) or gen_range(a..=b) instead; a and b can no longer be references or SIMD types. github.com - Removed
rand::AsByteSliceMut
Use Fill instead of AsByteSliceMut. crates.io
And 46 more in this version.
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.