308847 Commits

Author SHA1 Message Date
bors
4146079cee Auto merge of #148231 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

11 commits in 344c4567c634a25837e3c3476aac08af84cf9203..6c1b6100343691341b9e76c5acc594e78220f963
2025-10-15 15:01:32 +0000 to 2025-10-28 16:27:52 +0000
- feat(build-analysis): JSONL-based logging infra (rust-lang/cargo#16150)
- feat: support array of any types in Cargo config (rust-lang/cargo#16103)
- test(git): add more fetch-index backend interop  (rust-lang/cargo#16162)
- feat(git): support shallow fetch for Git CLI backend (rust-lang/cargo#16156)
- Fix mdman to not incorrectly strip `<p>` tags (rust-lang/cargo#16158)
- chore(triagebot): enable range-diff and review-changes-since (rust-lang/cargo#16152)
- Avoid specifying which version will change behavior (rust-lang/cargo#16153)
- Make shell completion variables private. (rust-lang/cargo#16144)
- More warning conversions (rust-lang/cargo#16143)
- Bump openssl-src to 300.3.5.4+3.5.4 (rust-lang/cargo#16140)
- build: remove duplicate dependency, consolidate over unicode-ident (rust-lang/cargo#16137)
2025-10-29 05:10:21 +00:00
bors
907705abea Auto merge of #148208 - camsteffen:assign-desugar-span, r=wesleywiser
Remove unused `AssignDesugar` span
2025-10-29 01:59:52 +00:00
Zalathar
51f3cab3b9 Always print a signed percentage in job duration changes 2025-10-29 12:05:08 +11:00
bors
044d68c3cb Auto merge of #148182 - saethlin:trivial-consts-recursive, r=eholk
Accept trivial consts based on trivial consts

This is an expansion of https://github.com/rust-lang/rust/pull/148040.

The previous implementation only accepted trivial consts that assign a literal. For example:
```rust
const A: usize = 0;
const B: usize = A;
```
Before this PR, only `A` was a trivial const. Now `B` is too.
2025-10-28 22:52:08 +00:00
Weihang Lo
f583ecd09d Update cargo submodule 2025-10-28 18:17:11 -04:00
Tomasz Miąsko
e9252a42f5 Skip parameter attribute deduction for MIR with spread_arg
When a MIR argument is spread at ABI level, deduced attributes are
potentially misapplied, since a spread argument can correspond to zero
or more arguments at ABI level.

Disable deduction for MIR using spread argument for the time being.
2025-10-28 23:07:04 +01:00
ltdk
8e0fe66920 Run regression test for Cow inference on next solver too 2025-10-28 16:49:15 -04:00
Josh Stone
8fd2dc0034 Update #[cfg(bootstrap)] 2025-10-28 13:35:43 -07:00
Josh Stone
25c7bd9c3d Bump stage0 to 1.92.0-beta.1 2025-10-28 13:35:43 -07:00
Josh Stone
f25ca45fd1 Update CURRENT_RUSTC_VERSION post-bump
(cherry picked from commit 813072186c1c305ea62c7270f1514dfab5166af2)
2025-10-28 13:22:00 -07:00
bors
278a90913d Auto merge of #148220 - matthiaskrgr:rollup-wtkkn0t, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#148173 (Emit delayed bug during wfck for stranded opaque)
 - rust-lang/rust#148177 (Allow codegen backends to indicate which crate types they support)
 - rust-lang/rust#148180 (rustdoc: remove `--emit=unversioned-shared-resources`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-28 19:43:32 +00:00
Jynn Nelson
706d600232 bootstrap: ensure(doc::Std) no longer opens a browser
In general, the rationale for `--open` is to only open HTML files if
they were "explicitly" invoked from the CLI (e.g. `x doc --open
library/core`). The existing logic did not do that. Instead it opened
the docs unconditionally when a subset of the crates was requested. This
is unfortunate for other Steps in bootstrap, which may wish to `ensure()`
the standard library docs without opening them.

Change `Std` to check if it was explicitly invoked, rather than assuming
it's the case.
2025-10-28 13:24:43 -04:00
Matthias Krüger
71c4c899cd Rollup merge of #148180 - notriddle:unversioned-shared-resources, r=GuillaumeGomez
rustdoc: remove `--emit=unversioned-shared-resources`

This option hasn't done anything for a long time, and can be removed. I've kept a shim in place to avoid breaking docs.rs, but the option no longer does anything.

Using git-blame, I tracked this option down to
f77ebd4ffa, the commit that introduced EmitType in the first place. It was used with SharedResource::Unversioned, which no longer exists since f9e1f6ffdf removed them.

CC https://github.com/rust-lang/rust/pull/146220
Part of https://github.com/rust-lang/rust/issues/83784
2025-10-28 17:49:30 +01:00
Matthias Krüger
6a7bcec8da Rollup merge of #148177 - bjorn3:codegen_backend_crate_types, r=WaffleLapkin
Allow codegen backends to indicate which crate types they support

This way cargo will drop the unsupported crate types for crates that
specify multiple crate types.

This is a prerequisite for https://github.com/rust-lang/miri/pull/4648.
2025-10-28 17:49:29 +01:00
Matthias Krüger
1fe148371a Rollup merge of #148173 - tiif:fix-opaque-ice, r=BoxyUwU
Emit delayed bug during wfck for stranded opaque

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/235

## Problem

The fundamental issue here is ``OpaqueTypeCollector`` operates on ``rustc_middle::Ty``, but ``check_type_wf`` operates on HIR.

Since [check_type_wf](2f7620a5cc/compiler/rustc_hir_analysis/src/check/wfcheck.rs (L2262)) operates on HIR, it can see the stranded opaque and tries to infer it's hidden type. But ``OpaqueTypeCollector`` operates on ``rustc_middle::Ty``, so the ``OpaqueTypeCollector`` can no longer see a stranded opaque, hence its hidden type could not be inferred.

As a result, the tests ICE'ed at 34a8c7368c/compiler/rustc_hir_analysis/src/collect/type_of/opaque.rs (L253)

## Proposed solution

This PR detects stranded opaque types during wf check and emit a delayed bug for it.

## Alternative solution

`@BoxyUwU` and I had considered rewriting ``OpaqueTypeCollector`` to be a HIR visitor instead of a ``rustc_middle::Ty`` visitor, but we believe a HIR-based ``OpaqueTypeCollector`` will not work and might not worth the cost of rewriting.

## Acknowledgement

This PR is a joint effort with `@BoxyUwU` :3
2025-10-28 17:49:29 +01:00
apiraino
c49278f77a Update T-compiler/ops Zulip messages
Slightly reword the issue prioritization and beta backport Zulip messages
2025-10-28 17:24:26 +01:00
Cameron Steffen
a45c6dd2c0 Remove AssignDesugar span 2025-10-28 11:18:58 -05:00
bjorn3
9fc1378916 Report correct unsupported crate type for the dummy codegen backend 2025-10-28 14:26:01 +00:00
bors
bc1d7273df Auto merge of #146186 - dpaoliello:cc, r=jieyouxu
Update cc-rs to 1.2.39

For my purposes, contains fixes when compiling the Rust compiler for Arm64EC.

Checked the commits since 1.2.16, and I don't see anything else that may affect Rust?

`find-msvc-tools` was also factored out from `cc` to allow updating the use in `rustc_codegen_ssa` (finding the linker when running the Rust compiler) to be separate from the use in `rustc_llvm` (building LLVM as part of the Rust compiler).
2025-10-28 13:25:45 +00:00
tiif
c797724ed5 Add delayed bug for stranded opaque 2025-10-28 13:02:24 +00:00
tiif
eb113533a3 Add test 2025-10-28 13:02:19 +00:00
Oli Scherer
3ca752f979 Trait aliases are rare large ast nodes, box them 2025-10-28 11:11:56 +00:00
bors
c9537a94a6 Auto merge of #148202 - Zalathar:rollup-2eriuc3, r=Zalathar
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#144936 (CFI: Fix types that implement Fn, FnMut, or FnOnce)
 - rust-lang/rust#147185 (repr(transparent): do not consider repr(C) types to be 1-ZST)
 - rust-lang/rust#147840 (Rework unsizing coercions in the new solver)
 - rust-lang/rust#147915 (Update target maintainers android.md)
 - rust-lang/rust#148013 (1.91.0 release notes)
 - rust-lang/rust#148044 (compiletest: show output in debug logging)
 - rust-lang/rust#148057 (tests/ui/sanitizer/hwaddress.rs: Run on aarch64 and remove cgu hack)
 - rust-lang/rust#148139 (Add `coverage` scope for controlling paths in code coverage)
 - rust-lang/rust#148154 (Add a mailmap entry)
 - rust-lang/rust#148158 (ci: loongarch64: use medium code model to avoid relocation overflows)
 - rust-lang/rust#148166 (Re-enable macro-stepping test for AArch64)
 - rust-lang/rust#148172 (rustc-dev-guide subtree update)
 - rust-lang/rust#148175 (Fix typos: duplicate words in comments)
 - rust-lang/rust#148186 (rustdoc-search: add an integration test for CCI)

Failed merges:

 - rust-lang/rust#147935 (Add LLVM realtime sanitizer)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-28 09:55:34 +00:00
Stuart Cook
21a1573742 Rollup merge of #148186 - notriddle:test-cci, r=GuillaumeGomez,jieyouxu
rustdoc-search: add an integration test for CCI

Part of https://github.com/rust-lang/rust/issues/130676
2025-10-28 20:39:41 +11:00
Stuart Cook
ff7909bc21 Rollup merge of #148175 - osamakader:fix-typos-duplicate-words, r=lcnr
Fix typos: duplicate words in comments

- Fix 'the the' → 'the' in rustc_const_eval
- Fix 'wether' → 'whether' in compiletest
- Fix 'is is' → 'is' in rustc_ast_pretty (2 instances)
2025-10-28 20:39:40 +11:00
Stuart Cook
86161675ea Rollup merge of #148172 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to b9fb8e9708.

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

r? ```@ghost```
2025-10-28 20:39:40 +11:00
Stuart Cook
a45371f7fe Rollup merge of #148166 - Jamesbarford:fix/aarch64-reenable-macro-stepping, r=wesleywiser
Re-enable macro-stepping test for AArch64

r? `@ghost`

triaging https://github.com/rust-lang/rust/issues/37225

edit: closes https://github.com/rust-lang/rust/issues/37225
2025-10-28 20:39:39 +11:00
Stuart Cook
d02848e1a4 Rollup merge of #148158 - heiher:loong64-medium, r=jieyouxu
ci: loongarch64: use medium code model to avoid relocation overflows

The LoongArch C/C++ cross toolchain defaults to the `normal` code model, which can cause relocation overflows when linking LLVM after upgrading to verion 22. This change uses the `medium`code model for `loongarch64-linux-gnu` and `loongarch64-linux-musl` builds to avoid these linking errors.
2025-10-28 20:39:38 +11:00
Stuart Cook
b4db48a36a Rollup merge of #148154 - WaffleLapkin:mail-and-ename, r=WaffleLapkin
Add a mailmap entry

I accidentally commited some things with my name/email swapped ^^'
2025-10-28 20:39:38 +11:00
Stuart Cook
a383fe8f20 Rollup merge of #148139 - Urgau:add-coverage-scope, r=Zalathar
Add `coverage` scope for controlling paths in code coverage

This PR adds a `coverage` scope (for `-Zremap-path-scope`) for controlling if the paths that ends up in code coverage output should be remapped or not.

Currently code coverage use the `macro` scope which is not a appropriate scope for them.

Found during the stabilization of `-Zremap-path-scope` https://github.com/rust-lang/rust/pull/147611#issuecomment-3396210043 and was asked to be in a separate PR in https://github.com/rust-lang/rust/pull/147611#issuecomment-3448455252.

r? compiler
2025-10-28 20:39:37 +11:00
Stuart Cook
78526e4720 Rollup merge of #148057 - Enselic:hwasan-fix-v2, r=nagisa
tests/ui/sanitizer/hwaddress.rs: Run on aarch64 and remove cgu hack

To avoid linker errors like

    relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.data.rel.ro..L.hwasan'

we need to have `-C target-feature=+tagged-globals`, which is documented [here](https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html#hwaddresssanitizer).  I learned that [here](https://github.com/llvm/llvm-project/pull/164876#issuecomment-3439034858).

Closes rust-lang/rust#83989

try-job: aarch64-gnu
2025-10-28 20:39:36 +11:00
Stuart Cook
bfa7219a3a Rollup merge of #148044 - jyn514:compiletest-logging, r=Zalathar
compiletest: show output in debug logging

I had a test I was confused by; the root issue is that `error-pattern` runs before normalization, even though `//~ ERROR` runs after normalization. This logging caught the issue immediately.
2025-10-28 20:39:36 +11:00
Stuart Cook
07e505fcf4 Rollup merge of #148013 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
1.91.0 release notes

This imports https://github.com/rust-lang/rust/issues/147010 into a PR in preparation for the release next week. It also imports a subset of the Cargo release notes (cc ```@rust-lang/cargo).```

r? ```@rust-lang/release```

```@triagebot``` ping relnotes-interest-group
2025-10-28 20:39:35 +11:00
Stuart Cook
b770888039 Rollup merge of #147915 - pirama-arumuga-nainar:patch-1, r=lqd
Update target maintainers android.md
2025-10-28 20:39:34 +11:00
Stuart Cook
1cf3dc6b5a Rollup merge of #147840 - jdonszelmann:unsizing-coercions, r=lcnr
Rework unsizing coercions in the new solver

Replaces https://github.com/rust-lang/rust/pull/141926, contains:

- a commit adding tests that fail before this work
- the two commits from the previous PR
- a commit in which these tests are fixed
- finally, a fixup for an in my opinion rather large regression in diagnostics. It's still not perfect, but better?

I hope this is roughly what you had in mind

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/241 and https://github.com/rust-lang/trait-system-refactor-initiative/issues/238, adding tests for both

r? ````@lcnr````
2025-10-28 20:39:33 +11:00
Stuart Cook
ef8003bbb9 Rollup merge of #147185 - RalfJung:repr-c-not-zst, r=petrochenkov
repr(transparent): do not consider repr(C) types to be 1-ZST

Context: https://github.com/rust-lang/unsafe-code-guidelines/issues/552

This experiments with a [suggestion](https://github.com/rust-lang/rfcs/pull/3845#discussion_r2388463698) by ```@RustyYato``` to stop considering repr(C) types as 1-ZST for the purpose of repr(transparent). If we go with https://github.com/rust-lang/rfcs/pull/3845 (or another approach for fixing repr(C)), they will anyway not be ZST on all targets any more, so this removes a portability hazard. Furthermore, zero-sized repr(C) structs [may have to be treated](https://github.com/rust-lang/unsafe-code-guidelines/issues/552#issuecomment-3250657813) as non-ZST for the win64 ABI (at least that's what gcc/clang do), so allowing them to be ignored in repr(transparent) types is not entirely coherent.

Turns out we already have an FCW for repr(transparent), namely https://github.com/rust-lang/rust/issues/78586. This extends that lint to also check for repr(C).
2025-10-28 20:39:32 +11:00
Stuart Cook
68618a8f92 Rollup merge of #144936 - rcvalle:rust-cfi-fix-144641, r=lcnr
CFI: Fix types that implement Fn, FnMut, or FnOnce

When looking for instances which could either be dynamically called through a vtable or through a concrete trait method, we missed `FnPtrShim`, instead only looking at `Item` and closure-likes. Fixes rust-lang/rust#144641.

cc ```@1c3t3a``` ```@Jakob-Koschel```
2025-10-28 20:39:32 +11:00
bors
df984edf44 Auto merge of #147083 - dianne:non-extended-indices, r=matthewjasper
Do not lifetime-extend array/slice indices

When lowering non-overloaded indexing operations to MIR, this uses the temporary lifetime of the index expression for the index temporary, rather than applying the temporary lifetime of the indexing operation as a whole to the index.

For example, in
```rust
let x = &xs[i];
```
previously, the temporary containing the result of evaluating `i` would live until the end of the block due to the indexing operation being [lifetime-extended](https://doc.rust-lang.org/nightly/reference/destructors.html#temporary-lifetime-extension). Under this PR, the index temporary only lives to the end of the `let` statement because it uses the more precise temporary lifetime of the index expression.

I don't think this will affect semantics in an observable way, but the more precise `StorageDead` placement may slightly improve analysis/codegen performance.

r? mir
2025-10-28 03:02:00 +00:00
Cameron Steffen
95732f42cd Fix a bad hint 2025-10-27 21:19:38 -05:00
Cameron Steffen
bef018eae3 Mark yield spans with desugaring 2025-10-27 21:19:38 -05:00
Cameron Steffen
ead5e120a5 Remove QPath::LangItem 2025-10-27 21:19:38 -05:00
Cameron Steffen
a96e21b199 Remove QPath::LangItem from try 2025-10-27 21:19:38 -05:00
Cameron Steffen
bd13c30d98 Remove QPath::LangItem from async 2025-10-27 21:19:38 -05:00
Cameron Steffen
7cbff63411 Remove QPath::LangItem from ranges 2025-10-27 21:19:38 -05:00
Cameron Steffen
9c98533491 Remove QPath::LangItem from contracts 2025-10-27 20:35:55 -05:00
Cameron Steffen
eac2c2523e Remove QPath::LangItem from format_args! 2025-10-27 20:35:55 -05:00
Cameron Steffen
e289f27329 Remove QPath::LangItem from for loops 2025-10-27 20:35:55 -05:00
Cameron Steffen
7e51a763c9 Prefactor LangItem::QPath lowering functions
Get ready to incrementally remove LangItem::QPath.
2025-10-27 19:31:45 -05:00
Cameron Steffen
6f3d0f7796 Introduce qpath lang item utils 2025-10-27 19:31:45 -05:00
Michael Howell
fe3490c562 rustdoc: remove --emit=unversioned-shared-resources
This option hasn't done anything for a long time, and can be
removed. I've kept a shim in place to avoid breaking docs.rs,
but the option no longer does anything.

Using git-blame, I tracked this option down to
f77ebd4ffa, the commit that
introduced EmitType in the first place. It was used with
SharedResource::Unversioned, which no longer exists since
f9e1f6ffdf removed them.

CC https://github.com/rust-lang/rust/pull/146220
Part of https://github.com/rust-lang/rust/issues/83784
2025-10-27 17:28:51 -07:00