Skip to content

Commit 58e27b9

Browse files
authored
Use into_raw_with_allocator (#1060)
Fix issue introduced by rust-lang/rust#141219 - [x] Changelog updated
2 parents 14106f7 + f8f8d31 commit 58e27b9

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Added `interruptable`, a function that allows the currently running interrupt to be interrupted.
1313

14+
### Fixed
15+
16+
- Fixed an issue which was causing compilation failures on rust nightly from 2025-07-04.
17+
1418
## [0.22.2] - 2025/06/24
1519

1620
### Added

agb/src/refcount.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ impl<T, A: Allocator> RefCount<T, A> {
2222

2323
pub fn new_in(value: T, a: A) -> Self {
2424
let v = unsafe {
25-
NonNull::new_unchecked(Box::into_raw(Box::new_in(
26-
RefCountInner {
27-
inner: value,
28-
count: Cell::new(1),
29-
},
30-
&a,
31-
)))
25+
NonNull::new_unchecked(
26+
Box::into_raw_with_allocator(Box::new_in(
27+
RefCountInner {
28+
inner: value,
29+
count: Cell::new(1),
30+
},
31+
&a,
32+
))
33+
.0,
34+
)
3235
};
3336
Self(v, a)
3437
}

0 commit comments

Comments
 (0)