<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/alloc/src/collections/vec_deque, branch 1.82.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.82.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.82.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-09-02T16:48:42+00:00</updated>
<entry>
<title>replace placeholder version</title>
<updated>2024-09-02T16:48:42+00:00</updated>
<author>
<name>Boxy</name>
<email>rust@boxyuwu.dev</email>
</author>
<published>2024-09-02T16:48:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=93212be0a7b1968ef756763c5842ce5d9b7c1f10'/>
<id>urn:sha1:93212be0a7b1968ef756763c5842ce5d9b7c1f10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stabilize `min_exhaustive_patterns`</title>
<updated>2024-08-10T10:07:17+00:00</updated>
<author>
<name>Nadrieril</name>
<email>nadrieril+git@gmail.com</email>
</author>
<published>2024-03-20T18:24:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cd40769c02e31649bae3422ec7215783bc9d416f'/>
<id>urn:sha1:cd40769c02e31649bae3422ec7215783bc9d416f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #128261 - clarfonthey:iter-default, r=dtolnay</title>
<updated>2024-08-07T18:28:16+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-08-07T18:28:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2ee96783381714ba0e08f4c93a2971d8223e874d'/>
<id>urn:sha1:2ee96783381714ba0e08f4c93a2971d8223e874d</id>
<content type='text'>
impl `Default` for collection iterators that don't already have it

There is a pretty strong precedent for implementing `Default` for collection iterators, and this does so for some where this implementation was missed.

I don't think this needs a separate ACP (since this precedent already exists, and these feel like they were just missed), however, it *will* need an FCP since these implementations are instantly stable.
</content>
</entry>
<entry>
<title>Reformat `use` declarations.</title>
<updated>2024-07-28T22:26:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-07-28T22:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84ac80f1921afc243d71fd0caaa4f2838c294102'/>
<id>urn:sha1:84ac80f1921afc243d71fd0caaa4f2838c294102</id>
<content type='text'>
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
</content>
</entry>
<entry>
<title>Okay, I guess I have to give these a different feature name</title>
<updated>2024-07-27T06:48:55+00:00</updated>
<author>
<name>ltdk</name>
<email>usr@ltdk.xyz</email>
</author>
<published>2024-07-27T06:48:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0b9972049727f08610c038bce7177571b7111df5'/>
<id>urn:sha1:0b9972049727f08610c038bce7177571b7111df5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>impl Default for collection iterators that don't already have it</title>
<updated>2024-07-27T06:04:32+00:00</updated>
<author>
<name>ltdk</name>
<email>usr@ltdk.xyz</email>
</author>
<published>2024-07-27T05:51:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=50835bf1943193f7a78cc39b17f6e90b72bff5a4'/>
<id>urn:sha1:50835bf1943193f7a78cc39b17f6e90b72bff5a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Specialize `TrustedLen` for `Iterator::unzip()`</title>
<updated>2024-07-07T03:58:52+00:00</updated>
<author>
<name>Chayim Refael Friedman</name>
<email>chayimfr@gmail.com</email>
</author>
<published>2024-07-07T03:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=54556f49d368ba96a92fd6ec352cf6b12e9542ef'/>
<id>urn:sha1:54556f49d368ba96a92fd6ec352cf6b12e9542ef</id>
<content type='text'>
Don't check the capacity every time (and also for `Extend` for tuples, as this is how `unzip()` is implemented).

I did this with an unsafe method on `Extend` that doesn't check for growth (`extend_one_unchecked()`). I've marked it as perma-unstable currently, although we may want to expose it in the future so collections outside of std can benefit from it. Then specialize `Extend for (A, B)` for `TrustedLen` to call it.

It may seem that an alternative way of implementing this is to have a semi-public trait (`#[doc(hidden)]` public, so collections outside of core can implement it) for `extend()` inside tuples, and specialize it from collections. However, it is impossible due to limitations of `min_specialization`.

A concern that may arise with the current approach is that implementing `extend_one_unchecked()` correctly must also incur implementing `extend_reserve()`, otherwise you can have UB. This is a somewhat non-local safety invariant. However, I believe this is fine, since to have actual UB you must have unsafe code inside your `extend_one_unchecked()` that makes incorrect assumption, *and* not implement `extend_reserve()`. I've also documented this requirement.
</content>
</entry>
<entry>
<title>Replace `MaybeUninit::uninit_array()` with array repeat expression.</title>
<updated>2024-06-24T17:23:50+00:00</updated>
<author>
<name>Kevin Reid</name>
<email>kpreid@switchb.org</email>
</author>
<published>2024-05-13T04:37:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=13fca73f4937fe4bb318321525a0fd666e9da16e'/>
<id>urn:sha1:13fca73f4937fe4bb318321525a0fd666e9da16e</id>
<content type='text'>
This is possible now that inline const blocks are stable; the idea was
even mentioned as an alternative when `uninit_array()` was added:
&lt;https://github.com/rust-lang/rust/pull/65580#issuecomment-544200681&gt;

&gt; if it’s stabilized soon enough maybe it’s not worth having a
&gt; standard library method that will be replaceable with
&gt; `let buffer = [MaybeUninit::&lt;T&gt;::uninit(); $N];`

Const array repetition and inline const blocks are now stable (in the
next release), so that circumstance has come to pass, and we no longer
have reason to want `uninit_array()` other than convenience. Therefore,
let’s evaluate the inconvenience by not using `uninit_array()` in
the standard library, before potentially deleting it entirely.
</content>
</entry>
<entry>
<title>Move `test_shrink_to_unwind` to its own file.</title>
<updated>2024-05-07T19:43:54+00:00</updated>
<author>
<name>Markus Everling</name>
<email>markuseverling@gmail.com</email>
</author>
<published>2024-05-07T19:43:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5cb53bc34d462a59629e5430cf2e29fe6820c550'/>
<id>urn:sha1:5cb53bc34d462a59629e5430cf2e29fe6820c550</id>
<content type='text'>
This way, no other test can be tripped up by `test_shrink_to_unwind` changing the alloc error hook.
</content>
</entry>
<entry>
<title>Fix `VecDeque::shrink_to` UB when `handle_alloc_error` unwinds.</title>
<updated>2024-05-07T19:30:34+00:00</updated>
<author>
<name>Markus Everling</name>
<email>markuseverling@gmail.com</email>
</author>
<published>2024-04-11T15:31:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ffe8510e3d989f35163ac5406af82e1c9dd8f769'/>
<id>urn:sha1:ffe8510e3d989f35163ac5406af82e1c9dd8f769</id>
<content type='text'>
Luckily it's comparatively simple to just restore the `VecDeque` into a valid state on unwinds.
</content>
</entry>
</feed>
