The8472
a7a8b52e91
remove redundant cast
2020-09-03 20:59:28 +02:00
The8472
470bf54f94
test drops during in-place iteration
2020-09-03 20:59:27 +02:00
The8472
fe350dd82d
move unsafety into method, not relevant to caller
2020-09-03 20:59:27 +02:00
The8472
0d2d033415
replace unsafe ptr::write with deref-write, benchmarks show no difference
2020-09-03 20:59:26 +02:00
The8472
9596e5a2f2
pacify tidy
2020-09-03 20:59:26 +02:00
The8472
6ed05fd995
replace drop flag with ManuallyDrop
2020-09-03 20:59:25 +02:00
The8472
ab382b7661
mark as_inner as unsafe and update comments
2020-09-03 20:59:24 +02:00
The8472
2a51e579f5
avoid exposing that binary heap's IntoIter is backed by vec::IntoIter, use a private trait instead
2020-09-03 20:59:24 +02:00
The8472
c731648e77
fix: bench didn't black_box its results
2020-09-03 20:59:23 +02:00
The8472
0856771248
fix build issue due to stabilized feature
2020-09-03 20:59:23 +02:00
The8472
e85cfa4f22
impl TrustedRandomAccess for vec::IntoIter
2020-09-03 20:59:22 +02:00
The8472
e1151844fa
bench larger allocations
2020-09-03 20:59:22 +02:00
The8472
fd16202e36
include in-place .zip() in test
2020-09-03 20:59:21 +02:00
The8472
fbb3371e5b
remove unecessary feature flag
...
# Conflicts:
# library/alloc/src/lib.rs
2020-09-03 20:59:21 +02:00
The8472
085eb20a61
move free-standing method into trait impl
2020-09-03 20:59:19 +02:00
The8472
3d5e9f1904
bench in-place zip
2020-09-03 20:59:18 +02:00
The8472
2b0b2ae9f6
additional specializations tests
2020-09-03 20:59:17 +02:00
The8472
00a32eb54f
fix some in-place-collect edge-cases
...
- it's an allocation optimization, so don't attempt to do it on ZSTs
- drop the tail of partially exhausted iters
2020-09-03 20:59:17 +02:00
The8472
8c816b96dd
remove redundant code
2020-09-03 20:59:16 +02:00
The8472
cc67c8eb91
improve comments
2020-09-03 20:59:16 +02:00
The8472
290fe895ba
specialize creating a Vec from a slice iterator where T: Copy
...
this was already implemented for Extend but not for FromIterator
2020-09-03 20:59:15 +02:00
The8472
dac0edfaaa
restore SpecFrom<T, TrustedLen<Item=T>> specialization by nesting
...
specializations
2020-09-03 20:59:15 +02:00
The8472
582fbb1d62
use From specializations on extend if extended Vec is empty
...
this enables in-place iteration and allocation reuse in additional cases
2020-09-03 20:59:14 +02:00
The8472
a596ff36b5
exercise more of the in-place pipeline in the bench
2020-09-03 20:59:14 +02:00
The8472
a9c78e371e
bench in-place collect of droppables
2020-09-03 20:59:13 +02:00
The8472
8ac96e6a98
cyclic in-place reuse bench
2020-09-03 20:59:13 +02:00
The8472
bb4f888a59
return the things under test so they get black_box()'ed
2020-09-03 20:59:12 +02:00
The8472
2f700d085a
add benches from bluss' gists
2020-09-03 20:59:12 +02:00
The8472
a4e385a0d0
use memmove instead of generic in-place iteration for IntoIter source
...
this is the original SpecExtend<_, IntoIter> logic except generalizing
the fast-path to include a memmove
2020-09-03 20:59:11 +02:00
The8472
631543dcb4
restore Vec::extend specialization for vec::IntoIter sources that
...
was lost during refactoring
2020-09-03 20:59:11 +02:00
The8472
07a8c1b95a
hide binary_heap::IntoIter internals behind impl Trait
2020-09-03 20:59:10 +02:00
The8472
232065074d
recover vectorization
...
switch to try_fold and segregate the drop handling to keep
collect::<Vec<u8>>() and similar optimizer-friendly
It comes at the cost of less accurate debug_asserts and code complexity
2020-09-03 20:59:09 +02:00
The8472
6c5c47b82b
update benches
2020-09-03 20:59:09 +02:00
The8472
bead910b21
simplify pointer arithmetic
2020-09-03 20:59:08 +02:00
The8472
328a75f766
use add instead of offset
2020-09-03 20:59:07 +02:00
The8472
88b7ae642c
implement drop handling
2020-09-03 20:59:06 +02:00
The8472
73a982e9ec
assert that SourceIter requirements have not been violated by the pipeline
2020-09-03 20:59:06 +02:00
The8472
2a327394e4
mark SourceIter as unsafe, document invariants
2020-09-03 20:59:05 +02:00
The8472
bb2d533bb9
in-place collect for Vec. Box<[]> and BinaryHeap IntoIter and some adapters
2020-09-03 20:59:03 +02:00
The8472
038394a330
bench
2020-09-03 20:56:34 +02:00
The8472
076417e978
unrelated typo fix
2020-09-03 20:56:34 +02:00
bors
08deb863bd
Auto merge of #76235 - jyn514:std-intra-links, r=poliorcetics
...
Convert many files to intra-doc links
Helps with https://github.com/rust-lang/rust/issues/75080
r? @poliorcetics
I recommend reviewing one commit at a time, but the diff is small enough you can do it all at once if you like :)
2020-09-03 05:53:48 +00:00
Joshua Nelson
44bacc3ffa
Revert change to MaybeUninit until rustdoc bugs are fixed
...
https://github.com/rust-lang/rust/issues/76106
2020-09-02 17:38:21 -04:00
Joshua Nelson
59a1a05bff
Convert many files to intra-doc links
...
- Use intra-doc links for `std::io` in `std::fs`
- Use intra-doc links for File::read in unix/ext/fs.rs
- Remove explicit intra-doc links for `true` in `net/addr.rs`
- Use intra-doc links in alloc/src/sync.rs
- Use intra-doc links in src/ascii.rs
- Switch to intra-doc links in alloc/rc.rs
- Use intra-doc links in core/pin.rs
- Use intra-doc links in std/prelude
- Use shorter links in `std/fs.rs`
`io` is already in scope.
2020-09-02 17:37:40 -04:00
Anton
dbe50f5c24
Same typos in vec_deque
2020-09-02 14:09:42 +02:00
Anton
b67006422e
Fix typos in vec try_reserve(_exact) docs
...
`try_reserve` and `try_reserve_exact` docs refer to calling `reserve` and `reserve_exact`.
`try_reserve_exact` example uses `try_reserve` method instead of `try_reserve_exact`.
2020-09-02 13:12:44 +02:00
Joshua Nelson
726b187546
Use intra-doc links for MaybeUninit
in boxed.rs
2020-09-01 23:54:17 -04:00
Jon Gjengset
8b55360f70
Will land in 1.48, not 1.47
2020-09-01 09:50:32 -04:00
Jon Gjengset
010891f8b8
Merge branch 'master' into stabilize-vecdeque-make_contiguous
2020-09-01 09:49:42 -04:00
Tyler Mandry
c307e90daa
Rollup merge of #76139 - CDirkx:cow-is-borrowed, r=ecstatic-morse
...
Make `cow_is_borrowed` methods const
Constify the following methods of `alloc::borrow::Cow`:
- `is_borrowed`
- `is_owned`
Analogous to the const methods `is_some` and `is_none` for Option, and `is_ok` and `is_err` for Result.
These methods are still unstable under `cow_is_borrowed`.
Possible because of #49146 (Allow if and match in constants).
Tracking issue: #65143
2020-08-31 19:18:21 -07:00