summary refs log tree commit diff
path: root/src/libcore/ptr
AgeCommit message (Collapse)AuthorLines
2019-11-02Auto merge of #63810 - oli-obk:const_offset_from, r=RalfJung,nikicbors-1/+17
Make <*const/mut T>::offset_from `const fn` This reenables offset_of cc @mjbshaw after https://github.com/rust-lang/rust/pull/63075 broke it
2019-10-11Make <*const/mut T>::offset_from `const fn`Oliver Scherer-1/+17
2019-10-02Inline `ptr::null(_mut)` even in debug buildsLzu Tao-2/+2
2019-10-01Remove unneeded `fn main` blocks from docsLzu Tao-25/+23
2019-09-06A few cosmetic improvements to code & comments in liballoc and libcoreAlexander Regueiro-3/+3
2019-08-17Doc nitSimon Sapin-1/+1
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-17Doc nitsSimon Sapin-1/+1
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-16Add new_uninit and assume_init on Box, Rc, and ArcSimon Sapin-0/+8
2019-08-12Rollup merge of #63297 - RalfJung:ptr_offset, r=dtolnayMazdak Farrokhzad-34/+128
Improve pointer offset method docs Cc @rkruppe @gnzlbg
2019-08-05improve wrapping_ docsRalf Jung-26/+112
2019-08-05note about stack-allocated variables being allocated objectsRalf Jung-8/+16
2019-08-05improve align_offset docsRalf Jung-4/+8
2019-08-02Fix typos in doc comments.Bruce Mitchener-2/+2
2019-07-30Rollup merge of #61965 - phil-opp:patch-4, r=scottmcmMazdak Farrokhzad-2/+2
Remove mentions of removed `offset_to` method from `align_offset` docs The `offset_to` method was deleted in https://github.com/rust-lang/rust/pull/52814. The replacement for the removed method is `wrapping_offset_from`. However, neither method takes an `usize` as argument, so I don't think that it makes sense to mention them.
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-1/+1
2019-07-22Rollup merge of #62788 - ↵Mazdak Farrokhzad-2/+2
fakenine:normalize_use_of_backticks_compiler_messages_p9, r=Centril normalize use of backticks in compiler messages for libcore/ptr https://github.com/rust-lang/rust/issues/60532
2019-07-18normalize use of backticks in compiler messages for libcore/ptrSamy Kacimi-2/+2
https://github.com/rust-lang/rust/issues/60532
2019-07-17Refer to `add` method instead of `offset`Philipp Oppermann-2/+2
The `align_offset` method returns an `usize`, so using `add` makes more sense than using `offset`, which takes an `isize`.
2019-07-16Stabilize <*mut _>::cast and <*const _>::castSimon Sapin-2/+2
FCP: https://github.com/rust-lang/rust/issues/60602#issuecomment-511146402
2019-07-09doc(ptr): add example for {read,write}_unalignedFreyskeyd-0/+32
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2019-07-05Rollup merge of #62323 - Centril:clarify-read-unaligned, r=RalfJungMazdak Farrokhzad-35/+53
Clarify unaligned fields in ptr::{read,write}_unaligned r? @RalfJung
2019-07-04Switch master to 1.38Mark Rousskov-1/+1
2019-07-04ptr::{read,write}_unaligned: use no_run and reword slightly.Mazdak Farrokhzad-4/+4
2019-07-04Clarify unaligned fields in ptr::read_unaligned.Mazdak Farrokhzad-35/+53
2019-07-03remove bogus example from drop_in_placeRalf Jung-27/+5
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-6/+6
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-06-19Remove mentions of removed `offset_to` methodPhilipp Oppermann-2/+2
2019-06-19Add functions to build raw slicesOliver Scherer-0/+47
2019-06-14note some safety concerns of raw-ptr-to-ref castsRalf Jung-3/+35
2019-06-05Utilize cfg(bootstrap) over cfg(stage0)Mark Rousskov-1/+1
Also removes stage1, stage2 cfgs being passed to rustc to ensure that stage1 and stage2 are only differentiated as a group (i.e., only through not bootstrap).
2019-05-25split core::ptr module into multiple filesRalf Jung-0/+3152