Commit Graph

330935 Commits

Author SHA1 Message Date
Arnav Singh
121f01b133 Fix rustc --unpretty=expanded emit of [const] [unsafe] impl Trait for 2026-06-29 21:26:00 -07:00
bors
096694416a Auto merge of #158035 - LorrensP-2158466:import-cycle-det, r=petrochenkov
resolve: Explicit Set for detecting resolution cycles



Instead of using the `borrow_mut` counter of a `RefCell` for a `NameResolution` for detecting cyclic imports during import resolution, we use an explicit recursion stack that keeps track of the current used `NameResolution`s.

Because of the upcoming parallelisation of the import resolution algorithm, the current way cannot used in a parallel context.


r? @petrochenkov
2026-06-29 18:35:05 +00:00
LorrensP-2158466
3056b8e4ec Use an explicit set to detect resolution cycles instead of try_borrow_mut on RefCell<NameResolution>.
Use a TLS for this set ahead of parallel import resolution.
2026-06-29 16:59:28 +02:00
bors
7dc2c162b9 Auto merge of #146275 - niacdoial:improperctypes-refactor3, r=jdonszelmann
lint ImproperCTypes: refactor linting architecture (part 3)



This is the third PR in an effort to split https://github.com/rust-lang/rust/pull/134697 (refactor plus overhaul of the ImproperCTypes family of lints) into individually-mergeable parts.

Contains:
- the changes of the first two PRs
- other user-invisible changes,
- the prevention of stack overflows while checking irregular recursive types.

Fixes: https://github.com/rust-lang/rust/issues/130310
Superset of: https://github.com/rust-lang/rust/pull/146271 and its superset rust-lang/rust#146273
2026-06-29 09:55:40 +00:00
bors
63f05e3635 Auto merge of #158477 - theemathas:del-dyn-compat-check, r=oli-obk
Remove redundant dyn-compatibility check.

This check is already handled in [`rustc_trait_selection::traits::fulfill::FulfillProcessor::process_obligation`](16761606d6/compiler/rustc_trait_selection/src/traits/fulfill.rs (L524)).

r? types
2026-06-29 06:27:25 +00:00
bors
7fb284d903 Auto merge of #155625 - bushrat011899:core_io_error, r=Mark-Simulacrum
Move `std::io::Error` into `core`





ACP: https://github.com/rust-lang/libs-team/issues/755
Tracking issue: https://github.com/rust-lang/rust/issues/154046
Related: https://github.com/rust-lang/rust/pull/155574
Related: https://github.com/rust-lang/rust/pull/152918

## Description

Moves `std::io::Error` into `core`, deferring `Box`-adjacent methods to incoherent implementations in `alloc`, and `RawOsError` methods to `std`. This requires some substantial changes to the internals of `Error`, but none of them are breaking changes or externally visible.

Notably, I've replaced usage of `Box` with a wrapper around a pointer and an appropriate drop function. This requires the addition of quite a few lines of unsafe, but is required to work around `Box` only being accessible from `alloc`. Additionally, an atomic pointer to a VTable is used for working with `RawOsError` in `core`, since we cannot know the required implementations without `std`.

As mention in [this comment](https://github.com/rust-lang/rust/pull/155625#issuecomment-4744932682), there may be concern around having a static `AtomicPtr` in `core` for certain users. I've added a configuration option `no_io_statics` which (similar to `no_sync`/etc. in `alloc`) can be used to prevent their inclusion in `core`. When active, the fallback default implementation will always be used.

---

## Notes

* This PR adopts the VTable technique from rust-lang/rust#152918
* This PR builds on my previous PR rust-lang/rust#155574
* No AI tooling of any kind was used during the creation of this PR.
2026-06-29 00:40:20 +00:00
Zac Harrold
3fa872ca79 Increase wasm-panic-small byte limit by 5,000 bytes
Previous limit of 40,000 is now broken by 2,281 bytes.
2026-06-29 09:26:46 +10:00
bors
df6ee909ef Auto merge of #158529 - JonathanBrouwer:rollup-rnUjpna, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#156419 (Update itertools to 0.15)
 - rust-lang/rust#146561 (Change `Location<'_>` lifetime to `'static` in `Panic[Hook]Info`)
2026-06-28 19:23:00 +00:00
Jonathan Brouwer
6b1bbf97e8 Rollup merge of #146561 - ijchen:panic_location_static, r=Mark-Simulacrum
Change `Location<'_>` lifetime to `'static` in `Panic[Hook]Info`

I'm writing a library that would benefit from being able to store a `&'static str` instead of a `String` for the file location of a panic. Currently, the API of [`std::panic::PanicHookInfo::location`](https://doc.rust-lang.org/nightly/std/panic/struct.PanicHookInfo.html#method.location) and [`core::panic::PanicInfo::location`](https://doc.rust-lang.org/nightly/core/panic/struct.PanicInfo.html#method.location) return a `Location<'_>` (and by extension, a file name `&str`) whose lifetime is tied to the borrow of the `Panic[Hook]Info`.

It is my understanding that the `Location`/`&str` will always be `Location<'static>`/`&'static str`, since the file name is embedded directly into the compiled binary (and I don't see a likely reason/way for that to ever change in the future). Since it seems unlikely to ever need to change, and since making the guarantee that the returned lifetime is `'static` has a real benefit (allows users to avoid unnecessary allocations), I think changing to the returned `Location<'_>`'s lifetime to `'static` would be a worthwhile change.

see also the recent [#1320870](https://github.com/rust-lang/rust/pull/132087), which made a similar change to [`std::panic::Location`](https://doc.rust-lang.org/nightly/std/panic/struct.Location.html)
2026-06-28 20:45:50 +02:00
Jonathan Brouwer
42d784a0c4 Rollup merge of #156419 - jakubadamw:update-itertools-to-0.15, r=Mark-Simulacrum
Update itertools to 0.15

This bumps the itertools dependency to [0.15](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md#0150).

There’s a breaking change upstream in the shape of `itertools::Position`, so this updates the use sites of it as well, aside from submodules like clippy, which will be handled [separately](https://github.com/rust-lang/rust-clippy/pull/16805).
2026-06-28 20:45:49 +02:00
bors
2574810b22 Auto merge of #158524 - JonathanBrouwer:rollup-75ZlceV, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#158486 (std: treat ENFILE as transient in the pidfd support probe)
 - rust-lang/rust#158454 (regression test for `Trait<A><B>` in "consider further restricting this bound" suggestion)
 - rust-lang/rust#158518 (Fix mixed use of "a" / "an" article in E0277)
 - rust-lang/rust#158519 (add crashtests [2/N])
2026-06-28 15:52:45 +00:00
Jonathan Brouwer
412fd6b75b Rollup merge of #158519 - cyrgani:testing-2, r=Kivooeo
add crashtests [2/N]

Followup to rust-lang/rust#158290.
2026-06-28 15:51:39 +02:00
Jonathan Brouwer
5a890e9131 Rollup merge of #158518 - ElectrifyPro:20777-thing, r=JonathanBrouwer
Fix mixed use of "a" / "an" article in E0277

This PR fixes a tiny little annoyance typo in error E0277. Currently, this code fails to compile (correctly) with the following error:

```rs
struct A<F: Fn()>(F);

impl<F> A<F> {}

fn main() {}
```

```rs
error[E0277]: expected a `Fn()` closure, found `F`
 --> src/main.rs:3:9
  |
3 | impl<F> A<F> {}
  |         ^^^^ expected an `Fn()` closure, found `F`
  |
  = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }`
... truncated
```

Unfortunately, the first line of the error message uses the article "a", when it should be "an" for the `Fn` trait and friends. The help label does use the correct article, "an".

Unless if I have been pronouncing `Fn` incorrectly...
2026-06-28 15:51:39 +02:00
Jonathan Brouwer
acdfef55cc Rollup merge of #158454 - Albab-Hasan:fix-restrict-bound-double-angle, r=folkertdev
regression test for `Trait<A><B>` in "consider further restricting this bound" suggestion

when a bound already has generic args (e.g. `impl Pair<Left = A>`) the "consider further restricting this bound" suggestion would generate invalid syntax by appending a new `<Right = B>` producing `Pair<Left = A><Right = B>`.

the fix detects when the insertion point immediately follows a `>` and merges into the existing arg list instead producing the valid `Pair<Left = A, Right = B>`.

fixes https://github.com/rust-lang/rust/issues/142803
2026-06-28 15:51:38 +02:00
Jonathan Brouwer
0cc2ff89ab Rollup merge of #158486 - valentynkit:pidfd-enfile-transient, r=joboet
std: treat ENFILE as transient in the pidfd support probe

The pidfd support probe special-cases `EMFILE` from `pidfd_open`: it returns the
error without caching anything, so the next spawn re-probes. `ENFILE` falls
through instead, into the fallback arm, so the probe caches pidfd as unsupported
for the rest of the process, even after descriptors free up.

Both errnos come from the same `pidfd_open` call and mean the same thing: the
process is out of file descriptors, just per-process (`EMFILE`) vs system-wide
(`ENFILE`). I don't see a reason to treat them differently here, so this handles
`ENFILE` the same way:

```rust
Err(e) if matches!(e.raw_os_error(), Some(libc::EMFILE | libc::ENFILE)) => {
```

I kept the raw `raw_os_error()` check rather than `ErrorKind::TooManyOpenFiles`
(rust-lang/rust#158326, which maps both) to match the rest of this probe, but can switch if
you'd prefer.

I didn't add a test, since triggering it needs real fd exhaustion during the
probe, which isn't practical to reproduce. The `EMFILE` arm isn't tested either.

r? libs
2026-06-28 15:51:38 +02:00
bors
b4486cacf5 Auto merge of #157575 - hanna-kruppe:merge-strict-provenance-lints, r=RalfJung
Merge and reframe strict_provenance_lints

There does not seem to be any good reason to have separate lints for ptr2int and int2ptr casts. The main reason to enable this lint is to help with replacing `as` casts with strict provenance APIs (if possible) or explicit provenance APIs (when needed). That applies equally to both directions.

Merging the lints requires coming up with new name and lint explanation. This is a good chance to reconsider the purpose and messaging of the lints which have been essentially unchanged since the early days of the "strict provenance experiment". For reasons described below, I called the merged lint `implicit_provenance_casts`, rewrote its explanation from scratch, and made some changes to diagnostics.

First, the lint is not (only) about strict provenance any more. While strict provenance is often the best fix, migrating `as` casts to exposed provenance APIs also silences the lint. The exposed provenance APIs aren't any better for Miri and CHERI, but at least provenance considerations are made *explicit*, not picked up as side effect of the `as` keyword. (Banning use of exposed provenance APIs can be done with clippy's existing `disallowed_methods` lint.)

Second, provenance is now officially part of the language and prominently explained in the `std::ptr` documentation. The new lint refers to those docs and is more consistent with them.

Third, while strict provenance is encouraged whenever possible, exposed provenance is also part of the language and here to stay. Indeed, if we eventually enable the lint by default and make it `cargo fix`-able to keep the ecosystem migration manageable, we may want to suggest exposed provenance APIs to err on the side of not introducing UB. Thus, I made the diagnostics more neutral and descriptive. I've kept the suggestions that introduce strict provenance APIs, but we may want to reconsider this later.



Tracking issue: rust-lang/rust#130351
2026-06-28 11:10:25 +00:00
cyrgani
e87b27518f add crashtests 2026-06-28 09:39:21 +00:00
Tam Pham
fd6762120b Bless ui test runners 2026-06-28 03:56:28 -05:00
Tam Pham
b140addbd5 Bless ui tests 2026-06-28 03:48:49 -05:00
Tam Pham
f96764a5e1 Fix a / an typo in E0277 2026-06-28 03:44:45 -05:00
Hanna Kruppe
3d31306f1d Merge and reframe strict_provenance_lints 2026-06-28 10:27:32 +02:00
Valentyn Kit
77e396d08d std: treat ENOMEM as transient in the pidfd support probe 2026-06-28 11:10:47 +03:00
bors
1182320955 Auto merge of #158457 - devnexen:xous_ipv6_fix, r=joboet
std: fix xous dns ipv6 parsing off-by-one

the ipv6 arm read the 16-byte address from offset+1 instead of offset, unlike the ipv4 arm. this mis-parsed every ipv6 result and let the slice reach offset+17 while the bounds check only guards offset+16, so a malformed dns response could index past the 4096-byte buffer and panic.
2026-06-28 08:01:34 +00:00
bors
fd07dbfc91 Auto merge of #158508 - jhpratt:rollup-FKOfwV9, r=jhpratt
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#158497 (stdarch subtree update)
 - rust-lang/rust#152225 (Add supertrait item shadowing for type-level path resolution)
 - rust-lang/rust#158194 (Adds RmetaLinkCache a per-link cache that uses path as the key of dec…)
 - rust-lang/rust#158466 (rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs)
 - rust-lang/rust#158501 (miri subtree update)
 - rust-lang/rust#153097 (Expand `OptionFlatten`'s iterator methods)
 - rust-lang/rust#157614 (Move tests drop)
 - rust-lang/rust#157996 (perf: drop the full-crate AST walk in check_unused)
 - rust-lang/rust#158163 (Fix too-short variance slice in `variances_of` cycle recovery)
 - rust-lang/rust#158233 (Allow the unstable attribute on foreign type)
 - rust-lang/rust#158433 (Fix inconsistent safety requirement in VecDeque::nonoverlapping_ranges)
 - rust-lang/rust#158464 (Reorganize `tests/ui/issues` [15/N])
 - rust-lang/rust#158470 (Upgrade `jsonsocck` and `jsondoclint` to edition 2024.)
 - rust-lang/rust#158485 (Reorganize `tests/ui/issues` [16/N])
 - rust-lang/rust#158488 (Upgrade `rustdoc-json-types` to 2024 edition.)
2026-06-28 02:37:46 +00:00
Jacob Pratt
2f26f3a0be Rollup merge of #158488 - obi1kenobi:pg/upgrade-rustdoc-json-types-edition, r=GuillaumeGomez
Upgrade `rustdoc-json-types` to 2024 edition.

No code changes were necessary to perform the upgrade. I used `cargo fix --edition`, and additionally had an AI tool review the source code against the [Rust 2024 edition guide](https://github.com/rust-lang/edition-guide/tree/master/src/rust-2024) and the [edition upgrade guide](https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html) to ensure the change works properly.

Same approach as in rust-lang/rust#158470.

I don't believe this will raise the MSRV of `rustdoc-types`, because [its MSRV is already 1.85](https://crates.io/crates/rustdoc-types) which [supports the 2024 edition](https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/).

r? @GuillaumeGomez

**AI disclosure:** This PR is the product of a combination of manual work and AI tools. I secured approval in advance from the designated reviewer. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better compared to if I had written every line by my own hand.
2026-06-27 22:13:55 -04:00
Jacob Pratt
8981bcf094 Rollup merge of #158485 - zedddie:gsoc-batch-16-meow, r=Teapot4195,Kivooeo
Reorganize `tests/ui/issues` [16/N]

Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues)

Also moved one test from `span/` as it is part of `28498`

r? Kivooeo
@Teapot4195
2026-06-27 22:13:54 -04:00
Jacob Pratt
f1313c1a43 Rollup merge of #158470 - obi1kenobi:pg/upgrade-json-tool-editions, r=GuillaumeGomez
Upgrade `jsonsocck` and `jsondoclint` to edition 2024.

No code changes were necessary to perform the upgrade. I used `cargo fix --edition`, and additionally had an AI tool review the source code against the [Rust 2024 edition guide](https://github.com/rust-lang/edition-guide/tree/master/src/rust-2024) and the [edition upgrade guide](https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html) to ensure the change works properly.

r? @GuillaumeGomez

**AI disclosure:** This PR is the product of a combination of manual work and AI tools. I secured approval in advance from the designated reviewer. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better compared to if I had written every line by my own hand.
2026-06-27 22:13:53 -04:00
Jacob Pratt
2e43e58370 Rollup merge of #158464 - zedddie:gsoc-batch-15-meow, r=Kivooeo
Reorganize `tests/ui/issues` [15/N]

Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues)

r? Kivooeo
@Teapot4195
2026-06-27 22:13:53 -04:00
Jacob Pratt
d78d87a39e Rollup merge of #158433 - yilin0518:fix_nonoverlapping_ranges, r=jhpratt
Fix inconsistent safety requirement in VecDeque::nonoverlapping_ranges

The safety documentation of `nonoverlapping_ranges` says that its `head` argument must be in bounds:

```rust
    /// Get source, destination and count (like the arguments to [`ptr::copy_nonoverlapping`])
    /// for copying `count` values from index `src` to index `dst`.
    /// One of the ranges can wrap around the physical buffer, for this reason 2 triples are returned.
    ///
    /// Use of the word "ranges" specifically refers to `src..src + count` and `dst..dst + count`.
    ///
    /// # Safety
    ///
    /// - Ranges must not overlap: `src.abs_diff(dst) >= count`.
    /// - Ranges must be in bounds of the logical buffer: `src + count <= self.capacity()` and `dst + count <= self.capacity()`.
    /// - `head` must be in bounds: `head < self.capacity()`.
    #[cfg(not(no_global_oom_handling))]
    unsafe fn nonoverlapping_ranges(
        &mut self,
        src: usize,
        dst: usize,
        count: usize,
        head: usize,
    ) -> [(*const T, *mut T, usize); 2] {
```

However, this is slightly stricter than the `VecDeque` internal invariant for `head`. The struct-level invariant allows `head == 0` when the buffer capacity is zero:

```rust
pub struct VecDeque<
    T,
    #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
> {
    // `self[0]`, if it exists, is `buf[head]`.
    // `head < buf.capacity()`, unless `buf.capacity() == 0` when `head == 0`.
    head: WrappedIndex,
    // the number of initialized elements, starting from the one at `head` and potentially wrapping around.
    // if `len == 0`, the exact value of `head` is unimportant.
    // if `T` is zero-Sized, then `self.len <= usize::MAX`, otherwise `self.len <= isize::MAX as usize`.
    len: usize,
    buf: RawVec<T, A>,
}
```
This zero-capacity case is reachable through the public API. I create the corresponding case in [Rustplayground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=c1632f2a9170264c3ae50f6c229027db). This case can run without UB, also Miri runs successfully.

So it seems that the safety documentation of `VecDeque::nonoverlapping_ranges` is incorrect, or this API should add additional processing to approach this condition. This PR provides the minimal fix: updates the safety documentation for `nonoverlapping_ranges` to match the existing VecDeque invariant.

If needed, I can add a debug_assert! to check whether the input satisfies the requirement.

No behavior is changed.
2026-06-27 22:13:52 -04:00
Jacob Pratt
dc0e276d1e Rollup merge of #158233 - kantnero:allow-unstable-attr-on-target, r=JonathanBrouwer
Allow the unstable attribute on foreign type

While working the `FnPtr` trait in rust-lang/rust#156176 @carbotaniuman was trying to implement `Code` as an extern type but got an error as the current stability infrastructure does not allow `unstable` attribute on foreign type.  rust-lang/rust#158200

This PR fixes that by allowing the `unstable` attribute on ForeignTy  and adds test to verify.

@rustbot r? @JonathanBrouwer
2026-06-27 22:13:50 -04:00
Jacob Pratt
c997ea45be Rollup merge of #158163 - xmakro:fix-variances-cycle-recovery-count, r=petrochenkov
Fix too-short variance slice in `variances_of` cycle recovery

This changes the cycle-error fallback in `variances_of` to size the slice the same way the provider does in [`variance/solve.rs:117`](32ea3615cc/compiler/rustc_hir_analysis/src/variance/solve.rs (L117)).

This can otherwise ICE under the parallel frontend in `relate_args_with_variances` for items that inherit their generics from a parent (like a tuple struct constructor). See https://github.com/rust-lang/rust/issues/154560#issuecomment-4749155547
2026-06-27 22:13:50 -04:00
Jacob Pratt
f117ef7b1f Rollup merge of #157996 - xmakro:perf/projcache-entry-probe, r=nnethercote,Kivooeo
perf: drop the full-crate AST walk in check_unused
2026-06-27 22:13:49 -04:00
Jacob Pratt
1feba18d62 Rollup merge of #157614 - danieljofficial:move-tests-drop, r=Kivooeo
Move tests drop

Hi, moved some tests for drop and the dropck, part of rust-lang/rust#133895
r? @Kivooeo
2026-06-27 22:13:48 -04:00
Jacob Pratt
899a154aab Rollup merge of #153097 - cuviper:expand-into_flat_iter, r=joboet
Expand `OptionFlatten`'s iterator methods

If someone considers moving from `option.into_iter().flatten()` to
`option.into_flat_iter()`, it may be important for performance that this
iterator "specializes" methods the same way `Flatten` does, especially
forwarding to underlying `fold`, etc.
2026-06-27 22:13:48 -04:00
Jacob Pratt
a1968bf18a Rollup merge of #158501 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to 97eec7cf0c.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-06-27 22:13:47 -04:00
Jacob Pratt
a1fbf7b8ea Rollup merge of #158466 - sunshowers:nested-fundamental, r=notriddle
rustdoc: show impl Trait<Box<Local>> for Foreign, etc on Local's docs

This is a generalization of rust-lang/rust#92940: that PR handled cases like `impl Foreign for Box<Local>`, but was missing handling for a few other closely related cases.

My particular interest was with showing `impl From<Box<Utf8Path>> for Box<Path>` in camino's documentation. But I ended up handling a bunch of related cases along the way.

I'm new to rustdoc so please let me know if I got anything wrong :) took a bit to fully understand how this worked.

<img width="1733" height="483" alt="image" src="https://github.com/user-attachments/assets/4b987c61-bdac-4de3-a491-c0577e06fa7c" />
2026-06-27 22:13:46 -04:00
Jacob Pratt
de0afe7606 Rollup merge of #158194 - mehdiakiki:rlib-link-meta-cache, r=petrochenkov
Adds RmetaLinkCache a per-link cache that uses path as the key of dec…

Adds `RmetaLinkCache` a per link and path  keyed cache of decoded `lib.rmeta-link` archive members and routes the add_archive read through it so that each rlib link metadata is decoded only one per link at most.

This is a request that originated from the discussion in rust-lang/rust#156735 and we split it out as its own PR. It gives that PR a decode once path to read instead of reparsing each `rlib` per crate, and this will be in effect once `native_lib_filenames` moves to a link-time read.

Part of rust-lang/rust#138243
2026-06-27 22:13:45 -04:00
Jacob Pratt
f477b567e5 Rollup merge of #152225 - Amanieu:type-supertrait-shadowing, r=jackh726
Add supertrait item shadowing for type-level path resolution

This makes type-level name resolution (used primarily for associated types) also prefer subtrait items to supertrait items in case of ambiguity.

This addresses the concern from rust-lang/rust#148605 about the inconsistency with name resolution in expressions and method calls.
2026-06-27 22:13:45 -04:00
Jacob Pratt
6bc6675972 Rollup merge of #158497 - folkertdev:stdarch-sync-2026-06-27, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 62d559568a.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-06-27 22:13:44 -04:00
bors
8b95a26baf Auto merge of #158502 - saethlin:revert-flaky-codegen-test-fix, r=JonathanBrouwer
Revert "LLVM 23: Adapt codegen test to moved assume"

This reverts https://github.com/rust-lang/rust/pull/158067.
Fixes https://github.com/rust-lang/rust/issues/158500

The fix that was applied here is not robust against layout randomization, specifically the IR to load through the slice head pointer needs to come after a gepi, and not just a `load ptr, ptr %x`.

Based on the PR discussion, I think it's possible that the `min-llvm-version: 22` was mistakenly added when CI happened to choose the bad layout during the initial merge.

I'm not yet sure what the right fix is, but this is causing about half of all merges to fail right now so a revert seems prudent.

I don't think we have a way to skip tests when randomize-layout is set. The problem here is that we run codegen tests against the globally-configured sysroot, so setting `-Zrandomize-layout` in the test doesn't do anything.
2026-06-27 23:22:55 +00:00
Ben Kimock
96bf9d674b Revert "LLVM 23: Adapt codegen test to moved assume"
This reverts commit 4691890587.
2026-06-27 17:29:27 -04:00
Folkert de Vries
3515461784 use "llvm.prefetch.p0" instead of "llvm.prefetch"
LLVM updated the name, the old one still works but stdarch is now using the new one
2026-06-27 23:14:21 +02:00
Ralf Jung
8e4a0e11c9 Merge pull request #5125 from folkertdev/vqdmulh
add `vqdmulh*` aarch64 intrinsics
2026-06-27 17:12:15 +00:00
Folkert de Vries
075f549a56 add vqdmulh* aarch64 intrinsics 2026-06-27 18:41:02 +02:00
Ralf Jung
f734a15918 Merge pull request #5140 from RalfJung/arch-intrinsic-native
run arch intrinsic tests natively
2026-06-27 16:28:40 +00:00
Emmanuel Ugwu
94888f003a update bless output
Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
2026-06-27 17:09:13 +01:00
mehdiakiki
18c10cd1aa Adds RmetaLinkCache a per-link cache that uses path as the key of decoded lib.rmeta-link archive members, and routes add_archive read through it so each rlib link metadata is decoded at most once per link. This is a demand from a previous discussion and we split it out as its own PR. It gives that PR a decode once path tp read instead of reparsing each rlib per crate once native_lib_filenames moves to a link time read. 2026-06-27 12:09:12 -04:00
Folkert de Vries
21dfe67a80 fix bug in mpsadbw
the 256-bit implementation actually takes a 6-bit IMM and uses the low 3 bits for the first 128-bit chunk, the next 3 bits for the second 128-bit chunk. Previously we only used the low 3 bits for both chunks.
2026-06-27 17:56:58 +02:00
Ralf Jung
a672666281 run aarch64 intrinsic tests natively 2026-06-27 17:55:41 +02:00
Ralf Jung
aac07469e6 run x86 intrinsic tests natively 2026-06-27 17:55:41 +02:00