<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/tools/miri, 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-10-02T08:27:48+00:00</updated>
<entry>
<title>Rollup merge of #146281 - Jules-Bertholet:static-align-thread-local, r=Mark-Simulacrum</title>
<updated>2025-10-02T08:27:48+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-10-02T08:27:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=92aac1bdf61642cfc99498ca86e663cf53d2039e'/>
<id>urn:sha1:92aac1bdf61642cfc99498ca86e663cf53d2039e</id>
<content type='text'>
Support `#[rustc_align_static]` inside `thread_local!`

Tracking issue: rust-lang/rust#146177

```rust
thread_local! {
    #[rustc_align_static(64)]
    static SO_ALIGNED: u64 = const { 0 };
}
```

This increases the amount of recursion the macro performs (once per attribute in addition to the previous once per item), making it easier to hit the recursion limit. I’ve added workarounds to limit the impact in the case of long doc comments, but this still needs a crater run just in case.

r? libs

``@rustbot`` label A-attributes A-macros A-thread-locals F-static_align T-libs
</content>
</entry>
<entry>
<title>Fix memory leak in `os` impl</title>
<updated>2025-10-01T16:28:18+00:00</updated>
<author>
<name>Jules Bertholet</name>
<email>julesbertholet@quoi.xyz</email>
</author>
<published>2025-10-01T15:32:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=94f00f4e4a0240bc7b8284c78482e37af252309a'/>
<id>urn:sha1:94f00f4e4a0240bc7b8284c78482e37af252309a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove explicit deref of AbiAlign for most methods</title>
<updated>2025-09-28T22:02:14+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2025-09-28T21:40:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0c9d0dfe046f0674f0507df564504ac3bac862d9'/>
<id>urn:sha1:0c9d0dfe046f0674f0507df564504ac3bac862d9</id>
<content type='text'>
Much of the compiler calls functions on Align projected from AbiAlign.
AbiAlign impls Deref to its inner Align, so we can simplify these away.
Also, it will minimize disruption when AbiAlign is removed.

For now, preserve usages that might resolve to PartialOrd or PartialEq,
as those have odd inference.
</content>
</entry>
<entry>
<title>Rollup merge of #141469 - Kivooeo:remove-usnsafegate, r=compiler-errors</title>
<updated>2025-09-28T16:13:11+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-28T16:13:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6059195875986ac9d928d1059d733d518cb1709b'/>
<id>urn:sha1:6059195875986ac9d928d1059d733d518cb1709b</id>
<content type='text'>
Allow `&amp;raw [mut | const]` for union field in safe code

fixes rust-lang/rust#141264

r? ``@Veykril``

Unresolved questions:

- [x] Any edge cases?
- [x] How this works with rust-analyzer (because all I've did is prevent compiler from emitting error in `&amp;raw` context) (rust-lang/rust-analyzer#19867)
- [x] Should we allow `addr_of!` and `addr_of_mut!` as well? In current version they both (`&amp;raw` and `addr_of!`) are allowed (They are the same)
- [x] Is chain of union fields is a safe? (Yes)
</content>
</entry>
<entry>
<title>Apply cfg(bootstrap) replacement</title>
<updated>2025-09-26T23:09:23+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2025-09-16T02:01:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=201f299ef6039886042ad8dd7c76a4fbd1a77a3f'/>
<id>urn:sha1:201f299ef6039886042ad8dd7c76a4fbd1a77a3f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Support `#[rustc_align_static]` inside `thread_local!`</title>
<updated>2025-09-26T17:51:09+00:00</updated>
<author>
<name>Jules Bertholet</name>
<email>julesbertholet@quoi.xyz</email>
</author>
<published>2025-09-10T21:11:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a4e87e940620bc0e61caa7c42b1edc53c0aee7cb'/>
<id>urn:sha1:a4e87e940620bc0e61caa7c42b1edc53c0aee7cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #147037 - matthiaskrgr:rollup-xtgqzuu, r=matthiaskrgr</title>
<updated>2025-09-25T20:35:49+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-09-25T20:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7ac0330c6d684d86d6f86fabe601a3defdc3b234'/>
<id>urn:sha1:7ac0330c6d684d86d6f86fabe601a3defdc3b234</id>
<content type='text'>
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
 - rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
 - rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
 - rust-lang/rust#142401 (Add proper name mangling for pattern types)
 - rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
 - rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
 - rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
 - rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)

r? `@ghost`
`@rustbot` modify labels: rollup
</content>
</entry>
<entry>
<title>Rollup merge of #141032 - petrosagg:extract-if-ub, r=joboet</title>
<updated>2025-09-25T16:15:07+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-25T16:15:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e3f762673241c2892951be3477b99753b68e41e1'/>
<id>urn:sha1:e3f762673241c2892951be3477b99753b68e41e1</id>
<content type='text'>
avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`

The implementation of the `Vec::extract_if` iterator violates the safety contract adverized by `slice::from_raw_parts` by always constructing a mutable slice for the entire length of the vector even though that span of memory can contain holes from items already drained. The safety contract of `slice::from_raw_parts` requires that all elements must be properly
initialized.

As an example we can look at the following code:

```rust
let mut v = vec![Box::new(0u64), Box::new(1u64)];
for item in v.extract_if(.., |x| **x == 0) {
    drop(item);
}
```

In the second iteration a `&amp;mut [Box&lt;u64&gt;]` slice of length 2 will be constructed. The first slot of the slice contains the bitpattern of an already deallocated box, which is invalid.

This fixes the issue by only creating references to valid items and using pointer manipulation for the rest. I have also taken the liberty to remove the big `unsafe` blocks in place of targetted ones with a SAFETY comment. The approach closely mirrors the implementation of `Vec::retain_mut`.

**Note to reviewers:** The diff is easier to follow with whitespace hidden.
</content>
</entry>
<entry>
<title>Rollup merge of #146735 - Qelxiros:const_mul_add, r=tgross35,RalfJung</title>
<updated>2025-09-25T10:31:54+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-25T10:31:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8e62f95376e40f3eb81e5f1b29cb4eb997c36fb5'/>
<id>urn:sha1:8e62f95376e40f3eb81e5f1b29cb4eb997c36fb5</id>
<content type='text'>
unstably constify float mul_add methods

Tracking issue: rust-lang/rust#146724
r? `@tgross35`
</content>
</entry>
<entry>
<title>unstably constify float mul_add methods</title>
<updated>2025-09-24T19:21:31+00:00</updated>
<author>
<name>Jeremy Smart</name>
<email>jeremy3141592@gmail.com</email>
</author>
<published>2025-09-18T19:02:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a00f24116e9bcecc8c73f9f7ec0c399964b37a92'/>
<id>urn:sha1:a00f24116e9bcecc8c73f9f7ec0c399964b37a92</id>
<content type='text'>
Co-authored-by: Ralf Jung &lt;post@ralfj.de&gt;
</content>
</entry>
</feed>
