Commit Graph

339789 Commits

Author SHA1 Message Date
Jonathan Brouwer
84f09c7144 Rollup merge of #162541 - BoxyUwU:twos_a_crowd, r=khyperia
split `macroless_generic_const_args` in two

Two's a crowd! But One's a lonely.

Having `macroless_generic_const_args` apply to const items was quite annoying for users especially as we moved away from `type const` to just regular const items. We would quite commonly be "guessing wrong" with no easy way for users to opt out of `const ASSOC: usize = ...` being represented directly instead of an opaque body

I just swapped any failing tests over to using macroless_const_item_generic_const_args, didnt look through the whole set :>

We should probably bikeshed the feature name rn because it's currently inconsistent with what we wanted to rename all of the other gca features too :> Maybe this should be `gca_macroless_const_items`

cc rust-lang/rust#162540

r? khyperia
2026-09-11 12:45:06 +02:00
Jonathan Brouwer
5c8e527d22 Rollup merge of #162099 - mejrs:doc_values, r=JonathanBrouwer
small refactor of doc attribute arguments warnings
2026-09-11 12:45:05 +02:00
Jonathan Brouwer
57c92bc0ad Rollup merge of #161867 - cyrgani:builtin-macros-deeper-clean, r=adwinwhite
deeper `rustc_builtin_macros` cleanups

As a followup to rust-lang/rust#161464, this contains a few more surface cleanups and begins simplifying the mess that `SubstructureFields` currently is by removing the `StaticFields` type in favor of just using the `VariantData` directly.
2026-09-11 12:45:05 +02:00
Jonathan Brouwer
21e293ee24 Rollup merge of #161482 - obeis:check-non-exhaustive, r=JonathanBrouwer
Use attribute parser for `#[non_exhaustive]` attribute check

Updates rust-lang/rust#153101

r? @JonathanBrouwer
2026-09-11 12:45:04 +02:00
Jonathan Brouwer
9e9dc37b47 Rollup merge of #160860 - maxdexh:custom-mir-casts, r=oli-obk
Implement arbitrary casts in custom mir

[See zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/extending.20custom.20MIR/with/613727602)

Implement custom casts using an enum in `intrinsics::mir` that closely matches the `CastKind` enum in the compiler.

We have 5 different ways to cast in custom MIR, 3 with functions (which hard code a cast kind), 1 implicit coerce (which only does subtyping i think), 1 with `as` (which does a few more). They are all different and the error messages don't tell you what to do. Some are (i think) not possible at all.

This came up [while testing miri](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Valdity.20checks.20for.20references/near/613662285). We currently have to guess the casting syntax until we find the one that generates the MIR we want. This PR changes that by adding a custom mir operation that allows picking an arbitrary cast.

r? RalfJung
2026-09-11 12:45:03 +02:00
Jonathan Brouwer
7cd747decf Rollup merge of #160023 - antoyo:ssa-indirect-return, r=workingjubilee
Refactor the way cg_ssa handles indirect returns (returns via `sret`) — Take 2

This continues the work that @FractalFir done in rust-lang/rust#144976.

**I managed to make this work, so this confirms the original approach works and is ready to merge.**

r? workingjubilee

(assigning the same reviewer as the original PR)

# The problem

The current way `cg_ssa` handles `PassMode::Indirect` is fundamentally incompatible with the requirements of the GCC backend. This is currently worked around in a very brittle way, that breaks on ARM.

In order to function correctly, `cg_gcc` requires the `sret`(indirect return) pointer to be treated in a special way.

# The solution

This PR separates the `sret` pointer from all the other arguments, allowing each backend to decide how it wants to handle that pointer. This will allow GCC to do it's own thing, while changing nothing on the LLVM side. Currently, the PR just makes both backends preappend the sret arg, mimicking the previous behaviour.

The PR is based on this [zulip suggestion](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Bootstrap.20of.20rustc.20with.20rustc_codegen_gcc/near/526487725).

# Assumptions I made.

The PR makes certain assumptions about the ABI handling.

1. No LLVM intrinsic returns via sret. [According to my sources](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Can.20LLVM.20intrinsics.20return.20via.20PassMode.3A.3AIndirect.3F), this is always true.
2. Tail calls don't currently return via `sret`. From [asking about](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Can.20tail.20calls.20return.20indirectly.28via.20a.20pointer.29.3F/near/532984507), it seems like the tail call handling does not currently support indirect returns. So, I did not add support for that.
3. TLS shims don't perform indirect returns, and asserts and drops also don't perform indirect returns(since they return nothing) - those assumptions seemed reasonable.
4. Inline assembly calls don't use indirect returns. I *assumed* functions like `inline_asm_call` will not need the `sret` handling code. I am not 100% sure about this, tough.
2026-09-11 12:45:02 +02:00
Jonathan Brouwer
04b95472f1 Rollup merge of #154373 - chenyukang:yukang-fix-154247-unused-braces-temp-scope-lite, r=oli-obk
Skip linting unused braces for FunctionArg and MethodArg context for 2024 later

Fixes rust-lang/rust#154247

`unused_braces` is a AST level lint, but in Rust 2024 braces around function and method arguments can affect temporary drop scope.

I tried to find a more complete fix for it, but seems all too heavy, which involve AST visitor or need `hir` related stuff.

Instead of teaching this lint to reason about semantics, so it's better to stop linting those argument-position braces in 2024 later edition.
2026-09-11 12:45:01 +02:00
Jonathan Brouwer
70410fe0ac Rollup merge of #162520 - aerooneqq:hygiene-perf, r=petrochenkov
Refactor `HygieneEncodeContext`

Some refactorings around `HygieneEncodeContext` with minor perf improvements, the most notable thing is that `Lock`s were removed.

First part for rust-lang/rust#161450.

r? @petrochenkov
2026-09-11 12:45:00 +02:00
aerooneqq
69afc99f50 Refactor HygieneEncodeContext
* Refactor `HygieneEncodeContext`
* Review: remove comment outdated part
* Review: return `raw_encode_syntax_context` as a free function
* Review: small cleanups
* Review: add comment about expansions data `Option`
* Review: don't set explicit capacity
* Review: return `queued` -> `latest`
* Remove not needed changes
* Fix `Rc` cloning
* Return comment
2026-09-11 08:18:39 +00:00
yukang
ad8967754d Skip linting unused braces for FunctionArg and MethodArg context for 2024 edition 2026-09-11 15:43:52 +08:00
bors
ca0a6473ff Auto merge of #162625 - JonathanBrouwer:rollup-n0V8kc1, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#162223 (`-Znext-solver` : Abort on the first overflowed obligation in fulfillment)
 - rust-lang/rust#161654 (Eagerly report overflow errors in normalization query)
 - rust-lang/rust#162176 (Clean up some small things related to lint `ambiguous_glob_imported_traits`)
2026-09-11 07:13:44 +00:00
Jonathan Brouwer
65182f17ad Rollup merge of #162176 - fmease:clean-up-ambig-glob-imp-traits, r=adwinwhite
Clean up some small things related to lint `ambiguous_glob_imported_traits`

Cleaning up things I noticed in the vicinity while reviewing PR https://github.com/rust-lang/rust/pull/157968 (which concerns lint `ambiguous_glob_imported_traits` and feature `supertrait_item_shadowing`).

Namely,

1. turning two tuple struct variants into named ones to avoid "anonymous `bool`s"
2. fixing an inaccurate `supertrait_item_shadowing`-specific doc comment
3. applying the rules listed in our [Diagnostic output style guide](https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-output-style-guide) to the diagnostic of lint `ambiguous_glob_imported_traits`

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
2026-09-11 09:00:40 +02:00
Jonathan Brouwer
137500c964 Rollup merge of #161654 - adwinwhite:post-analysis-ice, r=lcnr
Eagerly report overflow errors in normalization query

Fixes https://github.com/rust-lang/rust/issues/161542

We still have rigid opaques in `TypingMode::PostAnalysis` after `PostAnalysisNormalize` pass because we ignore normalization errors in the [`PostAnalysisNormalize` pass](04a3cad16c/compiler/rustc_mir_transform/src/post_analysis_normalize.rs (L66)). We can't handle errors there as we don't have enough information to detect whether they're overflows.

This doesn't cause problems for the old solver because it eagerly emits overflow error in evaluation.
We try to do the same in the next solver.

I don't really know who to assign. Maybe r? @jdonszelmann
cc @lcnr
2026-09-11 09:00:39 +02:00
Jonathan Brouwer
6b55536bd3 Rollup merge of #162223 - adwinwhite:abort-on-fulfillment-overflow, r=lcnr
`-Znext-solver` : Abort on the first overflowed obligation in fulfillment

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/294 cc https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/handling.20overflow.20in.20fulfill/with/621040305

We used to drop all subsequent obligations when one obligation overflows in fulfillment. It means that we don't really prove all obligations even if fulfillment has no pending obligations and returns no error. We now eagerly abort on the first overflowed obligation.

r? @ShoyuVanilla
cc @lcnr
2026-09-11 09:00:38 +02:00
bors
a59b87ab99 Auto merge of #162622 - jhpratt:rollup-F7fv0Yu, r=jhpratt
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#162270 (Update `windows-bindgen` to 0.100.0)
 - rust-lang/rust#162492 (Revert "Rollup merge of rust-lang/rust#157518 - CAD97:xdg_basedir, r=aapoalas")
 - rust-lang/rust#162607 (Basic cleanup in `rustc_transmute`)
 - rust-lang/rust#162619 (Add test for the missing Clone requirement for Cow slices)
 - rust-lang/rust#162172 (mention the opaque when its hidden type cannot be inferred)
 - rust-lang/rust#162514 (Simplify diagnostic levels)
 - rust-lang/rust#162546 (Use lld by default on `loongarch64-unknown-linux-gnu` nightly)
 - rust-lang/rust#162564 (yeet StabilityLevel)
 - rust-lang/rust#162613 (iter::repeat_with, iter::successors, iter::from_fn added as diagnostic items)
 - rust-lang/rust#162616 (regression test for async main diagnostic)
2026-09-11 04:04:07 +00:00
Jacob Pratt
2eaa6012ac Rollup merge of #162616 - malezjaa:add-async-main-regression-test, r=chenyukang
regression test for async main diagnostic

Closes rust-lang/rust#78905
2026-09-11 00:03:14 -04:00
Jacob Pratt
ae7ebc8d39 Rollup merge of #162613 - voodookiidoo:add-iter-diagnostic-items, r=mejrs
iter::repeat_with, iter::successors, iter::from_fn added as diagnostic items

added iter::repeat_with, iter::successors, iter::from_fn as diagnostic items, in order for clippy to be able to register them and work with them. Link to clippy issue: https://github.com/rust-lang/rust-clippy/issues/17719
2026-09-11 00:03:13 -04:00
Jacob Pratt
e8a9e14d02 Rollup merge of #162564 - mejrs:yeet, r=chenyukang
yeet StabilityLevel

It is unused.
2026-09-11 00:03:12 -04:00
Jacob Pratt
b1baa4f7b9 Rollup merge of #162546 - heiher:loong64-gnu-lld-nightly, r=chenyukang
Use lld by default on `loongarch64-unknown-linux-gnu` nightly

This PR makes LLD the default linker for `loongarch64-unknown-linux-gnu` on nightly.

As a prerequisite, it aligns the LoongArch64 Linux `LOAD` segment layout of LLD and other GNU-compatible linkers with GNU ld. This keeps the layout consistent and allows Linux to make better use of file-backed PMD mappings.

The LLD default is initially limited to nightly to allow some soak time before rolling it out to beta and stable.

To opt out of using LLD, `RUSTFLAGS="-Clinker-features=-lld"` would be used. To opt out of using rust-lld, falling back to the LLD installed on the system, `RUSTFLAGS="-Clink-self-contained=-linker"` would be used.
2026-09-11 00:03:11 -04:00
Jacob Pratt
d971af8b59 Rollup merge of #162514 - nnethercote:simplify-diag-Levels, r=oli-obk
Simplify diagnostic levels

This PR separates diagnostic levels from subdiagnostic levels and does a few preliminary cleanups. Details in individual commits.

r? @oli-obk
2026-09-11 00:03:10 -04:00
Jacob Pratt
8abb416b29 Rollup merge of #162172 - Albab-Hasan:opaque-hidden-type-inference-note, r=chenyukang
mention the opaque when its hidden type cannot be inferred

when the hidden type of an opaque was never constrained, typeck reported `E0282` with only the shared cannot infer type label. nothing in the output said an opaque was involved, so the error read like an ordinary local inference failure.

the unconstrained hidden type arm now adds a note naming the opaque as the source of the ambiguity.

fixes https://github.com/rust-lang/rust/issues/146231

r? @lcnr
2026-09-11 00:03:09 -04:00
Jacob Pratt
0180298a84 Rollup merge of #162619 - chenyukang:yukang-fix-141241-cow-clone-diagnostic-test, r=jieyouxu
Add test for the missing Clone requirement for Cow slices

Fixes rust-lang/rust#141241
2026-09-11 00:03:08 -04:00
Jacob Pratt
8021397858 Rollup merge of #162607 - joshlf:transmute-cleanup, r=jswrenn
Basic cleanup in `rustc_transmute`

The content of this PR was authored by an LLM.

r? @jswrenn
2026-09-11 00:03:07 -04:00
Jacob Pratt
6036ee7658 Rollup merge of #162492 - CAD97:rm-xdg, r=ChrisDenton
Revert "Rollup merge of #157518 - CAD97:xdg_basedir, r=aapoalas"

This reverts commit ac8006482d, reversing changes made to 8d6b38095e.

<!-- homu-ignore:start -->

- https://github.com/rust-lang/rust/issues/157515 is superseded
- This includes just the revert that's the first commit in https://github.com/rust-lang/rust/pull/158936
2026-09-11 00:03:06 -04:00
Jacob Pratt
4e1c7f9f55 Rollup merge of #162270 - ChrisDenton:winagain, r=clarfonthey
Update `windows-bindgen` to 0.100.0

This release represents a major change in the way bindings are generated. See https://github.com/microsoft/windows-rs/issues/4867 for details.

In short, it now more directly follows the C headers. For the standard library's purposes this is mostly reflected in relatively minor type changes or with some `const` pointers becoming `mut`.

There is however one big change that affects a lot of types. In the headers there are a lot of `#define`s like this:

```c
#define GENERIC_READ                     (0x80000000L)
#define GENERIC_WRITE                    (0x40000000L)
```

These are constants for the access mode. In this case they're explicitly declared as `L` (aka signed long) integer types (in other cases there's no type at all). However, this conflicts with how access mode constants are actually used. E.g., see `CreateFileW`:

```c
WINBASEAPI
HANDLE
WINAPI
CreateFileW(
    _In_ LPCWSTR lpFileName,
    _In_ DWORD dwDesiredAccess,
    _In_ DWORD dwShareMode,
    _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
    _In_ DWORD dwCreationDisposition,
    _In_ DWORD dwFlagsAndAttributes,
    _In_opt_ HANDLE hTemplateFile
    );
```

Here `dwDesiredAccess` is a `DWORD`, which in rust equates to `u32`. The constant being signed but the usage being unsigned is not a problem for C/C++. They will happily convert between types at the drop of a hat. Rust however is stricter, as you know.

The old metadata used by `windows-bindgen` tried to try to fixup this mismatch but the new one goes strictly by what can be inferred from the headers.  The hope in the future is that the headers themselves will be updated so better bindings can be directly derived from them.
2026-09-11 00:03:06 -04:00
Adwin White
96536dddaa eagerly report overflow errors 2026-09-11 10:01:10 +08:00
malezjaa
01fd255335 regression test for async main diagnostic 2026-09-11 00:19:01 +02:00
Артём
98d3e1bd32 Update library/core/src/iter/sources/repeat_with.rs
item_name fix

Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
2026-09-11 02:39:00 +05:00
Chris Denton
d45c710149 Remove unnecessary manual bindings
Mingw used to have an incorrect import library for the synchronization functions `WaitOnAddress`, `WakeByAddressSingle` and `WakeByAddressAll`. This was fixed a long time ago and our windows-gnu targets require a much newer mingw in any case.
2026-09-10 21:24:00 +00:00
Chris Denton
fc4de336c5 Use new windows bindings 2026-09-10 21:23:52 +00:00
bors
9e9544da4c Auto merge of #162612 - JonathanBrouwer:rollup-Ma0hPul, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#161334 (Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list)
 - rust-lang/rust#162346 (rustdoc: add missing CCI union logic)
 - rust-lang/rust#162273 (doc: replace `exceeding_bitshifts` with `arithmetic_overflow`)
 - rust-lang/rust#162539 (Update wasip2/wasip3 libstd crate dependencies)
 - rust-lang/rust#162542 (Gate ELF code in metadata.rs for ELF only)
 - rust-lang/rust#162604 (Update windows-gnu support docs)
2026-09-10 21:17:34 +00:00
voodookiidoo
23b52a6a18 iter::from_fn added as diagnostic items (requiered for clippy analysis) 2026-09-11 02:00:34 +05:00
Nicholas Nethercote
6331ab69b4 Introduce Sublevel for errors
Currently `Level` is used for both diagnostics and subdiagnostics. But
both diagnostics and subdiagnostics only use some of the levels. This
commit introduces `Sublevel` to tighten up the representation and
prevent impossible combinations.
2026-09-11 06:46:46 +10:00
Nicholas Nethercote
a956ff03c6 Tweak a use item
Use the `FatalError` re-export from `rustc_errors` instead of
`rustc_span`, because that's what's normally done.
2026-09-11 06:44:47 +10:00
Nicholas Nethercote
996ef5d739 Replace a format_diag_messages use
When there's a single message, `format_diag_message` suffices.
2026-09-11 06:41:29 +10:00
Nicholas Nethercote
025e029824 Reduce unnecessary Cow use in error formatting
`format_diag_messages` always constructs a `String`, so it can just
return that. This simplifies various call sites.
2026-09-11 06:41:29 +10:00
Nicholas Nethercote
63fddb3657 Remove Style::HeaderMsg
It has a single use, where it is passed in to `format_diag_messages`
which then discards it. So that use can be replaced with
`Style::NoStyle`.
2026-09-11 06:41:29 +10:00
Nicholas Nethercote
7bc87d508d Remove most Style variants
These are dead since the old emitter was removed in Jan 2026
(3ccabc6a8d).

Also removed: `BRIGHT_BLUE`, `Level::color`, and a couple of `level`
fn parameters.
2026-09-11 06:41:29 +10:00
voodookiidoo
b760816070 iter::repeate_with and iter::successors added as diagnostic items (requiered for clippy analysis) 2026-09-11 01:37:53 +05:00
Jonathan Brouwer
013f1e3eaf Rollup merge of #162604 - mati865:update-windows-gnu-docs, r=hanna-kruppe
Update windows-gnu support docs

Followup to rust-lang/rust#161681.
2026-09-10 22:34:01 +02:00
Jonathan Brouwer
3532a4cefb Rollup merge of #162542 - xingxue-ibm:gate-elf-code-for-elf, r=khyperia
Gate ELF code in metadata.rs for ELF only

This PR gates ELF specific code for `BinaryFormat::Elf`. With this change, fallback for PowerPC64 on AIX is no longer needed.

---------

Assisted-by: IBM Bob
The issue was discovered by IBM Bob while checking changes for other things, and I personally verified the bug. Although the fix is trivial, I ran it through IBM Bob to make sure I wasn’t missing anything.
2026-09-10 22:34:00 +02:00
Jonathan Brouwer
02056c6f40 Rollup merge of #162539 - alexcrichton:update-wit-bindgen-deps, r=ChrisDenton
Update wasip2/wasip3 libstd crate dependencies

Picks up the latest version of the `wit-bindgen` dependency which has improved compatibility for `wasm32-wasip3`.
2026-09-10 22:33:59 +02:00
Jonathan Brouwer
9de53713ae Rollup merge of #162273 - chiang03:main, r=Enselic
doc: replace `exceeding_bitshifts` with `arithmetic_overflow`

lint `exceeding_bitshifts` has been merged into `arithmetic_overflow` in PR rust-lang/rust#69185
2026-09-10 22:33:58 +02:00
Jonathan Brouwer
19f7664b1c Rollup merge of #162346 - notriddle:rustdoc-merge-type, r=lolbinarycat,GuillaumeGomez
rustdoc: add missing CCI union logic

This fixes a bug that was found where `PathBuf` didn't show up in the standard library search results, because the crate that defined it (libstd) was merged into a crate that already had a path entry in its search index (libproc_macro).

Fixes https://github.com/rust-lang/rust/issues/162334
2026-09-10 22:33:57 +02:00
Jonathan Brouwer
83e0995a64 Rollup merge of #161334 - jethrogb:fix-sgx-unsafe-list, r=nia-e
Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list

Replace invalid uses of references in `std::sys::pal::sgx::waitqueue::unsafe_list` internals with raw pointers. I tried to keep the code structure the same as much as possible. In addition to the use of references flagged in the original issue, it turns out the head/tail (raw) pointer stored in the linked list caused provenance issues in miri. Switched to using UnsafePinned for that.

PR organization:
* Commit 1: Main soundness fix.
* Commit 2: Use pinning in the `pub(crate)` API for UnsafeList. This code predates pinning in Rust. I believe this change isn't strictly necessary as I believe it's valid to document pinning requirements in the unsafe methods on UnsafeList. However, I felt it's better to be explicit about this now that pinning is available in the language.
* Commit 3: Move UnsafeList to a platform-agnostic location so miri can be run on the test suite. This also adds some tests.

This PR was developed with Claude Fable 5 through extensive interactive use, where I directed a detailed plan for making the changes needed for this fix. My input includes keeping the structure the same and the new internal abstraction for dealing with raw pointers. I'm not familiar with miri, I used Claude to test the changes with miri. It said the test suite was failing before the changes (both stacked borrows and tree borrows) but passing after. The additional tests developed this way have been added in the third commit. The head/tail pointer provenance issue was found with Claude. I thoroughly reviewed all the code, including comments, and made manual changes/deletions where necessary/appropriate. The PR description was written by me.

r? @nia-e

Fixes rust-lang/rust#114581
Fixes rust-lang/rust#160603
Fixes rust-lang/rust#161060
Supersedes rust-lang/rust#160641
2026-09-10 22:33:56 +02:00
Boxy Uwu
15d08109c4 split macroless_generic_const_args in two 2026-09-10 19:47:14 +01:00
Mateusz Mikuła
6d92da7642 Update windows-gnu support docs 2026-09-10 20:46:58 +02:00
bors
67eda617e6 Auto merge of #162531 - khyperia:abby-perf, r=BoxyUwU
fix perf regression from abby canonical form



https://github.com/rust-lang/rust/pull/161306 regressed performance on stable

I believe all the perf impact is due to this

d8df82673d/compiler/rustc_infer/src/infer/mod.rs (L186)

before, `SolverRegionConstraintStorage` was a dummy simple thing, no allocations.

now, it's a `RegionConstraint { and: Box([]), or: Box([Box([])]) }`

the majority of the perf impact (70%ish I think) is because the compiler is not sufficiently smart to optimize `And::new([])` into `And(Box::new([]))` (the former does a bunch of `IndexSet` allocations and stuff, the latter is a no-op, just a nullptr plus zero length metadata)

the the rest of the perf impact (30%ish) is due to the `or` case allocating the `Box([Box([])])`, it's not just a nullptr+zero

options to fix:

- option A: just fix the `And::new([])` being terrible
- option B: option A, *and also*, `SolverRegionConstraintStorage` stores an `Option` that is lazily init on first access, to prevent the perf hit from the `or` case
- option C: option A, *and also*, use some kind of `SmallVec` something or other to make the `or` case be zero-alloc. I have not profiled this due to it being an invasive change and effort, this might not actually fix the perf.

This PR is out option A to see if it actually works with the full perf machinery with PGO and whatnot instead of just on my machine (I am very inexperienced with perf testing!). It might be the case that full PGO blah blah *is* actually sufficiently smart to optimize `And::new([])`, and the actual perf diff is due to the `or` case (which I'm calling the 30%ish impact, might be actually 100%), in which case this PR should produce a no-op perf diff.

r? @BoxyUwU
2026-09-10 18:07:46 +00:00
Max Dexheimer
676862daf6 Add extra linebreak to weird test 2026-09-10 18:00:40 +02:00
Max Dexheimer
225a061aa5 Implement arbitrary casts in custom mir 2026-09-10 17:56:57 +02:00