about summary refs log tree commit diff
path: root/src/libcore/ptr/non_null.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-353/+0
2020-07-23Rollup merge of #74141 - euclio:typos, r=steveklabnikManish Goregaokar-1/+1
libstd/libcore: fix various typos
2020-07-12assign tracking issueRalf Jung-3/+3
2020-07-09libstd/libcore: fix various typosAndy Russell-1/+1
2020-07-05add (unchecked) indexing methods to raw pointers and NonNullRalf Jung-5/+36
2020-07-05call the mut version as_mut_ptr and also add an as_ptr-like method to ↵Ralf Jung-0/+20
NonNull slices
2020-06-30Deny unsafe ops in unsafe fns, part 6LeSeulArtichaut-3/+8
And final part!!!
2020-05-18Apply suggestions from code reviewSimon Sapin-4/+4
Co-authored-by: kennytm <kennytm@gmail.com>
2020-05-18Add `len` and `slice_from_raw_parts` to `NonNull<[T]>`Simon Sapin-0/+59
This follows the precedent of the recently-added `<*const [T]>::len` (adding to its tracking issue https://github.com/rust-lang/rust/issues/71146) and `ptr::slice_from_raw_parts`.
2020-04-29safety-ptr: Add SAFETY on some unsafe blocks from libcore/ptrcohenarthur-3/+15
Add documentation example to slice_from_raw_parts_mut() Add SAFETY explanations to some unsafe blocks in libcore/ptr * libcore/ptr/mod.rs * libcore/ptr/unique.rs * libcore/ptr/non_null.rs safety-mod.rs: Add SAFETY to slice_from_raw_parts(), slice_from_raw_parts_mut() slice_from_raw_parts_mut: Add documentation example safety-ptr-unique.rs: Add SAFETY to new() and cast() safety-ptr-non_null.rs: Add SAFETY to new() safety-ptr-non_null.rs: Add SAFETY to cast() safety-ptr-non_null.rs: Add SAFETY to from() impls safety-ptr-unique.rs: Add SAFETY to from() impls safety-ptr-non_null.rs: Add SAFETY to new() safety-ptr-unique.rs: Add SAFETY to new() safety-ptr-mod.rs: Fix safety explanation https://github.com/rust-lang/rust/pull/71507#discussion_r414488884 safety-prt-non_null.rs: Fix SAFETY comment syntax safety-ptr-unique.rs: Fix syntax for empty() safety-ptr-non_null.rs: Fix misuse of non-null for align_of() safety-ptr-non_null.rs: Remove incorrect SAFETY comment safety-ptr-unique.rs: Remove unsound SAFETY comment safety-ptr-mod.rs: Add std comment on slice_from_raw_parts guarantee safety-ptr-unique.rs: Remove incorrect safety comment Creating a Unique from a NonNull has strict guarantees that the current implementation does not guarantee https://github.com/rust-lang/rust/pull/71507#discussion_r415035952 safety-ptr: Re-adding ignore-tidy directive
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-2/+2
2019-12-18Propagate cfg bootstrapMark Rousskov-16/+4
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+16
functions with a `const` modifier
2019-11-26Format libcore with rustfmtDavid Tolnay-15/+9
This commit applies rustfmt with default settings to files in src/libcore *that are not involved in any currently open PR* to minimize merge conflicts. The list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in `outstanding_files`, the relevant commands were: $ find src/libcore -name '*.rs' | xargs rustfmt --edition=2018 $ rg libcore outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libcore.
2019-11-06Have tidy ensure that we document all `unsafe` blocks in libcoreOliver Scherer-0/+2
2019-09-06A few cosmetic improvements to code & comments in liballoc and libcoreAlexander Regueiro-1/+1
2019-07-04Switch master to 1.38Mark Rousskov-1/+1
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/+226