Skip to content

Commit 5c9369f

Browse files
committed
Revert "Revert rust-version increasing rewrite"
This reverts commit 6cd1017.
1 parent 0681b97 commit 5c9369f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

static-alloc/src/unsync/bump.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,7 @@ impl MemBump {
251251
/// This is how many *bytes* can be allocated
252252
/// within this node.
253253
pub const fn capacity(&self) -> usize {
254-
// Safety: just gets the pointer metadata `len` without invalidating any provenance,
255-
// accepting the pointer use itself. This may be replaced by a safe `pointer::len` as soon
256-
// as stable (#71146) and const which would avoid any pointer use.
257-
unsafe { (*(self.data.get() as *const [UnsafeCell<u8>])).len() }
254+
self.data.get().len()
258255
}
259256

260257
/// Get a raw pointer to the data.

0 commit comments

Comments
 (0)