Commit graph

12 commits

Author SHA1 Message Date
Aleksey Kladov
695d86f584 Make OnceCell<T> transparent to dropck
See the failed build in

https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718

for an example where we need this in real life
2020-08-18 00:34:54 +02:00
kadmin
af32db21c8 Add drop check test & MaybeUninit::first_ptr_mut
Also in drop check test add hacky workaround for platforms that don't support
panic=unwind
2020-08-13 03:51:08 +00:00
kadmin
56a651ca15 Add recommend changes to array
Switch from indexing to zip, and also use `write` on `MaybeUninit`.

Add array_map feature to core/src/lib

Attempt to fix issue of no such feature

Update w/ pickfire's review

This changes a couple of names around, adds another small test of variable size,
and hides the rustdoc #![feature(..)].

Fmt doctest

Add suggestions from lcnr
2020-08-13 03:50:59 +00:00
kadmin
f6411e4c66 Add Array Impl Lang Item in various places
Add basic test

And also run fmt which is where the other changes are from

Fix mut issues

These only appear when running tests, so resolved by adding mut

Swap order of forget

Add pub and rm guard impl

Add explicit type to guard

Add safety note

Change guard type from T to S

It should never have been T, as it guards over [MaybeUninit<S>; N]
Also add feature to test
2020-08-13 03:50:57 +00:00
bors
19ecce332e Auto merge of #74948 - lzutao:stalize-result-as-deref, r=dtolnay
Stabilize `Result::as_deref` and `as_deref_mut`

FCP completed in https://github.com/rust-lang/rust/issues/50264#issuecomment-645681400.

This PR stabilizes two new APIs for `std::result::Result`:
```rust
fn as_deref(&self) -> Result<&T::Target, &E> where T: Deref;
fn as_deref_mut(&mut self) -> Result<&mut T::Target, &mut E> where T: DerefMut;
```

This PR also removes two rarely used unstable APIs from `Result`:
```rust
fn as_deref_err(&self) -> Result<&T, &E::Target> where E: Deref;
fn as_deref_mut_err(&mut self) -> Result<&mut T, &mut E::Target> where E: DerefMut;
```

Closes #50264
2020-08-02 23:55:12 +00:00
Yuki Okushi
7d18040b0c
Rollup merge of #74974 - RalfJung:miri-tests, r=Mark-Simulacrum
Make tests faster in Miri

Reduce some test iteration counts in Miri.
2020-08-03 01:05:20 +09:00
Ralf Jung
ff0c3a9209 expand comments 2020-07-31 14:03:42 +02:00
Ralf Jung
7468f632ff also reduce some libcore test iteration counts 2020-07-31 11:56:08 +02:00
Lzu Tao
6d293ede9f Update tests 2020-07-31 02:44:29 +00:00
Lzu Tao
c25f25f7f1 Stabilize as_deref and as_deref on Result 2020-07-31 02:42:24 +00:00
Bastian Kauschke
d27007fd6d add tests for array_chunks 2020-07-30 10:50:34 +02:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00