Commit Graph

173982 Commits

Author SHA1 Message Date
Jonathan Brouwer 9545845017 Rollup merge of #156901 - Zalathar:needs-asm-ret, r=folkertdev
compiletest: Simplify `//@ needs-asm-mnemonic: ret` to just `//@ needs-asm-ret`

- Simplification of https://github.com/rust-lang/rust/pull/155692.
---

The `needs-asm-mnemonic` directive was very general, but in practice was only being used for `ret`. There are very few other mnemonics that it could plausibly be useful for (e.g. `nop`), because any instruction that requires arguments is probably going to be non-portable.

This PR replaces `needs-asm-mnemonic` with a simpler `needs-asm-ret` directive that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple directives as appropriate (e.g. `needs-asm-nop`).
2026-05-25 14:44:05 +02:00
Jonathan Brouwer 95a3f832b7 Rollup merge of #156879 - apiraino:link-coc-rustfmt, r=ytmimi
Replace rustfmt code of conduct with link

In rust-lang/rust#65141 we replaced the CoC file and linked the "authoritative source" on the website. I noticed that the rustfmt directory still has the CoC original file.

I *think* for consistency it makes sense to have all of them linked but I'd like to hear from @calebcartwright first :-)

r? @Mark-Simulacrum
2026-05-25 14:44:05 +02:00
Zalathar 028b8b6c54 Simplify //@ needs-asm-mnemonic: ret to just //@ needs-asm-ret
The `needs-asm-mnemonic` directive was very general, but in practice was only
being used for `ret`. There are very few other mnemonics that it could
plausibly be useful for (e.g. `nop`), because any instruction that requires
arguments is probably going to be non-portable.

This PR replaces `needs-asm-mnemonic` with a simpler `needs-asm-ret` directive
that uses the same machinery as other simple needs directives.

If we happend to need more mnemonics in the future, we can just add more simple
directives as appropriate (e.g. `needs-asm-nop`).
2026-05-25 17:15:32 +10:00
bors 423e3d2529 Auto merge of #156893 - JonathanBrouwer:rollup-KrnXZ2W, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#142611 (Do not suggest compatible variants inside macro)
 - rust-lang/rust#156692 (compiletest: Prepare all simple `//@ needs-*` conditions in advance)
 - rust-lang/rust#156847 (Fix suggestion of unused variables with raw identifier in struct pattern)
 - rust-lang/rust#156876 (Remove useless -Zunpretty=identified option)
 - rust-lang/rust#156884 (Revert "Allow `global_asm!` in statement positions")
2026-05-24 19:34:37 +00:00
Jonathan Brouwer 88ffe41cc7 Rollup merge of #156692 - Zalathar:needs, r=jieyouxu
compiletest: Prepare all simple `//@ needs-*` conditions in advance

This PR makes compiletest check almost all `//@ needs-*` conditions in advance, separate from individual tests or directives. The results of these checks are stored in a prepared hashmap that can then be inspected by individual tests when encountering a needs-* directive.

This is *similar* to how `ignore-*`/`only-*` directives work (as of https://github.com/rust-lang/rust/pull/149470), though currently the two mechanisms don't share code, as they have subtly different requirements.

r? jieyouxu
2026-05-24 21:28:52 +02:00
Jacob Pratt 81eb844071 Rollup merge of #156824 - CoCo-Japan-pan:mut-restriction-parse, r=Urgau,jhpratt
Parse `mut` restrictions

This PR is part of the progress implementing `mut` restrictions proposed in [RFC 3323](https://rust-lang.github.io/rfcs/3323-restrictions.html), and linked to a [GSoC proposal](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Implementing.20impl.20and.20mut.20restrictions/with/592352432).
This PR focuses solely on the parsing of `mut` restrictions.
The keyword order is `pub(...) mut(...) unsafe field`.
The new syntax is guared by `#[feature(mut_restriction)]` feature gate.
Tracking Issue: rust-lang/rust#105077

r? @Urgau
cc @jhpratt
2026-05-24 16:39:41 +02:00
apiraino 3b170fa5fc Replace code of conduct with link 2026-05-24 15:24:27 +02:00
CoCo-Japan-pan dbb7b811ee rustfmt mut restriction 2026-05-24 17:34:01 +09:00
CoCo-Japan-pan 9aa5a17cee Add eq_mut_restriction to clippy_utils 2026-05-24 17:34:01 +09:00
bors e1ff77d898 Auto merge of #156736 - GuillaumeGomez:primitive-assoc-methods, r=fmease
Fix jump to def link generation on primitive type associated methods

Fixes rust-lang/rust#156707.

Interestingly enough, the inference fails on primitive type, so instead I go around a bit by generating a `PrimitiveType` and then tweak a bit the `href` generation.

r? @fmease
2026-05-24 03:17:11 +00:00
Guillaume Gomez 0c7388c750 Fix jump to def link generation on primitive type associated methods 2026-05-23 19:07:36 +02:00
bors 54333ff079 Auto merge of #156835 - yotamofek:pr/positive-dyn-compatible, r=fmease
Also emit "Dyn Compatibility" section for traits that *are* dyn compatible

I was using the std docs to check if a trait was dyn compatible, and was very confused that it had no info about dyn compatibility. I had to go look at a trait that I knew for certain was *not* dyn compatible (`Clone`) to verify that we still had the dyn compatibility section, and that its omission meant a trait *was* compatible.

(also removed the "..., so this trait is not object safe" text because it seemed pretty redundant)


r? @fmease
2026-05-22 18:01:46 +00:00
Yotam Ofek 877d57c2c2 Also emit "Dyn Compatibility" section for traits that *are* dyn compatible 2026-05-22 18:08:11 +03:00
Jonathan Brouwer 1dcd2aef19 Rollup merge of #156815 - fee1-dead-contrib:rustfmt-const-traits, r=ytmimi
rustfmt: format const trait impls to `const impl` for syntax transition

Because this concerns rustc development (we want this in next beta) so that we can ensure by the next beta rustc can remove the parser support for `impl const Trait`, this PR is made against the r-l/r repo :)
2026-05-22 16:21:30 +02:00
Jonathan Brouwer 827f6925d1 Rollup merge of #156229 - mati865:llvm-mingw-libllvm-fix, r=clubby789
Install additional LLVM DLL on Windows

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

The problem is that with shared linking to LLVM lib we have binaries requiring it in `$sysroot/bin` and `$sysroot/lib/rustlib/triple/bin`, but place the DLL only in the first location. On Unix systems rpath would take care of that, but on Windows the required DLL must be next to the binary or be found in PATH.

This PR puts another copy of the library into that second location. The size overhead of such copy compared to static linking is much lower than I anticipated even though I couldn't manage to make bootstrap create hard links.

The sizes without and with `llvm-tools` component:
```
❯ du --summarize -h .rustup/toolchains/{additional-dll,static}*
638M    .rustup/toolchains/additional-dll
800M    .rustup/toolchains/additional-dll-tools
608M    .rustup/toolchains/static-link
1.1G    .rustup/toolchains/static-link-tools
```
Statically linked LLD sits at 139M while dynamically linked one is 7.5M + 150M for the libLLVM, so the difference is minor.

Alternatively, we could require that on Windows, binaries located in `$sysroot/lib/rustlib/triple/bin` must always be called with `$sysroot/bin` in the PATH. However, that sounds like something that would require an announcement and some grace period.
2026-05-22 16:21:26 +02:00
Jonathan Brouwer 42bd6def23 Rollup merge of #155509 - Walnut356:string_crash, r=Mark-Simulacrum
[Debug Info] Gracefully handle invalid `String`/`Vec`

Somewhat related to https://github.com/rust-lang/rust/issues/150392.

Currently the handling can throw an exception, which we should absolutely not do. It causes issues with debugger adapters (e.g. CodeLLDB will hang forever. Trying to stop the debugger via vscode's interface causes a CodeLLDB to leak memory constantly until RAM is depleted and the OS starts killing processes). The exception has been replaced with a printed error message and a placeholder value.

Additionally, if a String/Vec is in an "invalid" state due to niche optimization (`capacity >= (1 << 63)`, common with `Option<String>`/`Option<Vec<T>>`), the pointer and length values will be meaningless, but are not guaranteed to be 0'd. The debugger will happily proceed as if they are useful values, and often do things like \<try to read multiple GB of data from the debugee\>.

I added simple checks to ensure that the capacity and length are within bounds, and that the pointer is non-null. If any check fails, the string/vec just acts as if it's empty.

Eventually this problem will be solved on LLDB's end via https://github.com/llvm/llvm-project/pull/188487/ or similar, but preventing issues on our end in the short term will help a lot.

---

try-job: aarch64-apple
2026-05-22 16:21:25 +02:00
Deadbeef a29df2a259 Rustfmt: format const trait impls to const impl for syntax transition 2026-05-22 08:03:45 +00:00
Josh Stone dd63bda55c Bump the version number to 1.98.0 2026-05-22 00:33:25 -07:00
bors 3bf5c6d99b Auto merge of #152112 - Kobzol:vec-deque-strongly-typed, r=joboet
Use strongly typed wrapped indices in `VecDeque`



This is far from perfect, but it would have prevented https://github.com/rust-lang/rust/pull/151769.

r? @joboet
2026-05-22 02:21:11 +00:00
bors 4d276d7fdb Auto merge of #155307 - Urgau:rustdoc-stabilize-remap-path-prefix, r=GuillaumeGomez
Stabilize `--remap-path-prefix` in rustdoc



# Stabilization report of  `--remap-path-prefix` in rustdoc

## Summary

`rustc` supports remapping source paths prefixes as a best effort in all compiler generated output, including compiler diagnostics, debugging information, macro expansions, documentation, doctests, etc.

This is useful for normalizing build products, for example, by removing the current directory out of the paths emitted into object files.

This stabilization stabilize the same flag used by `rustc` in `rustdoc`.

There are no tracking issue.

Stabilization was discussed at the last meeting, [#t-rustdoc/meetings > 2026-04-13 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/393423-t-rustdoc.2Fmeetings/topic/2026-04-13/near/585264347).

### What is stabilized

The rustdoc `--remap-path-prefix` flag is being stabilized by this PR. (It's equivalent to rustc flag)

It permits remapping (as a best effort) source path prefixes in all output, including diagnostics, debug information, macro expansions, generated documentation, etc.

It takes a value of the form `FROM=TO` where a path prefix equal to `FROM` is rewritten to the value `TO`.

#### Example

```sh
rustdoc src/lib.rs --remap-path-prefix="$PWD=/foo"
```

### What isn't stabilized

Neither `--remap-path-scope` (~~soon to be added as unstable in `rustdoc`~~ https://github.com/rust-lang/rust/issues/155451) or the already unstable in `rustc` `documentation` scope are being stabilized or added here.

## Design

### Implementation history

- rust-lang/rust#107099

### Unresolved questions

There are no unresolved questions.

### Post-implementation changes

The implementation has evolved with `rustc`, but no changes to the flag it-self have been made.

### Nightly extensions

The `documentation` scope, which currently can only be set from `rustc`, as we need to add an equivalent to the `--remap-path-scope` flag, ~~which is planned~~ (EDIT: https://github.com/rust-lang/rust/issues/155451), but not required, the current `--remap-path-prefix` defaults to the `all` scope, like `rustc`.

### Doors closed

We are committing to having to having a flag that permits remapping paths. The compiler team already made the same commitment.

## Feedback

### Call for testing

No call for testing has been done.

### Nightly use

Unable to determine. A [GitHub search](https://github.com/search?q=%20%2F--remap-path-prefix%2F&type=code) only seems to only reveals the `rustc` usage (over 6k though).

Rust-for-Linux is using the [flag](https://github.com/torvalds/linux/blob/e80d033851b3bc94c3d254ac66660ddd0a49d72c/Makefile#L1151-L1153).

## Implementation

### Major parts

- rust-lang/rust#107099
- rust-lang/rust#149709
- rust-lang/rust#150172
- rust-lang/rust#151589

### Coverage

- [`tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-failed-doctest-output.rs)
- [`tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs)
- [`tests/rustdoc-ui/remap-path-prefix-macro.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-macro.rs)
- [`tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/remap-path-prefix-passed-doctest-output.rs)
- [`tests/rustdoc-ui/lints/remap-path-prefix-lint.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-ui/lints/remap-path-prefix-lint.rs)
- [`tests/rustdoc-html/import-remapped-paths.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-html/import-remapped-paths.rs)
- [`tests/rustdoc-html/macro/external-macro-src.rs`](https://github.com/rust-lang/rust/blob/12f35ad39ed3e39df4d953c46d4f6cc6c82adc96/tests/rustdoc-html/macro/external-macro-src.rs)

### Outstanding bugs

There are no outstanding bugs regarding `--remap-path-prefix` in `rustdoc`.

There are [caveats and limitation](https://doc.rust-lang.org/nightly/rustc/remap-source-paths.html#caveats-and-limitations) in `rustc`, but they mostly concern generated object files, which we don't really have. 

### Outstanding FIXMEs

There are no FIXME regarding `--remap-path-prefix`.

## Acknowledgments

- @edward-shen
- @Urgau
2026-05-21 22:46:41 +00:00
bors e96c36b6f7 Auto merge of #156757 - dianqk:update-llvm, r=cuviper
Update LLVM to 22.1.6

Fixes https://github.com/rust-lang/rust/issues/150676.
2026-05-21 17:40:31 +00:00
dianqk 6a59ea7237 Update LLVM to 22.1.6 2026-05-20 13:07:43 +08:00
bors 1f8e04d34a Auto merge of #156727 - abdul2801:docs, r=GuillaumeGomez
Fix jump-to-def links broken by turbofish syntax

Fixes rust-lang/rust#156706
2026-05-20 02:37:03 +00:00
bors 4b9792692f Auto merge of #156589 - cuviper:revert-dbg-tearing, r=the8472
Revert tearing changes to `dbg!`

Since the primary change to `dbg!` in rust-lang/rust#149869, we've been chasing a few regressions:

* rust-lang/rust#153850, fixed by rust-lang/rust#154074
* rust-lang/rust#154988, fixed by rust-lang/rust#154994
* rust-lang/rust#155902, proposed fix in rust-lang/rust#155915

We already reverted this once, on beta only to prevent these regressions from shipping in 1.95.

In that most recent PR, we decided that it would be better to revert `dbg!` to its original state everywhere (`main` and 1.96-`beta`), and then we can consider it from scratch later. So here I've reverted the change and its fixes, but kept the regression tests, including the pending one.

cc @joboet @dianne @rust-lang/libs 
@rustbot label beta-nominated
2026-05-19 23:24:13 +00:00
Jonathan Brouwer f3d44a0113 Rollup merge of #156734 - GuillaumeGomez:move-span_map, r=yotamofek
[rustdoc] Move `span_map` file to the right folder

This file should at the same level as `highlight.rs` and `macro_expansion.rs` as it doesn't do anything in `render`.

r? @yotamofek
2026-05-19 15:04:45 +02:00
Jonathan Brouwer 93e516b3e9 Rollup merge of #148666 - odlot:master, r=wesleywiser
Add support for xray in aarch64 unknown none targets

I am currently working on an embedded project and use the target `aarch64-unknown-none`, which I want to profile.
I found the following compiler flag `-Z instrument-xray` (https://doc.rust-lang.org/unstable-book/compiler-flags/instrument-xray.html) available and I locally built a toolchain that sets the `supports_xray: true` option in `TargetOptions` for `compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs`.
Using this toolchain in `rustup` I am able to use the instrumentation pass and I verified that the disassembly looks as what I want.
I understand that it isn't available upstream while being supported due to the separate runtime library which has to be linked (e.g., https://www.llvm.org/docs/XRay.html#xray-runtime-library), which is not available for `aarch64-unknown-none`.
I argue that someone who cross-compiles for `aarch64-unknown-none` would be okay with writing a separate runtime library themselves, which I intend to do.
As far as I understood it is not necessarily required to have a runtime library at this point, i.e., the user of this API should link it, e.g., from their `build.rs` file using `cargo::rustc-link-lib=LIB` if there is an XRay LIB available for the respective target, e.g., `clang+llvm-19.1.1-aarch64-linux-gnu/lib/clang/19/lib/aarch64-unknown-linux-gnu/libclang_rt.xray-fdr.a` (which afaik there isn't for `aarch64-unknown-none`) and do "configuration as code" of XRay's options.
It should not be part of the compiler, because the instrumentation and the runtime library are completely decoupled. One can modify the instrumented code by the compiler pass however one wants to, this again pushes me into the direction of telling the developer to bring his own runtime library.

I would like to bring my change that enables this instrumentation back into upstream to facilitate my developer experience.
2026-05-19 15:04:43 +02:00
Jonathan Brouwer c8cb78d21a Rollup merge of #156739 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/159054c60e08465357ab954745fc27318fad55bf.

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

r? @ghost
2026-05-19 15:04:42 +02:00
Jonathan Brouwer d14790a404 Rollup merge of #154265 - mrkajetanp:freebsd-aarch64-ci, r=marcoieni
ci: Add dist-aarch64-freebsd

Add scripts to build the aarch64-unknown-freebsd target in CI.
Implements MCP: https://github.com/rust-lang/compiler-team/issues/961

There is currently the issue of FreeBSD version support. See the following thread for more details:
https://github.com/rust-lang/rust/pull/132228

The current version supported by rust is FreeBSD 12, which is already EOL. This means it is no longer possible to download FreeBSD releases from their servers. The aarch64 build is not mirrored on the Rust servers, which is why I couldn't match the version used by already existing CI scripts and had to change this one to FreeBSD 13. FreeBSD 13 itself will be EOL a month from now, on April 30th. We might want to put aarch64 FreeBSD builds on the Rust mirror and update the support across the board to FreeBSD 14 prior to merging this.
2026-05-19 15:04:41 +02:00
Ralf Jung 18311c672b fix running miri test when the working directory is not writable 2026-05-19 14:27:46 +02:00
Abdul Rafey Ahmed c454d92f61 fix: improve turbofish jump-to-def handling
Handle turbofish syntax correctly in rustdoc jump-to-def links
and add regression tests covering type aliases.
2026-05-19 16:20:38 +05:30
Ralf Jung 6e9e47daeb Merge pull request #5036 from WhySoBad/network-socket-fix-blocking-connect-err
Fix `connect` of blocking TCP sockets always returning `ENOTCONN` on error
2026-05-19 05:51:57 +00:00
Guillaume Gomez 6c88e90ab1 Move span_map file to the right folder 2026-05-19 01:47:00 +02:00
WhySoBad 79cfca599e Various TCP socket connect fixes
1. Blocking `connect`s which fail no longer only return EINPROGRESS but
   instead return the correct error code.

2. Manually reading SO_ERROR outside of `ensure_connected` no longer
   allows the socket to be upgraded to `Connected` despite the `connect`
   failing.

3. Introduced new `ConnectionFailed` state to disallow actions on
   sockets with a failed `connect`.
2026-05-18 23:42:15 +02:00
bors ca9203f29c Auto merge of #156728 - JonathanBrouwer:rollup-Qv3EfnO, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#156146 (test new solver on CI until stabilization)
 - rust-lang/rust#155840 (prefer `T::IS_ZST` over manual check)
 - rust-lang/rust#156723 (Update books)
2026-05-18 21:25:18 +00:00
Jonathan Brouwer 0cb7361374 Rollup merge of #156723 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/reference

9 commits in 581920f9109f141b88b860b3e1e8359e3896a150..ad35aca481751a06afeb23820a672b0f3b11a476
2026-05-14 17:00:42 UTC to 2026-05-04 18:27:13 UTC

- ci: declare contents:read on CI workflow (rust-lang/reference#2271)
- Fix the grammar of generic arguments (rust-lang/reference#2247)
- Rename grammar rule `TypeParamBounds` to just `Bounds` (rust-lang/reference#2258)
- Update `used` to use the attribute template (rust-lang/reference#1905)
- Place HRTB binders before fn qualifiers (rust-lang/reference#2260)
- Glossary: add new entry documenting zero-sized types (rust-lang/reference#2203)
- Fix test failure on macOS with link_section (rust-lang/reference#2246)
- Make definition of fragment specifier `path` more precise (rust-lang/reference#2248)
- gitignore linkcheck (rust-lang/reference#2252)
2026-05-18 23:17:18 +02:00
Jonathan Brouwer d42d8e0453 Rollup merge of #156146 - lqd:new-solver-ci-std, r=marcoieni
test new solver on CI until stabilization

We need the new solver to be able to build the stdlib, and this has regressed in the recent past. Things are broken right now, and we want to ensure this keeps working until stabilization later this year.

I've added this to the `x86_64-gnu-llvm-XX` job (note no `-1/2/3` suffix) so it's run on PR and auto CI, and because it's roughly the fastest of these builders, though maybe the aarch64 llvm 1 and 2 are slightly faster.

Building the stage 1 `./x build library/` is generally quite quick, a couple minutes at most.

The new solver fix to build std is from @lcnr [on zulip](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/weekly.20sync.2Fupdates/near/591998234).
r? @marcoieni
2026-05-18 23:17:16 +02:00
rustbot 8623be7b0e Update books 2026-05-18 19:00:55 +02:00
Jonathan Brouwer 1056a02f08 Rollup merge of #156653 - GuillaumeGomez:update-sysinfo, r=SimonSapin
Update `sysinfo` version to `0.39.2`

Bugfixes and performance improvements.
2026-05-18 17:07:12 +02:00
Jonathan Brouwer 33d6fe7a9a Rollup merge of #155006 - WaffleLapkin:stabilize_cfg_target_has_atomic_equal_alignment, r=Urgau
stabilize `feature(cfg_target_has_atomic_equal_alignment)`

See stabilization report: https://github.com/rust-lang/rust/issues/93822#issuecomment-4192399374
cc @joshtriplett
2026-05-18 17:07:04 +02:00
Kajetan Puchalski 52b5f55db3 ci: Add dist-aarch64-freebsd
Add scripts to build the aarch64-unknown-freebsd target in CI.
Implements MCP: https://github.com/rust-lang/compiler-team/issues/961
2026-05-18 13:45:39 +01:00
Zalathar 9a5d93e4d9 Store prepared //@ needs-* conditions in a HashMap 2026-05-18 16:30:21 +10:00
Zalathar ce38783ee4 Prepare all simple //@ needs-* conditions in advance 2026-05-18 16:30:21 +10:00
Zalathar e2b209e6ed Temporarily move the simple needs-* list to a different file
This intermediate commit makes subsequent diffs/blame a bit nicer, by
encouraging git's blame view to preserve line history for the remaining parts
of `handle_needs`, which would otherwise be obscured.

A subsequent commit will move the list back into `needs.rs` in an altered form.
2026-05-18 16:30:21 +10:00
bors a31c27a887 Auto merge of #156681 - JonathanBrouwer:rollup-wC7f2r6, r=JonathanBrouwer
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#156196 (Include vendored sources in the rust-src component)
 - rust-lang/rust#155870 (Fix cross-compiling `macos-deployment-target-warning` test)
 - rust-lang/rust#156492 (remove/update various cfg(miri))
 - rust-lang/rust#156676 (Preserve spans when hiding do_not_recommend impls)
 - rust-lang/rust#155313 (doc(core::cmp::Eq): fix definition of symmetry)
 - rust-lang/rust#156234 (implement `into_array` for `Vec<T>`)
 - rust-lang/rust#156488 (Fix missing period in Iterator product doc comment)
 - rust-lang/rust#156572 (std: replace "safe" with "sound" in safety documentation)
 - rust-lang/rust#156624 (c ffi document fixes for c_short.md)
 - rust-lang/rust#156638 (library: Fix std compilation for espidf target in unix::process)
 - rust-lang/rust#156647 (Change division to multiplication in floating-point midpoint)
 - rust-lang/rust#156668 (Fix typo in `format_into` docs: signed -> unsigned)
 - rust-lang/rust#156677 (change `other uses of const` to `raw pointers` in const keyword docs)
2026-05-18 01:35:23 +00:00
Jonathan Brouwer c30d903b1c Rollup merge of #156196 - bjorn3:vendor_stdlib, r=Mark-Simulacrum
Include vendored sources in the rust-src component

In the future this can be used by build-std, but until then it is still useful for allowing rust-analyzer to work offline.

This increases the unpacked size by 24MB (from 116MB to 140MB) and the compressed size by only 2MB (from 18MB to 20MB)
2026-05-18 03:19:42 +02:00
bors b40ce8b786 Auto merge of #156670 - JonathanBrouwer:rollup-u90lYRn, r=JonathanBrouwer
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#151742 (Remove redundant information in `rustc_abi::Variants`)
 - rust-lang/rust#151362 (Add interior-mutability suggestion to `static_mut_refs`)
 - rust-lang/rust#156121 (compiler: suggest `.collect()` when `String` is expected and `Iterator` is found)
 - rust-lang/rust#156208 (Emit retags in codegen to support BorrowSanitizer (part 1))
 - rust-lang/rust#156596 (Split `LintExpectationId`s)
 - rust-lang/rust#156607 (ci: Update FreeBSD version to FreeBSD 14)
 - rust-lang/rust#156376 (suggest hex escapes for C-style escapes)
 - rust-lang/rust#156577 (Test EII UI tests with prefer-dynamic)
 - rust-lang/rust#156585 (explicit tail calls: ignore some tests on unsupported LLVM targets)
 - rust-lang/rust#156598 (Avoid rustfix suggestions for macro-expanded unused imports)
 - rust-lang/rust#156616 (rustdoc: add test case for `-Drustdoc::` and `--cap-lints`)
 - rust-lang/rust#156633 (Add regression test for issue rust-lang/rust#41261)
 - rust-lang/rust#156635 (rename unexpected_try_recover function)
 - rust-lang/rust#156636 (minor `rustc_mir_transform` cleanup)
2026-05-17 22:25:43 +00:00
bors 507271bc11 Auto merge of #156655 - ehuss:disable-rust-analyzer-llvm-21, r=JonathanBrouwer,jieyouxu
Disable rust-analyzer tests on LLVM 21

The rust-analyzer tests have been frequently failing with a SIGSEGV on CI in the LLVM 21 runners. In my investigation, this seems to be fixed with LLVM 22. It was suggested that we should just disable these tests.

There wasn't a particularly convenient way to detect if this is running with LLVM 21, so I decided to just check the CI_JOB_NAME which contains the image name which in our case includes the string "llvm-21".

Fixes https://github.com/rust-lang/rust/issues/156460
2026-05-17 19:08:57 +00:00
Jonathan Brouwer ded0aaba6c Rollup merge of #156585 - InvalidPathException:llvm-error, r=folkertdev
explicit tail calls: ignore some tests on unsupported LLVM targets

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

Add ignore derivatives to two tests that cause the most platforms to fail, there are two reasons:

All tests involving `musttail` should fail on these platforms due to poor support overall by LLVM, but since they have low usage and supposedly already have many tests failing we limit ignores to the two "worst" tests.

```
//@ ignore-aix
//@ ignore-csky
//@ ignore-mips
//@ ignore-mips64
//@ ignore-powerpc
//@ ignore-powerpc64
//@ ignore-thumb
```

aix/powerpc issue: https://github.com/llvm/llvm-project/issues/187119
thumb issue: https://github.com/llvm/llvm-project/issues/73167
mips has been fixed but it is in a different LLVM version than what is pinned by Rust: https://github.com/llvm/llvm-project/issues/57795

These were caused by argument/returns that do not fit in registers (e.g., indirect), they had a fix but were reverted due to lifetime issues:

```
//@ ignore-riscv64
//@ ignore-loongarch32
//@ ignore-loongarch64
```

RISC-V had a fix which got reverted: https://github.com/llvm/llvm-project/pull/191508
LoongArch fix also got reverted: https://github.com/llvm/llvm-project/pull/191525

Also add missing compiletest directive names for `ignore-csky`, `ignore-mips`, and `ignore-mips64`.

r? folkertdev
2026-05-17 15:52:40 +02:00
Jonathan Brouwer 7efacb044b Rollup merge of #156607 - mrkajetanp:freebsd-14, r=marcoieni
ci: Update FreeBSD version to FreeBSD 14

FreeBSD 12 & 13 are now EOL. The decision to move to FreeBSD 13 was not implemented due to the issues with the toolchain. Now that FreeBSD 14 is the most recent supported version, we should use it for builds in CI.
2026-05-17 15:52:37 +02:00
Jonathan Brouwer b0c869a35e Rollup merge of #156596 - nnethercote:split-LintExpectation, r=GuillaumeGomez
Split `LintExpectationId`s

This PR makes clearer where stable and unstable `LintExpectationIds` can occur, plus a few other small cleanups. Details in individual commits.

r? @GuillaumeGomez
2026-05-17 15:52:37 +02:00