Commit Graph

173999 Commits

Author SHA1 Message Date
bors ddc1a64229 Auto merge of #157005 - JonathanBrouwer:rollup-1BZFgyy, r=JonathanBrouwer
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#156796 (Fix missing suggestion when matching `String` with `&str`)
 - rust-lang/rust#156933 (rustc_parse_format: improve the error diagnostic for `+` sign flag)
 - rust-lang/rust#156545 (fix issue-144595)
 - rust-lang/rust#156814 (Extend macOS deployment target mismatch filter to cover dylib and new ld formats)
 - rust-lang/rust#156851 (rustdoc: avoid ICE when rendering body-less type consts)
 - rust-lang/rust#156942 (Remove unneeded `#[skip_arg]` attributes)
 - rust-lang/rust#156972 (add field_projections fixme)
 - rust-lang/rust#156975 (Move check_cfg out of diagnostic attr module)
 - rust-lang/rust#156989 (Add missing --set rust.codegen-backends=["gcc"] in the gcc codegen Dockerfile for the core tests)
2026-05-27 08:25:14 +00:00
Jonathan Brouwer a64a3f2075 Rollup merge of #156989 - antoyo:fix/cg_gcc-coretests-ci, r=GuillaumeGomez
Add missing --set rust.codegen-backends=["gcc"] in the gcc codegen Dockerfile for the core tests

The CI would use cranelift instead of the gcc codegen.
This fixes it and was tested in rust-lang/rust#156964.

r? @Kobzol

cc @GuillaumeGomez
2026-05-27 08:14:30 +02:00
Jonathan Brouwer 03e935f81c Rollup merge of #156851 - reddevilmidzy:mgca-doc, r=GuillaumeGomez
rustdoc: avoid ICE when rendering body-less type consts

close: https://github.com/rust-lang/rust/issues/149287
2026-05-27 08:14:27 +02:00
Weihang Lo 22929962bb Update cargo submodule 2026-05-26 20:44:39 -04:00
Antoni Boucher fd0c5f37e7 Add missing --set rust.codegen-backends=["gcc"] in the gcc codegen Dockerfile for the core tests 2026-05-26 15:01:47 -04:00
Jonathan Brouwer 6140aeec15 Rollup merge of #156947 - ehuss:update-mdbook, r=jieyouxu
Update mdbook to 0.5.3

This is a small update with a few bug fixes.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-053
2026-05-26 13:42:20 +02:00
Jonathan Brouwer 6aa3c7ef30 Rollup merge of #156899 - Walnut356:lldb_batchmode, r=jieyouxu
fix breakpoint callback registration in `lldb_batchmode`

We'd been failing to register the callback for a while now, because it couldn't find the specified function. This change imports `lldb_batchmode` and uses the namespaced name of the function.

As an aside, I'm relatively sure this breakpoint callback isn't necessary anymore. Whenever lldb stops at a breakpoint, it updates the selected thread/frame automatically. I don't want to remove it quite yet because I *might* need it for some bookkeeping with the `lldb-repr` directive (and `--bless` behavior)
2026-05-26 13:42:19 +02:00
Jonathan Brouwer 903a08c0b0 Rollup merge of #156161 - mejrs:this_formatargs, r=oli-obk
rustc_on_unimplemented: introduce format specifiers

...as printing options for the annotated item.

See also the test and dev guide prose. This only affects rustc_on_unimplemented, not (yet) the other diagnostic attributes. I plan to do that in some later PR.

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

#[rustc_on_unimplemented(
    message = "normal: {This}, path: {This:path},  resolved: {This:resolved}"
)]
pub trait Trait<'lifetime, const CONST_GENERIC: usize, A, B> where A: Send {}
```
will do:
```
normal: Trait, path: Trait<'lifetime, CONST_GENERIC, A, B>,  resolved: Trait<'_, 6, u8, _>
```
2026-05-26 13:42:16 +02:00
bors b7e97a98f2 Auto merge of #156549 - GuillaumeGomez:ci-gcc-core, r=Kobzol
Add CI check when building sysroot with GCC backend and running libcore tests with it



Fixes https://github.com/rust-lang/rustc_codegen_gcc/issues/882.

Is it what you had in mind @Kobzol?

r? @Kobzol
2026-05-26 04:49:37 +00:00
Redddy bc12569f94 rustdoc: avoid ICE when rendering body-less type consts 2026-05-26 01:05:57 +00:00
Eric Huss b328c251b7 Update mdbook to 0.5.3
This is a small update with a few bug fixes.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-053
2026-05-25 17:59:47 -07:00
Guillaume Gomez 76b479930f Explain what each GCC dockerfile is testing 2026-05-25 22:41:36 +02:00
Jonathan Brouwer c9fbeafa80 Rollup merge of #156825 - aerooneqq:sort-errors, r=petrochenkov
compiletest: sort unexpected and unimportant errors

Sort unexpected errors before printing in tests, this helps inserting annotations manually from bottom to top and searching for errors is a bit simpler.

Output before:
```rust
tests/ui/delegation/explicit-paths.rs:47:9: ERROR: method `foo3` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:48:9: ERROR: method `foo4` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:27:14: ERROR: cannot find function `foo4` in `S` [E0425]
tests/ui/delegation/explicit-paths.rs:37:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:48:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:59:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:67:5: ERROR: conflicting implementations of trait `Trait` for type `S` [E0119]
tests/ui/delegation/explicit-paths.rs:56:36: ERROR: mismatched types [E0308]
tests/ui/delegation/explicit-paths.rs:68:16: ERROR: the trait bound `S2: Trait` is not satisfied [E0277]
tests/ui/delegation/explicit-paths.rs:68:30: ERROR: mismatched types [E0308]
```

Output after:
```rust
tests/ui/delegation/explicit-paths.rs:27:14: ERROR: cannot find function `foo4` in `S` [E0425]
tests/ui/delegation/explicit-paths.rs:37:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:47:9: ERROR: method `foo3` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:48:9: ERROR: method `foo4` is not a member of trait `Trait` [E0407]
tests/ui/delegation/explicit-paths.rs:48:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:56:36: ERROR: mismatched types [E0308]
tests/ui/delegation/explicit-paths.rs:59:18: ERROR: cannot find function `foo4` in `F` [E0425]
tests/ui/delegation/explicit-paths.rs:67:5: ERROR: conflicting implementations of trait `Trait` for type `S` [E0119]
tests/ui/delegation/explicit-paths.rs:68:16: ERROR: the trait bound `S2: Trait` is not satisfied [E0277]
tests/ui/delegation/explicit-paths.rs:68:30: ERROR: mismatched types [E0308]
```

r? @petrochenkov
2026-05-25 20:54:07 +02:00
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
Walnut bf7a021d0e fix breakpoint callback registration 2026-05-25 01:32:05 -05:00
aerooneqq 68695a6e06 Sort unexpected and unimportant errors 2026-05-25 08:40:34 +03: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
Guillaume Gomez 383850dddc Add CI check when building sysroot with GCC backend and running libcore tests with it 2026-05-23 15:01:12 +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