327395 Commits

Author SHA1 Message Date
bors 8bab26f4f6 Auto merge of #159288 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.97.1 release

This backports:

* https://github.com/rust-lang/rust/pull/159106
* https://github.com/rust-lang/rust/pull/159047

Currently not approved:

* https://github.com/rust-lang/rust/pull/159039 - thread is trending towards a decline of backport
1.97.1
2026-07-14 15:13:08 +00:00
Mark Rousskov 979b2d3568 Backport fix for 159035
This backports more than just the small fix as the original base has
moved on main too.
2026-07-14 13:46:04 +00:00
Jubilee Young e641feae5e Revert "Only exclude the 155473 change for 1-byte bool-likes"
This reverts commit 569ad99864.

The PR widened the effect of this from enums with the 0..=1 range to
those with any range if they had more than 1 byte.

Unfortunately, our LLVMIR now incurs miscompilations, so revert until
we find a better fix.
2026-07-14 13:36:16 +00:00
Jubilee Young eabe5e433d Add regression test for enum miscompilation 2026-07-14 13:36:16 +00:00
Mark Rousskov 9b8be8a0dc 1.97.1 release
* Bump version
* Re-import release notes and add 1.97.1 notes
2026-07-14 08:52:37 -04:00
bors 2d8144b788 Auto merge of #158832 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.97 release

No last minute backports this time around.

Pulled in release notes from https://github.com/rust-lang/rust/pull/158871, leaving that pending for a bit more time to get feedback before we approve it for mainline.

r? me
1.97.0
2026-07-07 01:27:02 +00:00
Mark Rousskov 1417dc76bb Cherry pick mirroring kernel archives in ci-mirrors
This cherry picks 96eb6d756b to stable
branch.
2026-07-06 20:26:25 -04:00
Mark Rousskov e6ccfb3a4f Fetch latest relnotes 2026-07-06 18:10:45 -04:00
Mark Rousskov 701e4718e7 Bump stable channel 2026-07-05 17:08:34 -04:00
bors b2282dd564 Auto merge of #158630 - weihanglo:beta-cargo-backport, r=weihanglo
[beta-1.97] Update cargo submodule

1 commits in 910306f2a7b889a7ff58fd4a451d3daf356a4cbb..c980f4866141969fab6254a680546a277789d6f0
2026-06-11 13:13:29 -0600 to 2026-06-30 13:45:43 -0700
- [beta-1.97] chore: upgrade to libssh2-sys@0.3.2 (rust-lang/cargo#17153)

r? ghost
2026-07-01 03:04:37 +00:00
Weihang Lo afbfb2f464 [beta-1.97] Update cargo submodule 2026-06-30 17:18:27 -04:00
bors c04e321a9f Auto merge of #158420 - cuviper:beta-next, r=cuviper
[beta] backports

- Do not eagerly normalize alias during coherence rust-lang/rust#157617
- Don't try to remove assignments in SimplifyComparisonIntegral rust-lang/rust#158214

r? cuviper
2026-06-26 02:09:00 +00:00
Hanna Kruppe c93dd3ec67 don't try to remove assignments in SimplifyComparisonIntegral
(cherry picked from commit a642d9b63c)
2026-06-25 14:41:53 -07:00
Hanna Kruppe d2e3ae1ca6 add test case for miscompilation
(cherry picked from commit 5b5e408224)
2026-06-25 14:41:53 -07:00
bit-aloo 9a2d04134e updating other test error types
(cherry picked from commit 063fdc0aa1)
2026-06-25 14:41:49 -07:00
bit-aloo 51d904f3c7 make sure to not normalize impl header in coherence
(cherry picked from commit 91f63cb1e0)
2026-06-25 14:41:49 -07:00
bit-aloo 3c51bd43b0 test to see if the coherence fails, when aliases are eagerly normalized
(cherry picked from commit 6a6ebb983d)
2026-06-25 14:41:49 -07:00
bit-aloo 448c5c220d add auxiliary module to define Trait and type in a different crate
(cherry picked from commit 6407228492)
2026-06-25 14:41:48 -07:00
bors 36645eb0d0 Auto merge of #157787 - cuviper:beta-next, r=cuviper
[beta] backports

- Revert "Build shared LLVM lib for windows-gnullvm" rust-lang/rust#156962
- Allow building the source tarballs while offline rust-lang/rust#157014
- resolve: Partially revert "Remove a special case for dummy imports" rust-lang/rust#157719
- resolve: Remove exported imports from `maybe_unused_trait_imports` rust-lang/rust#157713
- [beta-1.97] Update cargo submodule rust-lang/rust#157792

r? cuviper
2026-06-12 08:28:42 +00:00
Weihang Lo 4cc21344c2 [beta-1.97] Update cargo submodule 2026-06-12 00:50:45 -07:00
Vadim Petrochenkov 024c353292 resolve: Remove exported imports from maybe_unused_trait_imports
(cherry picked from commit b4a1fc7897)
2026-06-11 12:41:52 -07:00
Vadim Petrochenkov 37c14d399e Add a regression test for issue 157420
(cherry picked from commit ea1e984ceb)
2026-06-11 12:41:52 -07:00
Vadim Petrochenkov e71aa040af resolve: Partially revert "Remove a special case for dummy imports"
(cherry picked from commit 816c70b52c)
2026-06-11 12:41:12 -07:00
bjorn3 e2d113f5e6 Allow building the source tarballs while offline
Previously locally vendored dependencies wouldn't be reused when
building the source tarball, instead everything would be downloaded from
the internet again (if not in the cargo cache).

(cherry picked from commit b665316530)
2026-06-11 12:35:16 -07:00
Jieyou Xu 58141b27f7 Revert "Build shared LLVM lib for windows-gnullvm"
This reverts commit 1d1280aae1.

Looks like this causes problems with certain LLVM bin tools not finding
`libLLVM` on `*-windows-gnullvm`. This commit is a _minimal_ revert to
return us to known state to alleviate time pressure to investigate.
2026-06-10 12:11:58 +02:00
bors a57ed7fabb Auto merge of #157548 - ehuss:beta-1.97-update-cargo, r=ehuss
[beta 1.97] Update cargo

1 commits in c25859fade01b233823818c447cf8ec779a5760c..31bcf52c870d00e7b993ec65fdb888ea12bc2052 2026-05-25 17:16:01 +0200 to 2026-05-28 22:54:42 -0400
- [1.97] bump cargo-util-schemas to 0.14.1 (rust-lang/cargo#17047)
2026-06-07 13:17:56 +00:00
Eric Huss 20a5f4b44e [beta 1.97] Update cargo
1 commits in c25859fade01b233823818c447cf8ec779a5760c..31bcf52c870d00e7b993ec65fdb888ea12bc2052
2026-05-25 17:16:01 +0200 to 2026-05-28 22:54:42 -0400
- [1.97] bump cargo-util-schemas to 0.14.1 (rust-lang/cargo#17047)
2026-06-06 16:11:57 -07:00
bors 0417c25868 Auto merge of #157086 - cuviper:beta-next, r=cuviper
[beta] bump stage0, plus a backport



https://forge.rust-lang.org/release/process.html#beta-stage0-update-friday

- Bump stage0 to stable 1.96.0
- Extend macOS deployment target mismatch filter to cover dylib and new ld formats rust-lang/rust#156814

r? cuviper
2026-05-30 07:05:53 +00:00
cezarbbb 720afec010 Suppress macOS deployment target linker warnings from ld_prime
(cherry picked from commit 52bedb4c05)
2026-05-28 15:20:15 -07:00
Josh Stone e191ef987e Bump stage0 to stable 1.96.0 2026-05-28 15:19:54 -07:00
bors 96f70397ed Auto merge of #156939 - cuviper:beta-next, r=cuviper
[beta] prepare Rust 1.97.0-beta

https://forge.rust-lang.org/release/process.html#beta-pr

- Update cargo for CVE-2026-5222 and CVE-2026-5223 (rust-lang/cargo#17032)
- Revert "Allow `global_asm!` in statement positions" rust-lang/rust#156884
- Replace version placeholders with 1.97.0
- Bump to beta release

r? cuviper
2026-05-26 16:14:13 +00:00
Josh Stone cc365b2956 Bump to beta release 2026-05-25 14:27:07 -07:00
Josh Stone 54bca41297 Replace version placeholders with 1.97.0 2026-05-25 14:27:07 -07:00
Folkert de Vries 944a226339 Revert "Allow global_asm! in statement positions"
This reverts commit 450cdb5501.

(cherry picked from commit 00ada0feb1)
2026-05-25 14:27:07 -07:00
Josh Stone 729e1b8851 Update cargo for CVE-2026-5222 and CVE-2026-5223 2026-05-25 14:21:48 -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
bors 037b621e83 Auto merge of #156794 - JonathanBrouwer:rollup-VOF2Ff4, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#156242 (Remove unsound `target_feature_inline_always` feature)
 - rust-lang/rust#156791 (Unsafe kept in help text)
2026-05-21 10:22:47 +00:00
Jonathan Brouwer f84347a07e Rollup merge of #156791 - obi1kenobi:unsafe-kept-in-help-text, r=JonathanBrouwer,Kivooeo
Unsafe kept in help text

Currently when encountering a malformed attribute, the compiler will suggest removing unsafe in the well-formed template even when unsafe is required. This PR preserves whatever unsafe (or lack) exists in the user's code.

r? @jdonszelmann
2026-05-21 12:21:46 +02:00
Jonathan Brouwer 8162cf582b Rollup merge of #156242 - Jamesbarford:feat/remove-alwaysinline+target-feature, r=RalfJung,saethlin
Remove unsound `target_feature_inline_always` feature

## Summary
- Remove `target_feature_inline_always`
- Update stdarch generators to only use `#[inline]` & regenerate stdarch.

## Why?
Succinctly; the feature relies on LLVMs `AlwaysInlinerPass()` running before LLVMs heuristic based inliner pass. Which is not a basis for sound code.

This has been discussed in [the tracking issue](https://github.com/rust-lang/rust/issues/145574).

If the ordering of the passes were to change, of which they have in the past, it is very possible we could inline functions across callsites with mismatching target features leading to unsound code. Checks proposed in; https://github.com/rust-lang/rust/pull/155426 would only take into account caller -> callee which is not enough to guard against possibly of generating unsound code if the pass ordering were to change.

There doesn't seem to be a way, presently, this this mechanism to provide soundness guarantees nor does it seem like `AlwaysInlinerPass()` is a desired feature of LLVM, which this feature relies on.

r? @RalfJung
2026-05-21 12:21:45 +02:00
Aria Givens 970cb15506 Use ast node instead of boolean 2026-05-21 10:54:10 +02:00
bors b954122bbe Auto merge of #156773 - JonathanBrouwer:rollup-C3CCRv2, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#156317 (Reorg tests 04)
 - rust-lang/rust#156747 (Add an example to the `NumBuffer` documentations)
 - rust-lang/rust#156766 (delegation: visit qself under elided-infer lifetime rib)
2026-05-20 20:02:46 +00:00
Aria Givens 9c9f439997 Make attr template suggestions preserve attribute safety. 2026-05-20 20:45:36 +02:00
Jonathan Brouwer b332bfaab7 Rollup merge of #156766 - aerooneqq:delegation-qself-visit-lt-rib, r=petrochenkov
delegation: visit qself under elided-infer lifetime rib

Follow-up for rust-lang/rust#156705, we need to visit delegation's qself under elided-infer lifetime rib too.

Fixes rust-lang/rust#156758. Part of rust-lang/rust#118212.
r? @petrochenkov
2026-05-20 15:37:32 +02:00
Jonathan Brouwer b6280360dd Rollup merge of #156747 - BurntSushi:ag/num-buffer-example, r=GuillaumeGomez
Add an example to the `NumBuffer` documentations

We specifically call out that the sign is written for negative
integers. This would also ideally be called out in `<iN>::format_into`,
but the macro infrastructure for the implementation unfortunately
doesn't really make this easy as far as I can tell.

Ref rust-lang/rust#138215
2026-05-20 15:37:31 +02:00
Jonathan Brouwer ea21bcc942 Rollup merge of #156317 - lokirithm:reorg-tests-04, r=Kivooeo
Reorg tests 04

| old-name | new-sub-dir | new-name |
|-|-|-|
| `issue-27997.rs` [issue](https://github.com/rust-lang/rust/issues/27997) | `codegen/` | `correctly-monomorphize-generic-drop-impl.rs` |
| `issue-31299.rs` [issue](https://github.com/rust-lang/rust/issues/31299) | `associated-types/` | `sized-recursive-type-via-associated-type.rs` |
| `issue-35815.rs` [issue](https://github.com/rust-lang/rust/issues/35815) | `codegen/` | `dont-roundup-dst-prefix-size-to-alignment.rs` |
| `issue-46855.rs` [issue](https://github.com/rust-lang/rust/issues/46855) | `mir/` | `dont-use-operand-as-place-for-zst.rs` |
| `issue-47486.rs` [issue](https://github.com/rust-lang/rust/issues/47486) | `consts/` | `size_of-requires-type-annotation-in-const.rs` |
| `issue-47486.stderr` | `consts/` | `size_of-requires-type-annotation-in-const.stderr` |
| `issue-50811.rs` [issue](https://github.com/rust-lang/rust/issues/50811) | `mir/` | `validate-various-comparison-behavior.rs` |
2026-05-20 15:37:30 +02:00
bors 9128490ab3 Auto merge of #156763 - qaijuang:156676-follow-up, r=chenyukang
Account for proc macro spans in do_not_recommend diagnostics

Follow up to rust-lang/rust#156676.

Fixes rust-lang/rust#156759

r? @chenyukang
2026-05-20 11:53:54 +00:00
bors ca869e7d89 Auto merge of #156715 - fee1-dead-contrib:noinline-rustc-driver, r=petrochenkov
rustc_driver: do not inline docs from `_impl` crate

The inlined docs from `_impl` crate will not have the source code shown/linked but search results for functions such as `init_rustc_env_logger` show the one from the `rustc_driver` crate (without source code). It makes sense to only keep the `_impl` crate's docs in this case.

(compare https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/fn.init_rustc_env_logger.html and https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver_impl/fn.init_rustc_env_logger.html)

cc @jyn514 :)
2026-05-20 08:41:43 +00:00
qaijuang 658e9fb052 fix do_not_recommend span fallback for proc macros 2026-05-20 02:18:16 -04:00