Skip to content

Commit 1cd19c3

Browse files
committed
Stabilized weak support
As of 1.45, it is stable (currently in beta). Removing need of nightly feature and using a different named feature.
1 parent ee8b86e commit 1cd19c3

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ script:
2727
(test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo test --release -- --ignored) &&
2828
cargo doc --no-deps &&
2929
(test "$TRAVIS_RUST_VERSION" != nightly || cargo test --all --release --benches --all-features) &&
30+
(test "$TRAVIS_RUST_VERSION" != beta || cargo test --all --release --all-features) &&
3031
(test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo clippy --all --tests -- --deny clippy::all) &&
3132
(test "$TRAVIS_RUST_VERSION" == 1.26.0 || cargo fmt --all -- --check)

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Rename the `unstable-weak` to `weak` feature. The support is now available on
2+
1.45 (currently in beta).
3+
14
# 0.4.6
25

36
* Adjust to `Weak::as_ptr` from std (the weak pointer support, relying on

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ appveyor = { repository = "vorner/arc-swap" }
1616
maintenance = { status = "actively-developed" }
1717

1818
[features]
19-
unstable-weak = []
19+
weak = []
2020

2121
[workspace]
2222
members = ["benchmarks"]

src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![deny(missing_docs, warnings)]
66
// We aim at older rust too, one without dyn
77
#![allow(unknown_lints, bare_trait_objects, renamed_and_removed_lints)]
8-
#![cfg_attr(feature = "unstable-weak", feature(weak_into_raw))]
98

109
//! Making [`Arc`][Arc] itself atomic
1110
//!
@@ -221,11 +220,9 @@
221220
//!
222221
//! # Features
223222
//!
224-
//! The `unstable-weak` feature adds the ability to use arc-swap with the [Weak] pointer too,
225-
//! through the [ArcSwapWeak] type. This requires the nightly Rust compiler. Also, the interface
226-
//! and support **is not** part of API stability guarantees and may be arbitrarily changed or
227-
//! removed in future releases (it is mostly waiting for the `weak_into_raw` nightly feature to
228-
//! stabilize before stabilizing it in this crate).
223+
//! The `weak` feature adds the ability to use arc-swap with the [Weak] pointer too,
224+
//! through the [ArcSwapWeak] type. The needed std support is stabilized in rust version 1.45 (as
225+
//! of now in beta).
229226
//!
230227
//! # Internal details
231228
//!
@@ -276,7 +273,7 @@ mod compile_fail_tests;
276273
mod debt;
277274
pub mod gen_lock;
278275
mod ref_cnt;
279-
#[cfg(feature = "unstable-weak")]
276+
#[cfg(feature = "weak")]
280277
mod weak;
281278

282279
use std::fmt::{Debug, Display, Formatter, Result as FmtResult};
@@ -1357,7 +1354,7 @@ pub type IndependentArcSwap<T> = ArcSwapAny<Arc<T>, PrivateUnsharded>;
13571354
/// [`ArcSwapAny`](struct.ArcSwapAny.html).
13581355
///
13591356
/// [Weak]: std::sync::Weak
1360-
#[cfg(feature = "unstable-weak")]
1357+
#[cfg(feature = "weak")]
13611358
pub type ArcSwapWeak<T> = ArcSwapAny<std::sync::Weak<T>>;
13621359

13631360
#[cfg(test)]

0 commit comments

Comments
 (0)