rust/library/core/src
ecstatic-morse 4f3697b4b8
Rollup merge of #76150 - matklad:droporder, r=withoutboats
Don't recommend ManuallyDrop to customize drop order

See
https://internals.rust-lang.org/t/need-for-controlling-drop-order-of-fields/12914/21
for the discussion.

TL;DR: ManuallyDrop is unsafe and footguny, but you can just ask the compiler to do all the work for you by re-ordering declarations.

Specifically, the original example from the docs is much better written as

```rust
struct Peach;
struct Banana;
struct Melon;
struct FruitBox {
    melon: Melon,
    // XXX: mind the relative drop order of the fields below
    peach: Peach,
    banana: Banana,
}
```
2020-09-21 20:40:41 -07:00
..
alloc
array Rename MaybeUninit::read to assume_init_read. 2020-09-09 11:27:42 +02:00
char
convert
fmt Use T::BITS instead of size_of::<T> * 8. 2020-09-19 06:54:42 +02:00
future Apply suggestions from code review 2020-09-18 09:52:35 +02:00
hash
iter use iter:: before free functions 2020-09-20 18:04:12 +02:00
macros
mem Rollup merge of #76150 - matklad:droporder, r=withoutboats 2020-09-21 20:40:41 -07:00
num Remove outdated ignored tidy comment 2020-09-19 15:01:51 +00:00
ops Rollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebank 2020-09-16 01:30:32 +02:00
prelude
ptr Rollup merge of #76497 - camelid:intra-doc-links-for-core-ptr, r=jyn514 2020-09-09 21:02:33 -07:00
slice Rollup merge of #76827 - lcnr:array_windows-docs, r=jonas-schievink 2020-09-20 12:08:27 +02:00
str Fixed some intra-docs links in library/core 2020-09-18 07:49:29 +08:00
sync Rollup merge of #76967 - fusion-engineering-forks:revert-atomic-from-mut, r=kodrAus 2020-09-21 15:30:41 +02:00
task Use intra-doc links 2020-09-17 22:43:13 +02:00
unicode
any.rs
ascii.rs Fixed some intra-docs links in library/core 2020-09-18 07:49:29 +08:00
bool.rs
borrow.rs
cell.rs Replace unneeded unsafe calls to .get() with calls to .get_mut() 2020-09-20 18:06:03 +02:00
clone.rs
cmp.rs
default.rs
ffi.rs
hint.rs Rollup merge of #76823 - RalfJung:black-box-warn, r=joshtriplett 2020-09-20 12:08:24 +02:00
internal_macros.rs
intrinsics.rs cfg bootstrap 2020-09-19 11:33:11 +02:00
lazy.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
lib.rs Auto merge of #76295 - mati865:remove-mmx, r=Amanieu,oli-obk 2020-09-21 00:43:26 +00:00
marker.rs
option.rs Stabilize some Option methods as const 2020-09-20 22:42:14 +02:00
panic.rs Auto merge of #76157 - ArekPiekarz:const_caller_location_tracking_issue, r=joshtriplett 2020-09-06 20:27:51 +00:00
panicking.rs
pin.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
primitive.rs
raw.rs
result.rs
time.rs Make all methods of Duration const 2020-09-12 15:14:58 +02:00
tuple.rs
unit.rs