Skip to content

Commit e42c385

Browse files
authored
MSRV=1.60, use more permissive cfg on test
* 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
1 parent 0c28eba commit e42c385

File tree

13 files changed

+14
-18
lines changed

13 files changed

+14
-18
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- os: ubuntu-latest
4848
target: x86_64-unknown-linux-gnu
4949
variant: MSRV
50-
toolchain: 1.56.0
50+
toolchain: 1.60.0
5151
- os: ubuntu-latest
5252
deps: sudo apt-get update ; sudo apt install gcc-multilib
5353
target: i686-unknown-linux-gnu

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keywords = ["random", "rng"]
1414
categories = ["algorithms", "no-std"]
1515
autobenches = true
1616
edition = "2021"
17-
rust-version = "1.56"
17+
rust-version = "1.60"
1818
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
1919

2020
[package.metadata.docs.rs]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
66
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand)
77
[![API](https://docs.rs/rand/badge.svg)](https://docs.rs/rand)
8-
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
8+
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
99

1010
A Rust library for random number generation, featuring:
1111

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

9898
### Rust version requirements
9999

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

103103
## Crate Features

rand_chacha/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ChaCha random number generator
1313
keywords = ["random", "rng", "chacha"]
1414
categories = ["algorithms", "no-std"]
1515
edition = "2021"
16-
rust-version = "1.56"
16+
rust-version = "1.60"
1717

1818
[package.metadata.docs.rs]
1919
rustdoc-args = ["--generate-link-to-definition"]

rand_chacha/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
66
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_chacha)
77
[![API](https://docs.rs/rand_chacha/badge.svg)](https://docs.rs/rand_chacha)
8-
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
8+
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
99

1010
A cryptographically secure random number generator that uses the ChaCha
1111
algorithm.

rand_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Core random number generator traits and tools for implementation.
1313
keywords = ["random", "rng"]
1414
categories = ["algorithms", "no-std"]
1515
edition = "2021"
16-
rust-version = "1.56"
16+
rust-version = "1.60"
1717

1818
[package.metadata.docs.rs]
1919
# To build locally:

rand_core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
66
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_core)
77
[![API](https://docs.rs/rand_core/badge.svg)](https://docs.rs/rand_core)
8-
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
8+
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
99

1010
Core traits and error types of the [rand] library, plus tools for implementing
1111
RNGs.

rand_distr/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Sampling from random number distributions
1313
keywords = ["random", "rng", "distribution", "probability"]
1414
categories = ["algorithms", "no-std"]
1515
edition = "2021"
16-
rust-version = "1.56"
16+
rust-version = "1.60"
1717
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
1818

1919
[package.metadata.docs.rs]

rand_distr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
66
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_distr)
77
[![API](https://docs.rs/rand_distr/badge.svg)](https://docs.rs/rand_distr)
8-
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
8+
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
99

1010
Implements a full suite of random number distribution sampling routines.
1111

rand_distr/benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["The Rand Project Developers"]
55
license = "MIT OR Apache-2.0"
66
description = "Criterion benchmarks of the rand_distr crate"
77
edition = "2021"
8-
rust-version = "1.56"
8+
rust-version = "1.60"
99
publish = false
1010

1111
[workspace]

rand_pcg/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Selected PCG random number generators
1313
keywords = ["random", "rng", "pcg"]
1414
categories = ["algorithms", "no-std"]
1515
edition = "2021"
16-
rust-version = "1.56"
16+
rust-version = "1.60"
1717

1818
[package.metadata.docs.rs]
1919
rustdoc-args = ["--generate-link-to-definition"]

rand_pcg/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
66
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand/rand_pcg)
77
[![API](https://docs.rs/rand_pcg/badge.svg)](https://docs.rs/rand_pcg)
8-
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.56+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
8+
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.60+-lightgray.svg)](https://github.com/rust-random/rand#rust-version-requirements)
99

1010
Implements a selection of PCG random number generators.
1111

src/distributions/uniform.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,11 +1536,7 @@ mod tests {
15361536
}
15371537

15381538
#[test]
1539-
#[cfg(all(
1540-
feature = "std",
1541-
not(target_arch = "wasm32"),
1542-
not(target_arch = "asmjs")
1543-
))]
1539+
#[cfg(all(feature = "std", panic = "unwind"))]
15441540
fn test_float_assertions() {
15451541
use super::SampleUniform;
15461542
use std::panic::catch_unwind;

0 commit comments

Comments
 (0)