Skip to content

Commit

Permalink
MSRV=1.60, use more permissive cfg on test
Browse files Browse the repository at this point in the history
* Use cfg(panic = unwind) instead of a check for wasm32 to see if unwinding is supported

This allows the test to run on a future wasm target with exception support as
well as running the test suite with panic=abort on non-wasm targets.

* Bump MSRV to 1.60
  • Loading branch information
bjorn3 committed Oct 11, 2023
1 parent 0c28eba commit e42c385
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -47,7 +47,7 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
variant: MSRV
toolchain: 1.56.0
toolchain: 1.60.0
- os: ubuntu-latest
deps: sudo apt-get update ; sudo apt install gcc-multilib
target: i686-unknown-linux-gnu
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -14,7 +14,7 @@ keywords = ["random", "rng"]
categories = ["algorithms", "no-std"]
autobenches = true
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -5,7 +5,7 @@
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand)
[![API](https://docs.rs/rand/badge.svg)](https://docs.rs/rand)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)

A Rust library for random number generation, featuring:

Expand Down Expand Up @@ -97,7 +97,7 @@ issue tracker with the keyword `yank` *should* uncover the motivation.

### Rust version requirements

The Minimum Supported Rust Version (MSRV) is `rustc >= 1.56.0`.
The Minimum Supported Rust Version (MSRV) is `rustc >= 1.60.0`.
Older releases may work (depending on feature configuration) but are untested.

## Crate Features
Expand Down
2 changes: 1 addition & 1 deletion rand_chacha/Cargo.toml
Expand Up @@ -13,7 +13,7 @@ ChaCha random number generator
keywords = ["random", "rng", "chacha"]
categories = ["algorithms", "no-std"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]
Expand Down
2 changes: 1 addition & 1 deletion rand_chacha/README.md
Expand Up @@ -5,7 +5,7 @@
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_chacha)
[![API](https://docs.rs/rand_chacha/badge.svg)](https://docs.rs/rand_chacha)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)

A cryptographically secure random number generator that uses the ChaCha
algorithm.
Expand Down
2 changes: 1 addition & 1 deletion rand_core/Cargo.toml
Expand Up @@ -13,7 +13,7 @@ Core random number generator traits and tools for implementation.
keywords = ["random", "rng"]
categories = ["algorithms", "no-std"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"

[package.metadata.docs.rs]
# To build locally:
Expand Down
2 changes: 1 addition & 1 deletion rand_core/README.md
Expand Up @@ -5,7 +5,7 @@
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_core)
[![API](https://docs.rs/rand_core/badge.svg)](https://docs.rs/rand_core)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)

Core traits and error types of the [rand] library, plus tools for implementing
RNGs.
Expand Down
2 changes: 1 addition & 1 deletion rand_distr/Cargo.toml
Expand Up @@ -13,7 +13,7 @@ Sampling from random number distributions
keywords = ["random", "rng", "distribution", "probability"]
categories = ["algorithms", "no-std"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion rand_distr/README.md
Expand Up @@ -5,7 +5,7 @@
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_distr)
[![API](https://docs.rs/rand_distr/badge.svg)](https://docs.rs/rand_distr)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)

Implements a full suite of random number distribution sampling routines.

Expand Down
2 changes: 1 addition & 1 deletion rand_distr/benches/Cargo.toml
Expand Up @@ -5,7 +5,7 @@ authors = ["The Rand Project Developers"]
license = "MIT OR Apache-2.0"
description = "Criterion benchmarks of the rand_distr crate"
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"
publish = false

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion rand_pcg/Cargo.toml
Expand Up @@ -13,7 +13,7 @@ Selected PCG random number generators
keywords = ["random", "rng", "pcg"]
categories = ["algorithms", "no-std"]
edition = "2021"
rust-version = "1.56"
rust-version = "1.60"

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]
Expand Down
2 changes: 1 addition & 1 deletion rand_pcg/README.md
Expand Up @@ -5,7 +5,7 @@
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_pcg)
[![API](https://docs.rs/rand_pcg/badge.svg)](https://docs.rs/rand_pcg)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)

Implements a selection of PCG random number generators.

Expand Down
6 changes: 1 addition & 5 deletions src/distributions/uniform.rs
Expand Up @@ -1536,11 +1536,7 @@ mod tests {
}

#[test]
#[cfg(all(
feature = "std",
not(target_arch = "wasm32"),
not(target_arch = "asmjs")
))]
#[cfg(all(feature = "std", panic = "unwind"))]
fn test_float_assertions() {
use super::SampleUniform;
use std::panic::catch_unwind;
Expand Down

0 comments on commit e42c385

Please sign in to comment.