about summary refs log tree commit diff
path: root/src/liballoc/alloc
diff options
context:
space:
mode:
authorcohenarthur <arthur.cohen@epita.fr>2020-04-23 22:32:20 +0200
committercohenarthur <arthur.cohen@epita.fr>2020-04-29 11:18:31 +0200
commit8558ccd5c4d3d7ca78aaff4a81c48f7a04b0f1f2 (patch)
tree77a4a3f3bcab9ee44f6ed067816edcdc9d3c5368 /src/liballoc/alloc
parentb4a11d4dd971be4a2e055e4f92fece030615a692 (diff)
downloadrust-8558ccd5c4d3d7ca78aaff4a81c48f7a04b0f1f2.tar.gz
rust-8558ccd5c4d3d7ca78aaff4a81c48f7a04b0f1f2.zip
safety-ptr: Add SAFETY on some unsafe blocks from libcore/ptr
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
Diffstat (limited to 'src/liballoc/alloc')
0 files changed, 0 insertions, 0 deletions