Deprecate Box::freeze, prepare v0.7.3

This commit is contained in:
Emil Fresk 2021-07-01 10:01:53 +02:00
parent 1d502c09a8
commit 01f16f1716
4 changed files with 15 additions and 4 deletions

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [v0.7.3] - 2021-07-1
### Changed
- `Box::freeze` is deprecated due to possibility of undefined behavior.
## [v0.7.2] - 2021-06-30
### Added
@ -365,7 +371,8 @@ architecture.
- Initial release
[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.2...HEAD
[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.3...HEAD
[v0.7.3]: https://github.com/japaric/heapless/compare/v0.7.2...v0.7.3
[v0.7.2]: https://github.com/japaric/heapless/compare/v0.7.1...v0.7.2
[v0.7.1]: https://github.com/japaric/heapless/compare/v0.7.0...v0.7.1
[v0.7.0]: https://github.com/japaric/heapless/compare/v0.6.1...v0.7.0

View File

@ -12,7 +12,7 @@ keywords = ["static", "no-heap"]
license = "MIT OR Apache-2.0"
name = "heapless"
repository = "https://github.com/japaric/heapless"
version = "0.7.2"
version = "0.7.3"
[features]
default = ["cas"]

View File

@ -123,7 +123,11 @@ where
P: Pool,
P::Data: AsRef<[u8]>,
{
/// Freezes the contents of this memory block
#[deprecated(
since = "0.7.3",
note = "This can access uninitialized memory, use `init(..)` instead (https://github.com/japaric/heapless/issues/212)"
)]
/// (DO NOT USE, SEE DEPRECATION) Freezes the contents of this memory block
///
/// See [rust-lang/rust#58363](https://github.com/rust-lang/rust/pull/58363) for details.
pub fn freeze(self) -> Box<P, Init> {

View File

@ -1,6 +1,6 @@
//! Fixed capacity Single Producer Single Consumer (SPSC) queue
//!
//! Implementation based on https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular
//! Implementation based on <https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular>
//!
//! NOTE: This module is not available on targets that do *not* support atomic loads, e.g. RISC-V
//! cores w/o the A (Atomic) extension