<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_hir/src, branch auto</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=auto</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=auto'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-10-04T10:31:27+00:00</updated>
<entry>
<title>Rollup merge of #147117 - iximeow:ixi/illumos-used-attr, r=Noratrieb</title>
<updated>2025-10-04T10:31:27+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-10-04T10:31:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=82ccda32f48d52d1cadd0eb7826e72bf5f83bf9b'/>
<id>urn:sha1:82ccda32f48d52d1cadd0eb7826e72bf5f83bf9b</id>
<content type='text'>
interpret `#[used]` as `#[used(compiler)]` on illumos

helps rust-lang/rust#146169 not be as painful: fixes the illumos regression in rust-lang/rust#140872, but `#[used(linker)]` is still erroneous on illumos generally.

illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would.

As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed.

Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before https://github.com/rust-lang/rust/pull/140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. https://github.com/rust-lang/rust/issues/146169 describes this unfortunate circumstance.

----

as it turns out, `tests/ui/attributes/used_with_archive.rs` had broken on `x86_64-unknown-illumos`, and this patch fixes it. the trials and tribulations of tier 2 :(

r? ``@Noratrieb`` probably?
</content>
</entry>
<entry>
<title>interpret #[used] as #[used(compiler)] on illumos</title>
<updated>2025-10-03T22:03:24+00:00</updated>
<author>
<name>iximeow</name>
<email>iximeow@oxide.computer</email>
</author>
<published>2025-09-28T03:21:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c721fa243825255c0f195d4282021e7c263c3e7f'/>
<id>urn:sha1:c721fa243825255c0f195d4282021e7c263c3e7f</id>
<content type='text'>
illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or
SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]`
for that target. Setting `USED_LINKER` to try results in LLVM setting
SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section
header flag for illumos `ld` and prevents sections from being merged
that otherwise would.

As a motivating example, the `inventory` crate produces
`#[used]` items to merge into `.init_array`. Because those items have an
unknown section header flag they are not merged with the default
`.init_array` with `frame_dummy`, and end up never executed.

Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps
so-attributed items as preserved as they had been before
https://github.com/rust-lang/rust/pull/140872. As was the case before
that change, because rustc passes `-z ignore` to illumos `ld`, it's
possible that `used` sections are GC'd at link time.
https://github.com/rust-lang/rust/issues/146169 describes this
unfortunate circumstance.
</content>
</entry>
<entry>
<title>Rollup merge of #147101 - yotamofek:pr/iter-eq-and-eq-by, r=jdonszelmann</title>
<updated>2025-09-29T11:06:45+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-29T11:06:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=08616a17457bb93eb177d9189f92345d1924294d'/>
<id>urn:sha1:08616a17457bb93eb177d9189f92345d1924294d</id>
<content type='text'>
Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library

Now that rust-lang/rust#137122 has landed, we can replace stuff that looks like:
```rust
let a: &amp;[T];
let b: &amp;[T];
let eq = a.len() == b.len() &amp;&amp; a.iter().zip(b).all(|(a,b)| a == b)
```
with the much simpler `a.iter().eq(b)`, without losing the perf benefit of the different-length-fast-path.
Also dogfooded `Iterator::eq_by` (cc rust-lang/rust#64295 ) while I'm at it.

First commit (4d1b6fad230f8a5ccceccc7562eadc4ea50059da) should be very straightforward to review, second one (049a4606cb3906787aedf508ee8eea09c2bb3b9a) is slightly more creative, but IMHO a nice cleanup.
</content>
</entry>
<entry>
<title>Rollup merge of #146653 - jdonszelmann:empty-attr-diags, r=nnethercote</title>
<updated>2025-09-29T11:06:44+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-29T11:06:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cf07cce1fb79d9d9444fdf34a7c0c3b296a8be6f'/>
<id>urn:sha1:cf07cce1fb79d9d9444fdf34a7c0c3b296a8be6f</id>
<content type='text'>
improve diagnostics for empty attributes

Adds a note about them not having any effect. This was previously done for `feature` attributes but no other attributes. In [converting the `feature` parser](https://github.com/rust-lang/rust/pull/146652) I removed that note. This PR adds it back in and makes it so all attributes benefit from it.

Not blocked on rust-lang/rust#146652, either can merge first
</content>
</entry>
<entry>
<title>Use `Iterator::eq` and (dogfood) `eq_by` in compiler and library</title>
<updated>2025-09-29T05:08:05+00:00</updated>
<author>
<name>Yotam Ofek</name>
<email>yotam.ofek@gmail.com</email>
</author>
<published>2025-09-27T17:57:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=68a7c250788833305f73f816b284aafa9e62370a'/>
<id>urn:sha1:68a7c250788833305f73f816b284aafa9e62370a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #146037 - aapoalas:reborrow-lang-experiment, r=tmandry</title>
<updated>2025-09-27T19:25:56+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-27T19:25:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=01c17f83cf9c129e2d4d27cb432cd5039ea86779'/>
<id>urn:sha1:01c17f83cf9c129e2d4d27cb432cd5039ea86779</id>
<content type='text'>
Introduce CoerceShared lang item and trait, and basic Reborrow tests

Part of rust-lang/rust#145612: This introduces the `CoerceShared` trait which is the `Reborrow` equivalent of a `&amp;mut T` -&gt; `&amp;T` coercion. The trait has a `Target` GAT which makes this (currently) unique in the `core/src/marker.rs`; I'm not sure if this can be considered problematic. Maybe this is not the way such things should be done at the marker trait level? Or maybe it is fine.

Improtantly, this PR introduces a battery of basic `Reborrow` and `CoerceShared` tests. These test the very basics of the feature; custom marker types intended to have exclusive semantics (`Custom&lt;'a&gt;(PhantomData&lt;&amp;'a mut ()&gt;)`), custom exclusive reference wrappers, and standard library exclusive reference wrappers (`Pin&lt;&amp;mut T&gt;` and `Option&lt;&amp;mut T&gt;`). None of these of course work since the implementation for `Reborrow` and `CoerceShared` is entirely missing, but this is the first step towards making these work.

Future PRs will introduce more tests, such as "recursive" reborrowing (ie. reborrowing structs that contain multiple reborrowable fields) and checks around the lifetime semantics of reborrowing ie. that a reborrow produces a new type with the same lifetime as the original.
</content>
</entry>
<entry>
<title>improve empty attribute diagnostic</title>
<updated>2025-09-27T17:32:14+00:00</updated>
<author>
<name>Jana Dönszelmann</name>
<email>jana@donsz.nl</email>
</author>
<published>2025-09-16T18:52:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b3631e1174e222bf1dadf1549cfd0f717ebf6d64'/>
<id>urn:sha1:b3631e1174e222bf1dadf1549cfd0f717ebf6d64</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #146704 - jdonszelmann:port-debug-visualizer, r=petrochenkov</title>
<updated>2025-09-26T16:11:09+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-26T16:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d09bb02eb50c5b7137eb9a14f546540fa24083cf'/>
<id>urn:sha1:d09bb02eb50c5b7137eb9a14f546540fa24083cf</id>
<content type='text'>
port `#[debugger_visualizer]` to the new attribute system
</content>
</entry>
<entry>
<title>Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJung</title>
<updated>2025-09-25T10:31:53+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-25T10:31:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fab06469ee33664739620ede53ed18b8c3c40644'/>
<id>urn:sha1:fab06469ee33664739620ede53ed18b8c3c40644</id>
<content type='text'>
Add an attribute to check the number of lanes in a SIMD vector after monomorphization

Allows std::simd to drop the `LaneCount&lt;N&gt;: SupportedLaneCount` trait and maintain good error messages.

Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs.

r? ``@RalfJung``

cc ``@workingjubilee`` ``@programmerjake``
</content>
</entry>
<entry>
<title>Add an attribute to check the number of lanes in a SIMD vector after monomorphization</title>
<updated>2025-09-24T00:47:34+00:00</updated>
<author>
<name>Caleb Zulawski</name>
<email>caleb.zulawski@gmail.com</email>
</author>
<published>2025-09-16T06:23:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f5c6c9542ecfab74e654f9b7f1150d486560ae43'/>
<id>urn:sha1:f5c6c9542ecfab74e654f9b7f1150d486560ae43</id>
<content type='text'>
Unify zero-length and oversized SIMD errors
</content>
</entry>
</feed>
