<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/alloc/tests/lib.rs, branch 1.76.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.76.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.76.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-12-05T19:52:41+00:00</updated>
<entry>
<title>Rollup merge of #118123 - RalfJung:internal-lib-features, r=compiler-errors</title>
<updated>2023-12-05T19:52:41+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-12-05T19:52:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=19bf7495605962df2b0bfa96382a4f717f63b0c3'/>
<id>urn:sha1:19bf7495605962df2b0bfa96382a4f717f63b0c3</id>
<content type='text'>
Add support for making lib features internal

We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug.

This extends that idea to lib features as well. It is an alternative to https://github.com/rust-lang/rust/pull/115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal.

Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes https://github.com/rust-lang/rust/issues/115597.
</content>
</entry>
<entry>
<title>Auto merge of #110353 - the8472:in-place-flatten-chunks, r=cuviper</title>
<updated>2023-11-28T12:22:16+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-11-28T12:22:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=df0295f07175acc7325ce3ca4152eb05752af1f2'/>
<id>urn:sha1:df0295f07175acc7325ce3ca4152eb05752af1f2</id>
<content type='text'>
Expand in-place iteration specialization to Flatten, FlatMap and ArrayChunks

This enables the following cases to collect in-place:

```rust
let v = vec![[0u8; 4]; 1024]
let v: Vec&lt;_&gt; = v.into_iter().flatten().collect();

let v: Vec&lt;Option&lt;NonZeroUsize&gt;&gt; = vec![NonZeroUsize::new(0); 1024];
let v: Vec&lt;_&gt; = v.into_iter().flatten().collect();

let v = vec![u8; 4096];
let v: Vec&lt;_&gt; = v.into_iter().array_chunks::&lt;4&gt;().collect();
```

Especially the nicheful-option-flattening should be useful in real code.
</content>
</entry>
<entry>
<title>also make 'core_intrinsics' internal</title>
<updated>2023-11-22T19:00:56+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2023-11-22T06:30:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74834a9d74ce2a26bf0ee609ce2790299226f742'/>
<id>urn:sha1:74834a9d74ce2a26bf0ee609ce2790299226f742</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add insta-stable std::hash::{DefaultHasher, RandomState} exports</title>
<updated>2023-11-03T00:35:20+00:00</updated>
<author>
<name>ltdk</name>
<email>usr@ltdk.xyz</email>
</author>
<published>2023-10-13T06:44:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8337e86b28b9cdab7250e39710a1c81b99aeeb8d'/>
<id>urn:sha1:8337e86b28b9cdab7250e39710a1c81b99aeeb8d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Expand in-place iteration specialization to Flatten, FlatMap and ArrayChunks</title>
<updated>2023-09-03T17:59:47+00:00</updated>
<author>
<name>The 8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2023-04-15T10:59:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ca6bb0b44c3e65dab07e12aec9efb277dc206f9'/>
<id>urn:sha1:3ca6bb0b44c3e65dab07e12aec9efb277dc206f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList</title>
<updated>2023-06-14T07:28:54+00:00</updated>
<author>
<name>The 8472</name>
<email>git@infinite-source.de</email>
</author>
<published>2023-04-08T22:37:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=114d5f221c135e3267fbb966e2f0e582361cd8cb'/>
<id>urn:sha1:114d5f221c135e3267fbb966e2f0e582361cd8cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix library and rustdoc tests</title>
<updated>2023-04-16T11:38:52+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2023-04-16T11:12:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4c6ddc036b13cc9fa06e437295476231a7c11435'/>
<id>urn:sha1:4c6ddc036b13cc9fa06e437295476231a7c11435</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #109701 - Amanieu:binaryheap_retain, r=ChrisDenton</title>
<updated>2023-04-02T07:04:01+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-04-02T07:04:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=637d7fdb2333dcd8eadaec2eb95273e7569c46cc'/>
<id>urn:sha1:637d7fdb2333dcd8eadaec2eb95273e7569c46cc</id>
<content type='text'>
Stabilize `binary_heap_retain`

FCP finished in tracking issue: #71503
</content>
</entry>
<entry>
<title>Auto merge of #105587 - tgross35:once-cell-min, r=m-ou-se</title>
<updated>2023-03-30T10:12:23+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-03-30T10:12:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8a7ca936e61d04399198911ee2b07ac110bf17b0'/>
<id>urn:sha1:8a7ca936e61d04399198911ee2b07ac110bf17b0</id>
<content type='text'>
Partial stabilization of `once_cell`

This PR aims to stabilize a portion of the `once_cell` feature:

- `core::cell::OnceCell`
- `std::cell::OnceCell` (re-export of the above)
- `std::sync::OnceLock`

This will leave `LazyCell` and `LazyLock` unstabilized, which have been moved to the `lazy_cell` feature flag.

Tracking issue: https://github.com/rust-lang/rust/issues/74465 (does not fully close, but it may make sense to move to a new issue)

Future steps for separate PRs:
- ~~Add `#[inline]` to many methods~~ #105651
- Update cranelift usage of the `once_cell` crate
- Update rust-analyzer usage of the `once_cell` crate
- Update error messages discussing once_cell

## To be stabilized API summary

```rust
// core::cell (in core/cell/once.rs)

pub struct OnceCell&lt;T&gt; { .. }

impl&lt;T&gt; OnceCell&lt;T&gt; {
    pub const fn new() -&gt; OnceCell&lt;T&gt;;
    pub fn get(&amp;self) -&gt; Option&lt;&amp;T&gt;;
    pub fn get_mut(&amp;mut self) -&gt; Option&lt;&amp;mut T&gt;;
    pub fn set(&amp;self, value: T) -&gt; Result&lt;(), T&gt;;
    pub fn get_or_init&lt;F&gt;(&amp;self, f: F) -&gt; &amp;T where F: FnOnce() -&gt; T;
    pub fn into_inner(self) -&gt; Option&lt;T&gt;;
    pub fn take(&amp;mut self) -&gt; Option&lt;T&gt;;
}

impl&lt;T: Clone&gt; Clone for OnceCell&lt;T&gt;;
impl&lt;T: Debug&gt; Debug for OnceCell&lt;T&gt;
impl&lt;T&gt; Default for OnceCell&lt;T&gt;;
impl&lt;T&gt; From&lt;T&gt; for OnceCell&lt;T&gt;;
impl&lt;T: PartialEq&gt; PartialEq for OnceCell&lt;T&gt;;
impl&lt;T: Eq&gt; Eq for OnceCell&lt;T&gt;;
```

```rust
// std::sync (in std/sync/once_lock.rs)

impl&lt;T&gt; OnceLock&lt;T&gt; {
    pub const fn new() -&gt; OnceLock&lt;T&gt;;
    pub fn get(&amp;self) -&gt; Option&lt;&amp;T&gt;;
    pub fn get_mut(&amp;mut self) -&gt; Option&lt;&amp;mut T&gt;;
    pub fn set(&amp;self, value: T) -&gt; Result&lt;(), T&gt;;
    pub fn get_or_init&lt;F&gt;(&amp;self, f: F) -&gt; &amp;T where F: FnOnce() -&gt; T;
    pub fn into_inner(self) -&gt; Option&lt;T&gt;;
    pub fn take(&amp;mut self) -&gt; Option&lt;T&gt;;
}

impl&lt;T: Clone&gt; Clone for OnceLock&lt;T&gt;;
impl&lt;T: Debug&gt; Debug for OnceLock&lt;T&gt;;
impl&lt;T&gt; Default for OnceLock&lt;T&gt;;
impl&lt;#[may_dangle] T&gt; Drop for OnceLock&lt;T&gt;;
impl&lt;T&gt; From&lt;T&gt; for OnceLock&lt;T&gt;;
impl&lt;T: PartialEq&gt; PartialEq for OnceLock&lt;T&gt;
impl&lt;T: Eq&gt; Eq for OnceLock&lt;T&gt;;
impl&lt;T: RefUnwindSafe + UnwindSafe&gt; RefUnwindSafe for OnceLock&lt;T&gt;;
unsafe impl&lt;T: Send&gt; Send for OnceLock&lt;T&gt;;
unsafe impl&lt;T: Sync + Send&gt; Sync for OnceLock&lt;T&gt;;
impl&lt;T: UnwindSafe&gt; UnwindSafe for OnceLock&lt;T&gt;;
```

No longer planned as part of this PR, and moved to the `rust_cell_try` feature gate:

```rust
impl&lt;T&gt; OnceCell&lt;T&gt; {
    pub fn get_or_try_init&lt;F, E&gt;(&amp;self, f: F) -&gt; Result&lt;&amp;T, E&gt; where F: FnOnce() -&gt; Result&lt;T, E&gt;;
}

impl&lt;T&gt; OnceLock&lt;T&gt; {
    pub fn get_or_try_init&lt;F, E&gt;(&amp;self, f: F) -&gt; Result&lt;&amp;T, E&gt; where F: FnOnce() -&gt; Result&lt;T, E&gt;;
}
```

I am new to this process so would appreciate mentorship wherever needed.
</content>
</entry>
<entry>
<title>Stabilize a portion of 'once_cell'</title>
<updated>2023-03-29T22:04:44+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>tmgross@umich.edu</email>
</author>
<published>2022-12-12T05:42:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dc4ba57566acac492df2c2074d2d7144566dc7df'/>
<id>urn:sha1:dc4ba57566acac492df2c2074d2d7144566dc7df</id>
<content type='text'>
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
</content>
</entry>
</feed>
