<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_const_eval/src/interpret, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-10T12:17:38+00:00</updated>
<entry>
<title>Rollup merge of #146178 - folkertdev:static-align, r=jdonszelmann,ralfjung,traviscross</title>
<updated>2025-09-10T12:17:38+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-10T12:17:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=422c76adae98b55d13a07a8fb47d8bc47fa96fdf'/>
<id>urn:sha1:422c76adae98b55d13a07a8fb47d8bc47fa96fdf</id>
<content type='text'>
Implement `#[rustc_align_static(N)]` on `static`s

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

```rust
#![feature(static_align)]

#[rustc_align_static(64)]
static SO_ALIGNED: u64 = 0;
```

We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`.

r? `@traviscross`
</content>
</entry>
<entry>
<title>allow `#[rustc_align_static(N)]` on `static`s</title>
<updated>2025-09-09T19:54:54+00:00</updated>
<author>
<name>Folkert de Vries</name>
<email>folkert@folkertdev.nl</email>
</author>
<published>2025-06-07T20:56:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cbacd00f106778830803ad2e2364518f06ff9078'/>
<id>urn:sha1:cbacd00f106778830803ad2e2364518f06ff9078</id>
<content type='text'>
We need a different attribute than `rustc_align` because unstable attributes are
tied to their feature (we can't have two unstable features use the same
unstable attribute). Otherwise this uses all of the same infrastructure
as `#[rustc_align]`.
</content>
</entry>
<entry>
<title>Auto merge of #145717 - BoxyUwU:erase_regions_rename, r=lcnr</title>
<updated>2025-09-09T15:04:44+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-09-09T15:04:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=364da5d88d772fa40fb20353443595385443ac25'/>
<id>urn:sha1:364da5d88d772fa40fb20353443595385443ac25</id>
<content type='text'>
rename erase_regions to erase_and_anonymize_regions

I find it consistently confusing that `erase_regions` does more than replacing regions with `'erased`. it also makes some code look real goofy to be writing manual folders to erase regions with a comment saying "we cant use erase regions" :&gt; or code that re-calls erase_regions on types with regions already erased just to anonymize all the bound regions.

r? lcnr

idk how i feel about the name being almost twice as long now
</content>
</entry>
<entry>
<title>erase_regions to erase_and_anonymize_regions</title>
<updated>2025-09-09T12:49:16+00:00</updated>
<author>
<name>Boxy</name>
<email>rust@boxyuwu.dev</email>
</author>
<published>2025-08-21T15:50:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e379c7758667f900aaf5551c4553c7d4c121e3e1'/>
<id>urn:sha1:e379c7758667f900aaf5551c4553c7d4c121e3e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #146324 - RalfJung:no-ptr-fragment, r=oli-obk</title>
<updated>2025-09-09T04:35:05+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-09T04:35:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=915f9ff1602e6c8cf3b5ae29da58b932a91449c6'/>
<id>urn:sha1:915f9ff1602e6c8cf3b5ae29da58b932a91449c6</id>
<content type='text'>
const-eval: disable pointer fragment support

This fixes https://github.com/rust-lang/rust/issues/146291 by disabling pointer fragment support for const-eval. I want to properly fix this eventually, but won't get to it in the next few weeks, so this is an emergency patch to prevent the buggy implementation from landing on stable. The beta cutoff is on Sep 12th so if this PR lands after that, we'll need a backport.
</content>
</entry>
<entry>
<title>fixup limit handling code</title>
<updated>2025-09-08T22:07:12+00:00</updated>
<author>
<name>Jana Dönszelmann</name>
<email>jana@donsz.nl</email>
</author>
<published>2025-08-24T11:25:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6087d89004eda5e1f6406182b9866497ecb22e99'/>
<id>urn:sha1:6087d89004eda5e1f6406182b9866497ecb22e99</id>
<content type='text'>
</content>
</entry>
<entry>
<title>const-eval: disable pointer fragment support</title>
<updated>2025-09-08T11:22:52+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2025-09-08T08:40:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aed0ed4c93d661fc7b66dc4a39690948476e8a4a'/>
<id>urn:sha1:aed0ed4c93d661fc7b66dc4a39690948476e8a4a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>miri: also detect aliasing of in-place argument and return place</title>
<updated>2025-08-22T08:21:33+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2025-08-22T07:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=78bdd86c676a4e08849677c351591db3564d87e8'/>
<id>urn:sha1:78bdd86c676a4e08849677c351591db3564d87e8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #145585 - RalfJung:miri-inplace-arg-checks, r=compiler-errors</title>
<updated>2025-08-19T11:42:11+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>39484203+jieyouxu@users.noreply.github.com</email>
</author>
<published>2025-08-19T11:42:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5d37e8e707e74a0820e1171f200d45fd2b8fa13c'/>
<id>urn:sha1:5d37e8e707e74a0820e1171f200d45fd2b8fa13c</id>
<content type='text'>
Miri: fix handling of in-place argument and return place handling

This fixes two separate bugs (in two separate commits):
- If the return place is `_local` and not `*ptr`, we didn't always properly protect it if there were other pointers pointing to that return place.
- If two in-place arguments are *the same* local variable, we didn't always detect that aliasing.
</content>
</entry>
<entry>
<title>Rollup merge of #145306 - Stypox:tracing-misc, r=RalfJung</title>
<updated>2025-08-19T11:42:09+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>39484203+jieyouxu@users.noreply.github.com</email>
</author>
<published>2025-08-19T11:42:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ba20d77a444a7125a764e9d69024c6377023b45f'/>
<id>urn:sha1:ba20d77a444a7125a764e9d69024c6377023b45f</id>
<content type='text'>
Add tracing to various miscellaneous functions

This PR adds tracing to:
- `ty.fn_sig()`. There is only one place where `fn_sig` is called for real within `rustc_const_eval`. There are three other places where it's called, but one is inside `ConstCx::fn_sig` (which does not seem to be used anywhere), another is under `if cfg!(debug_assertions)`, and the last is within `call_main` and thus gets called only once.
- the two possible things `find_mir_or_eval_fn` can do: "emulate_foreign_item" and "load_mir"
- all calls to `Const.eval()` within the Miri or the `rustc_const_eval` codebase.
- a separate commit also fixes the style of some tracing macros

Those are all quite long-lived operations, that in total make up for 6-7% of the total time spent in the program. I found out about them by looking for long periods of time that were previously not traced at all, using this SQL query in ui.perfetto.dev:

```sql
with ordered as (select s1.*, row_number() over (order by s1.ts) as rn from slices as s1 where s1.parent_id is null and s1.dur &gt; 0 and s1.name != "frame" and s1.name != "step" and s1.name != "backtrace") select a.ts+a.dur as ts, b.ts-a.ts-a.dur as dur, a.id, a.track_id, a.category, a.depth, a.stack_id, a.parent_stack_id, a.parent_id, a.arg_set_id, a.thread_ts, a.thread_instruction_count, a.thread_instruction_delta, a.cat, a.slice_id, "empty" as name from ordered as a inner join ordered as b on a.rn=b.rn-1 /*where b.ts-a.ts-a.dur &gt; 5000*/ order by b.ts-a.ts-a.dur desc
```

&lt;details&gt;
&lt;summary&gt;How the table was obtained&lt;/summary&gt;

The above image was obtained in ui.perfetto.dev with the following SQL query after obtaining a trace file by running Miri on the following Rust code with `n=100`.

```sql
select "TOTAL PROGRAM DURATION" as name, count(*), max(ts + dur) as "sum(dur)", 100.0 as "%", null as "min(dur)", null as "max(dur)", null as "avg(dur)", null as "stddev(dur)" from slices union select "TOTAL OVER ALL SPANS (excluding events)" as name, count(*), sum(dur), cast(cast(sum(dur) as float) / (select max(ts + dur) from slices) * 1000 as int) / 10.0 as "%", min(dur), max(dur), cast(avg(dur) as int) as "avg(dur)", cast(sqrt(avg(dur*dur)-avg(dur)*avg(dur)) as int) as "stddev(dur)" from slices where parent_id is null and name != "frame" and name != "step" and dur &gt; 0 union select name, count(*), sum(dur), cast(cast(sum(dur) as float) / (select max(ts + dur) from slices) * 1000 as int) / 10.0 as "%", min(dur), max(dur), cast(avg(dur) as int) as "avg(dur)", cast(sqrt(avg(dur*dur)-avg(dur)*avg(dur)) as int) as "stddev(dur)" from slices where parent_id is null and name != "frame" and name != "step" group by name order by sum(dur) desc, count(*) desc
```

```rust
fn main() {
    let n: usize = std::env::args().nth(1).unwrap().parse().unwrap();
    let mut v = (0..n).into_iter().collect::&lt;Vec&lt;_&gt;&gt;();
    for i in &amp;mut v {
        *i += 1;
    }
}
```

&lt;/details&gt;

&lt;img width="1689" height="317" alt="image" src="https://github.com/user-attachments/assets/ee2c81f5-d74a-4da5-b4b6-ab2770175b14" /&gt;
</content>
</entry>
</feed>
