diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-08-12 20:39:10 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-12 20:39:10 +0530 |
| commit | 51eed00ca90ac8eb46d24c60de6b3e96aac096db (patch) | |
| tree | d306eb844e5d3d87520ac104fb0fe6a08f4bd0b4 /library/core/src/alloc | |
| parent | a8c799a6a042392f293614da160e67700a363263 (diff) | |
| parent | d52ed8234e8a9b8f3b988b63dae44e82827fcbda (diff) | |
| download | rust-51eed00ca90ac8eb46d24c60de6b3e96aac096db.tar.gz rust-51eed00ca90ac8eb46d24c60de6b3e96aac096db.zip | |
Rollup merge of #100030 - WaffleLapkin:nice_pointer_sis, r=scottmcm
cleanup code w/ pointers in std a little Use pointer methods (`byte_add`, `null_mut`, etc) to make code in std a little nicer.
Diffstat (limited to 'library/core/src/alloc')
| -rw-r--r-- | library/core/src/alloc/global.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/alloc/global.rs b/library/core/src/alloc/global.rs index 887246c6001..6756eecd0e0 100644 --- a/library/core/src/alloc/global.rs +++ b/library/core/src/alloc/global.rs @@ -74,7 +74,7 @@ use crate::ptr; /// { /// return null_mut(); /// }; -/// (self.arena.get() as *mut u8).add(allocated) +/// self.arena.get().cast::<u8>().add(allocated) /// } /// unsafe fn dealloc(&self, _ptr: *mut u8, _layout: Layout) {} /// } |
