<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/alloc/src/vec/drain.rs, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-02-23T16:11:00+00:00</updated>
<entry>
<title>rename sub_ptr 😅</title>
<updated>2025-02-23T16:11:00+00:00</updated>
<author>
<name>bendn</name>
<email>bend.n@outlook.com</email>
</author>
<published>2025-02-23T13:26:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c813d8f3e49aa4c85c9eded426b6507701a2ff94'/>
<id>urn:sha1:c813d8f3e49aa4c85c9eded426b6507701a2ff94</id>
<content type='text'>
</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>enable `rust_2018_idioms` for doctests</title>
<updated>2023-05-06T21:12:29+00:00</updated>
<author>
<name>ozkanonur</name>
<email>work@onurozkan.dev</email>
</author>
<published>2023-05-06T21:12:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed'/>
<id>urn:sha1:4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed</id>
<content type='text'>
Signed-off-by: ozkanonur &lt;work@onurozkan.dev&gt;
</content>
</entry>
<entry>
<title>Rollup merge of #110635 - scottmcm:zst-checks, r=the8472</title>
<updated>2023-04-22T01:33:57+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>jtitor@2k36.org</email>
</author>
<published>2023-04-22T01:33:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=581e7417ce4e9e1d4adb775bb00d7cc4ea905eee'/>
<id>urn:sha1:581e7417ce4e9e1d4adb775bb00d7cc4ea905eee</id>
<content type='text'>
More `IS_ZST` in `library`

I noticed that `post_inc_start` and `pre_dec_end` were doing this check in different ways

https://github.com/rust-lang/rust/blob/d19b64fb54391b64ce99981577c67c93ac2a9ffa/library/core/src/slice/iter/macros.rs#L76-L93

so started making this PR, then added a few more I found since I was already making changes anyway.
</content>
</entry>
<entry>
<title>More `IS_ZST` in `library`</title>
<updated>2023-04-21T23:29:27+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2023-04-21T03:15:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=56613f8c382351898f9267bac8e8324f118eb79d'/>
<id>urn:sha1:56613f8c382351898f9267bac8e8324f118eb79d</id>
<content type='text'>
I noticed that `post_inc_start` and `pre_dec_end` were doing this check in different ways

https://github.com/rust-lang/rust/blob/d19b64fb54391b64ce99981577c67c93ac2a9ffa/library/core/src/slice/iter/macros.rs#L76-L93

so started making this PR, then added a few more I found since I was already making changes anyway.
</content>
</entry>
<entry>
<title>More `mem::take` in `library`</title>
<updated>2023-04-21T02:54:46+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2023-04-21T02:54:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8055bb87c5d17f4e108097f24171cb8baab71072'/>
<id>urn:sha1:8055bb87c5d17f4e108097f24171cb8baab71072</id>
<content type='text'>
A bunch of places were using `replace(…, &amp;mut [])`, but that can just be `take`.
</content>
</entry>
<entry>
<title>Don't do pointer arithmetic on pointers to deallocated memory</title>
<updated>2023-01-17T21:01:33+00:00</updated>
<author>
<name>The 8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2023-01-16T20:39:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=47014b1bb968be08923a670b1ebfe4deb4256601'/>
<id>urn:sha1:47014b1bb968be08923a670b1ebfe4deb4256601</id>
<content type='text'>
vec::Splice can invalidate the slice::Iter inside vec::Drain.
So we replace them with dangling pointers which, unlike ones to
deallocated memory, are allowed.
</content>
</entry>
<entry>
<title>Make ZST checks in core/alloc more readable</title>
<updated>2022-09-23T06:12:29+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2022-09-23T06:12:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=44b4ce1d61206dcb5351644ceeac2490f60fc512'/>
<id>urn:sha1:44b4ce1d61206dcb5351644ceeac2490f60fc512</id>
<content type='text'>
There's a bunch of these checks because of special handing for ZSTs in various unsafe implementations of stuff.

This lets them be `T::IS_ZST` instead of `mem::size_of::&lt;T&gt;() == 0` every time, making them both more readable and more terse.

*Not* proposed for stabilization at this time.  Would be `pub(crate)` except `alloc` wants to use it too.

(And while it doesn't matter now, if we ever get something like 85836 making it a const can help codegen be simpler.)
</content>
</entry>
<entry>
<title>fill-in tracking issue for `feature(drain_keep_rest)`</title>
<updated>2022-08-28T13:02:37+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-08-28T13:02:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a433e4d00969afe562d46e5314372f6d331d953'/>
<id>urn:sha1:7a433e4d00969afe562d46e5314372f6d331d953</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add examples to `vec::Drain{,Filter}::keep_rest` docs</title>
<updated>2022-08-28T12:58:06+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-08-28T12:38:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8c4e0d42b24bceff6429f33c5bc1d7c6ac0858e8'/>
<id>urn:sha1:8c4e0d42b24bceff6429f33c5bc1d7c6ac0858e8</id>
<content type='text'>
</content>
</entry>
</feed>
