Skip to content

Commit 1f5548f

Browse files
authored
Merge pull request #90 from sermuns/dangling
fix(alloc_ref): use renamed `dangling`
2 parents b5caf32 + 86df025 commit 1f5548f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
MIRIFLAGS: "-Zmiri-disable-isolation -Zmiri-strict-provenance"
139139
steps:
140140
- uses: actions/checkout@v1
141-
- run: rustup toolchain install nightly --profile minimal --component rust-src miri
141+
- run: rustup toolchain install nightly --profile minimal --component rust-src --component miri
142142
- run: cargo +nightly miri test --all-features
143143

144144
check_formatting:

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl Heap {
267267
unsafe impl Allocator for LockedHeap {
268268
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
269269
if layout.size() == 0 {
270-
return Ok(NonNull::slice_from_raw_parts(layout.dangling(), 0));
270+
return Ok(NonNull::slice_from_raw_parts(layout.dangling_ptr(), 0));
271271
}
272272
match self.0.lock().allocate_first_fit(layout) {
273273
Ok(ptr) => Ok(NonNull::slice_from_raw_parts(ptr, layout.size())),

0 commit comments

Comments
 (0)