Skip to content

Commit

Permalink
util: Update docs and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Nov 22, 2024
1 parent d8e6bbf commit 8b642b9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 3 additions & 1 deletion portable-atomic-util/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com

## [Unreleased]

- Add `portable_atomic_unstable_coerce_unsized` cfg option (requires Rust nightly)
- Add unstable `portable_atomic_unstable_coerce_unsized` cfg (requires Rust nightly). ([#195](https://github.com/taiki-e/portable-atomic/pull/195), thanks @brodycj)

- Respect [`RUSTC_BOOTSTRAP=-1` recently added in nightly](https://github.com/rust-lang/rust/pull/132993) in rustc version detection. ([5b2847a](https://github.com/taiki-e/portable-atomic/commit/5b2847a8b99aa2a57a6c80f5a47327b2764f08cc))

## [0.2.3] - 2024-10-17

Expand Down
11 changes: 7 additions & 4 deletions portable-atomic-util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ Or set environment variable:
RUSTFLAGS="--cfg portable_atomic_unstable_coerce_unsized" cargo ...
```

- <a name="portable-atomic-unstable-coerce-unsized"></a>**`--cfg portable_atomic_unstable_coerce_unsized`**<br> support standard coercing of `Arc<T>` to `Arc<U>`
- <a name="optional-cfg-unstable-coerce-unsized"></a>**`--cfg portable_atomic_unstable_coerce_unsized`**<br>
Support coercing of `Arc<T>` to `Arc<U>` as in `std::sync::Arc`.

<!-- TODO: add standard coercing of `Weak<T>` to `Weak<U>` as well, with testing & documentation updates -->
<!-- TODO: add coercing of `Weak<T>` to `Weak<U>` as well, with testing & documentation updates -->

This coercing requires Rust nightly to compile (with help from [unstable `CoerceUnsized` trait](https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html)).
This cfg requires Rust nightly because this coercing requires [unstable `CoerceUnsized` trait](https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html).

See [this issue comment](https://github.com/taiki-e/portable-atomic/issues/143#issuecomment-1866488569) for another known workaround.
See [this issue comment](https://github.com/taiki-e/portable-atomic/issues/143#issuecomment-1866488569) for another known workaround.

**Note:** This cfg is unstable and outside of the normal semver guarantees and minor or patch versions of portable-atomic-util may make breaking changes to them at any time.

<!-- tidy:crate-doc:end -->

Expand Down
11 changes: 7 additions & 4 deletions portable-atomic-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ Or set environment variable:
RUSTFLAGS="--cfg portable_atomic_unstable_coerce_unsized" cargo ...
```
- <a name="portable-atomic-unstable-coerce-unsized"></a>**`--cfg portable_atomic_unstable_coerce_unsized`**<br> support standard coercing of `Arc<T>` to `Arc<U>`
- <a name="optional-cfg-unstable-coerce-unsized"></a>**`--cfg portable_atomic_unstable_coerce_unsized`**<br>
Support coercing of `Arc<T>` to `Arc<U>` as in `std::sync::Arc`.
<!-- TODO: add standard coercing of `Weak<T>` to `Weak<U>` as well, with testing & documentation updates -->
<!-- TODO: add coercing of `Weak<T>` to `Weak<U>` as well, with testing & documentation updates -->
This coercing requires Rust nightly to compile (with help from [unstable `CoerceUnsized` trait](https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html)).
This cfg requires Rust nightly because this coercing requires [unstable `CoerceUnsized` trait](https://doc.rust-lang.org/nightly/core/ops/trait.CoerceUnsized.html).
See [this issue comment](https://github.com/taiki-e/portable-atomic/issues/143#issuecomment-1866488569) for another known workaround.
See [this issue comment](https://github.com/taiki-e/portable-atomic/issues/143#issuecomment-1866488569) for another known workaround.
**Note:** This cfg is unstable and outside of the normal semver guarantees and minor or patch versions of portable-atomic-util may make breaking changes to them at any time.
<!-- tidy:crate-doc:end -->
*/
Expand Down

0 comments on commit 8b642b9

Please sign in to comment.