Skip to content

Commit 580f3a0

Browse files
committed
Merge branch 'lazy' into testing
2 parents ce28b30 + 59787e3 commit 580f3a0

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.57"
1+
msrv = "1.60"

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
matrix:
4646
os: [ubuntu-22.04, windows-2022]
47-
toolchain: [nightly, beta, stable, 1.57]
47+
toolchain: [nightly, beta, stable, 1.60]
4848
# Only Test macOS on stable to reduce macOS CI jobs
4949
include:
5050
# x86_64-apple-darwin.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "getrandom"
33
version = "0.2.15" # Also update html_root_url in lib.rs when bumping this
44
edition = "2021"
5-
rust-version = "1.57" # Sync .clippy.toml, tests.yml, and README.md.
5+
rust-version = "1.60" # Sync .clippy.toml, tests.yml, and README.md.
66
authors = ["The Rand Project Developers"]
77
license = "MIT OR Apache-2.0"
88
description = "A small cross-platform library for retrieving random data from system source"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ crate features, WASM support and Custom RNGs see the
5252

5353
## Minimum Supported Rust Version
5454

55-
This crate requires Rust 1.57.0 or later.
55+
This crate requires Rust 1.60.0 or later.
5656

5757
## Platform Support
5858

src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ use crate::util::{slice_as_uninit_mut, slice_assume_init_mut};
216216
use core::mem::MaybeUninit;
217217

218218
mod error;
219+
// Conditionally import lazy, as not all targets support atomics.
220+
#[cfg(target_has_atomic = "ptr")]
221+
mod lazy;
219222
mod util;
220223
// To prevent a breaking change when targets are added, we always export the
221224
// register_custom_getrandom macro, so old Custom RNG crates continue to build.
@@ -298,7 +301,6 @@ cfg_if! {
298301
))] {
299302
mod util_libc;
300303
mod use_file;
301-
mod lazy;
302304
mod linux_android;
303305
#[path = "linux_android_with_fallback.rs"] mod imp;
304306
} else if #[cfg(any(target_os = "android", target_os = "linux"))] {
@@ -309,7 +311,6 @@ cfg_if! {
309311
#[path = "solaris.rs"] mod imp;
310312
} else if #[cfg(target_os = "netbsd")] {
311313
mod util_libc;
312-
mod lazy;
313314
#[path = "netbsd.rs"] mod imp;
314315
} else if #[cfg(target_os = "fuchsia")] {
315316
#[path = "fuchsia.rs"] mod imp;
@@ -331,11 +332,9 @@ cfg_if! {
331332
} else if #[cfg(windows)] {
332333
#[path = "windows.rs"] mod imp;
333334
} else if #[cfg(all(target_arch = "x86_64", target_env = "sgx"))] {
334-
mod lazy;
335335
#[path = "rdrand.rs"] mod imp;
336336
} else if #[cfg(all(feature = "rdrand",
337337
any(target_arch = "x86_64", target_arch = "x86")))] {
338-
mod lazy;
339338
#[path = "rdrand.rs"] mod imp;
340339
} else if #[cfg(all(feature = "js",
341340
any(target_arch = "wasm32", target_arch = "wasm64"),

0 commit comments

Comments
 (0)