<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/alloc/src, branch 1.66.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.66.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.66.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-10-31T14:43:15+00:00</updated>
<entry>
<title>Bump version placeholders to release</title>
<updated>2022-10-31T14:43:15+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2022-10-31T14:43:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f244dab021b67d53d6117bfdbe3ddeb8b56c70b0'/>
<id>urn:sha1:f244dab021b67d53d6117bfdbe3ddeb8b56c70b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ptr::eq: clarify that comparing dyn Trait is fragile</title>
<updated>2022-10-26T09:15:14+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2022-10-26T09:15:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=99a74afa5fdc2318e7245e6657a3f21695526356'/>
<id>urn:sha1:99a74afa5fdc2318e7245e6657a3f21695526356</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clairify Vec::capacity docs</title>
<updated>2022-10-24T14:01:58+00:00</updated>
<author>
<name>Nixon Enraght-Moony</name>
<email>nixon.emoony@gmail.com</email>
</author>
<published>2022-10-24T14:01:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=674cd6125da1277af2d864b7d4e637c0a73f142c'/>
<id>urn:sha1:674cd6125da1277af2d864b7d4e637c0a73f142c</id>
<content type='text'>
Fixes #103326
</content>
</entry>
<entry>
<title>Rollup merge of #99578 - steffahn:remove_redundant_bound, r=thomcc</title>
<updated>2022-10-24T10:32:24+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev+love@gmail.com</email>
</author>
<published>2022-10-24T10:32:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fbb3650c89a45486e5c7a95f0cf7b3ce1657d5b4'/>
<id>urn:sha1:fbb3650c89a45486e5c7a95f0cf7b3ce1657d5b4</id>
<content type='text'>
Remove redundant lifetime bound from `impl Borrow for Cow`

The lifetime bound `B::Owned: 'a` is redundant and doesn't make a difference,
because `Cow&lt;'a, B&gt;` comes with an implicit `B: 'a`, and associated types
will outlive lifetimes outlived by the `Self` type (and all the trait's
generic parameters, of which there are none in this case), so the implicit `B: 'a`
implies `B::Owned: 'a` anyway.

The explicit lifetime bound here does however [end up in documentation](https://doc.rust-lang.org/std/borrow/enum.Cow.html#impl-Borrow%3CB%3E),
and that's confusing in my opinion, so let's remove it ^^

_(Documentation right now, compare to `AsRef`, too:)_
![Screenshot_20220722_014055](https://user-images.githubusercontent.com/3986214/180332665-424d0c05-afb3-40d8-a330-a57a2c9a494b.png)
</content>
</entry>
<entry>
<title>Fix typo in docs of `String::leak`.</title>
<updated>2022-10-22T19:26:47+00:00</updated>
<author>
<name>Finn Bear</name>
<email>finnbearlabs@gmail.com</email>
</author>
<published>2022-10-22T19:26:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9f0503e4a60d73b6a8404e4f9c7678e162173305'/>
<id>urn:sha1:9f0503e4a60d73b6a8404e4f9c7678e162173305</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #103346 - HeroicKatora:metadata_of_const_pointer_argument, r=dtolnay</title>
<updated>2022-10-22T10:58:09+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>99973273+Dylan-DPC@users.noreply.github.com</email>
</author>
<published>2022-10-22T10:58:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b22559f547f963df83987dfcf2aeb070a84d42bf'/>
<id>urn:sha1:b22559f547f963df83987dfcf2aeb070a84d42bf</id>
<content type='text'>
Adjust argument type for mutable with_metadata_of (#75091)

The method takes two pointer arguments: one `self` supplying the pointer value, and a second pointer supplying the metadata.

The new parameter type more clearly reflects the actual requirements. The provenance of the metadata parameter is disregarded completely. Using a mutable pointer in the call site can be coerced to a const pointer while the reverse is not true.

In some cases, the current parameter type can thus lead to a very slightly confusing additional cast. [Example](https://github.com/HeroicKatora/static-alloc/commit/cad93775eb9adc62f744651e3abf19513e69e7d0).

```rust
// Manually taking an unsized object from a `ManuallyDrop` into another allocation.
let val: &amp;core::mem::ManuallyDrop&lt;T&gt; = …;

let ptr = val as *const _ as *mut T;
let ptr = uninit.as_ptr().with_metadata_of(ptr);
```

This could then instead be simplified to:

```rust
// Manually taking an unsized object from a `ManuallyDrop` into another allocation.
let val: &amp;core::mem::ManuallyDrop&lt;T&gt; = …;

let ptr = uninit.as_ptr().with_metadata_of(&amp;**val);
```

Tracking issue: https://github.com/rust-lang/rust/issues/75091

``@dtolnay`` you're reviewed #95249, would you mind chiming in?
</content>
</entry>
<entry>
<title>Rollup merge of #103280 - finnbear:impl_string_leak_2, r=joshtriplett</title>
<updated>2022-10-22T10:58:08+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>99973273+Dylan-DPC@users.noreply.github.com</email>
</author>
<published>2022-10-22T10:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=141478b40f834a58c91749a547c734b67f4fe5e3'/>
<id>urn:sha1:141478b40f834a58c91749a547c734b67f4fe5e3</id>
<content type='text'>
(#102929) Implement `String::leak` (attempt 2)

Implementation of `String::leak` (#102929)

ACP: https://github.com/rust-lang/libs-team/issues/109

Supersedes #102941 (see previous reviews there)

```@rustbot``` label +T-libs-api -T-libs
</content>
</entry>
<entry>
<title>Rollup merge of #103359 - WaffleLapkin:drain_no_mut_qqq, r=scottmcm</title>
<updated>2022-10-21T22:14:03+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2022-10-21T22:14:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1b2f594f48a9e6424d7120212ac66446efb489d9'/>
<id>urn:sha1:1b2f594f48a9e6424d7120212ac66446efb489d9</id>
<content type='text'>
Remove incorrect comment in `Vec::drain`

r? ``@scottmcm``

Turns out this comment wasn't correct for 6 years, since #34951, which switched from using `slice::IterMut` into using `slice::Iter`.
</content>
</entry>
<entry>
<title>Remove incorrect comment in `Vec::drain`</title>
<updated>2022-10-21T15:29:02+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-10-21T15:29:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e97d295d0078b03212cecb91854b979e4757ba72'/>
<id>urn:sha1:e97d295d0078b03212cecb91854b979e4757ba72</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reduce mutability in std-use of with_metadata_of</title>
<updated>2022-10-21T12:49:29+00:00</updated>
<author>
<name>Andreas Molzer</name>
<email>andreas.molzer@nebumind.com</email>
</author>
<published>2022-10-21T12:34:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e3606b2b0298be6122d002257b50ba42f0b4d4d2'/>
<id>urn:sha1:e3606b2b0298be6122d002257b50ba42f0b4d4d2</id>
<content type='text'>
</content>
</entry>
</feed>
