Skip to content

Commit

Permalink
bump MSRV to 1.49.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Giersch committed Nov 30, 2022
1 parent 82ebf60 commit 9370e0a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# test against MSRV and next-MSRV
rust: [1.36.0, 1.49.0, stable, nightly]
# test against MSRV
rust: [1.49.0, stable, nightly]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ To use this crate, add the following to your `Cargo.toml`

```
[dependencies]
conquer-once = "0.3.3"
conquer-once = "0.4.0"
```

## Minimum Supported Rust Version (MSRV)

The minimum supported Rust version for this crate is 1.36.0.
The minimum supported Rust version for this crate is 1.49.0.

## Cargo Features

Expand Down
6 changes: 5 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@
### Release `0.3.3`

- improves and clarifies wording of public documentation
- improves internal documentation around all uses of unsafe code
- improves internal documentation around all uses of unsafe code

## Release `0.4.0`

- bumps MSRV to 1.49.0
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
#![deny(missing_docs)]
#![forbid(clippy::undocumented_unsafe_blocks)]

#[cfg(test)]
#[macro_use]
Expand Down
10 changes: 2 additions & 8 deletions src/spin.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
//! Synchronized one-time and lazy initialization primitives that use spin-locks
//! in case of concurrent accesses under contention.

// NOTE: spin_loop_hint depracated since 1.51, replacement stable since 1.49,
// but MSRV is 1.36
#[allow(deprecated)]
use core::sync::atomic::{spin_loop_hint, Ordering};
use core::{hint, sync::atomic::Ordering};

use crate::{
cell::{Block, Unblock},
Expand Down Expand Up @@ -63,10 +60,7 @@ unsafe impl Block for Spin {
fn block(state: &AtomicOnceState) {
// (spin:1) this acquire load syncs-with the acq-rel swap (guard:2)
while let WouldBlock(_) = state.load(Ordering::Acquire).expect(POISON_PANIC_MSG) {
// MSRV is currently 1.36.0 and `spin_loop_hint` was only depracated
// in 1.51.0
#[allow(deprecated)]
spin_loop_hint();
hint::spin_loop();
}
}
}
Expand Down

0 comments on commit 9370e0a

Please sign in to comment.