about summary refs log tree commit diff
path: root/src/libcore/ptr/mut_ptr.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-1137/+0
2020-07-23Rollup merge of #74141 - euclio:typos, r=steveklabnikManish Goregaokar-3/+3
libstd/libcore: fix various typos
2020-07-20Apply #66379 to `*mut T` `as_ref`aticu-7/+12
2020-07-16apply bootstrap cfgsMark Rousskov-2/+0
2020-07-12assign tracking issueRalf Jung-3/+3
2020-07-09libstd/libcore: fix various typosAndy Russell-3/+3
2020-07-05add (unchecked) indexing methods to raw pointers and NonNullRalf Jung-5/+33
2020-07-05call the mut version as_mut_ptr and also add an as_ptr-like method to ↵Ralf Jung-2/+2
NonNull slices
2020-07-05add as_ptr method to raw slicesRalf Jung-0/+21
2020-06-30Deny unsafe ops in unsafe fns, part 6LeSeulArtichaut-20/+44
And final part!!!
2020-06-23Fix ptr doc warnings.Eric Huss-2/+0
2020-06-23Rollup merge of #73398 - oli-obk:const_raw_ptr_cmp, r=varkor,RalfJung,nagisaManish Goregaokar-0/+66
A way forward for pointer equality in const eval r? @varkor on the first commit and @RalfJung on the second commit cc #53020
2020-06-21deprecate wrapping_offset_fromRalf Jung-0/+7
2020-06-20Address review commentsOliver Scherer-2/+2
2020-06-19Add fuzzy pointer comparison intrinsicsOliver Scherer-0/+66
2020-05-25core: Make pointer offset methods "const fn"Joe Richey-6/+12
Signed-off-by: Joe Richey <joerichey@google.com>
2020-05-17make many ptr functions must_useSteve Klabnik-0/+6
https://djugei.github.io/bad-at-unsafe/ describes an error a user had when trying to use offset: > At first I just assumed that the .add() and .offset() methods on pointers would mutate the pointer. They do not. Instead they return a new pointer, which gets dropped silently if you don't use it. Unlike for example Result, which is must_use annotated.
2020-05-01Document unsafety for `*const T` and `*mut T`LeSeulArtichaut-2/+4
2020-04-25Bump bootstrap compilerMark Rousskov-1/+0
2020-04-14ptr: add tracking issue for len() method on raw slicesMatthias Schiffer-2/+2
2020-04-14ptr: introduce len() method on raw slicesMatthias Schiffer-1/+25
It is already possible to extract the pointer part of a raw slice by a simple cast, but retrieving the length is not possible without relying on the representation of the raw slice when it is not valid to convert the raw slice into a slice reference (i.e. the pointer is null or unaligned). Introduce a len() method on raw slices to add this missing feature.
2020-04-14ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang itemsMatthias Schiffer-0/+4
2020-04-03Replace max/min_value() with MAX/MIN assoc constsLinus Färnstrand-2/+2
2020-03-06fix various typosMatthias Krüger-5/+5
2020-01-09doc: add Null-unchecked version section to mut pointer as_mut methodTrevor Spiteri-0/+14
The as_ref method already has a Null-unchecked version section, its example is a modification of the example in the main as_ref section. Similarly the example in this commit is a modification of the example in main as_mut section.
2019-12-22Format the worldMark Rousskov-51/+61
2019-12-19Split up ptr/mod.rs in libcore, one with implementation detail for const ptr ↵Christoph Schmidler-0/+925
and the other with mut ptr