Skip to content

Commit 2390ab7

Browse files
authored
Merge pull request #217 from japaric/deprecate-freeze-v0.7.3
Deprecate `Box::freeze`, prepare v0.7.3
2 parents 1d502c0 + 01f16f1 commit 2390ab7

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.7.3] - 2021-07-1
11+
12+
### Changed
13+
14+
- `Box::freeze` is deprecated due to possibility of undefined behavior.
15+
1016
## [v0.7.2] - 2021-06-30
1117

1218
### Added
@@ -365,7 +371,8 @@ architecture.
365371

366372
- Initial release
367373

368-
[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.2...HEAD
374+
[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.3...HEAD
375+
[v0.7.3]: https://github.com/japaric/heapless/compare/v0.7.2...v0.7.3
369376
[v0.7.2]: https://github.com/japaric/heapless/compare/v0.7.1...v0.7.2
370377
[v0.7.1]: https://github.com/japaric/heapless/compare/v0.7.0...v0.7.1
371378
[v0.7.0]: https://github.com/japaric/heapless/compare/v0.6.1...v0.7.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords = ["static", "no-heap"]
1212
license = "MIT OR Apache-2.0"
1313
name = "heapless"
1414
repository = "https://github.com/japaric/heapless"
15-
version = "0.7.2"
15+
version = "0.7.3"
1616

1717
[features]
1818
default = ["cas"]

src/pool/singleton.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ where
123123
P: Pool,
124124
P::Data: AsRef<[u8]>,
125125
{
126-
/// Freezes the contents of this memory block
126+
#[deprecated(
127+
since = "0.7.3",
128+
note = "This can access uninitialized memory, use `init(..)` instead (https://github.com/japaric/heapless/issues/212)"
129+
)]
130+
/// (DO NOT USE, SEE DEPRECATION) Freezes the contents of this memory block
127131
///
128132
/// See [rust-lang/rust#58363](https://github.com/rust-lang/rust/pull/58363) for details.
129133
pub fn freeze(self) -> Box<P, Init> {

src/spsc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Fixed capacity Single Producer Single Consumer (SPSC) queue
22
//!
3-
//! Implementation based on https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular
3+
//! Implementation based on <https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular>
44
//!
55
//! NOTE: This module is not available on targets that do *not* support atomic loads, e.g. RISC-V
66
//! cores w/o the A (Atomic) extension

0 commit comments

Comments
 (0)