Commit graph

308340 commits

Author SHA1 Message Date
Oli Scherer
179da5da69
Merge pull request #4615 from rust-lang/rustup-2025-10-03
Automatic Rustup
2025-10-03 06:26:54 +00:00
The Miri Cronjob Bot
6beb612c13 Merge ref '3b8665c5ab' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 3b8665c5ab
Filtered ref: 67ff7e0b0141ef570f3c1ca7e643faf55b58b7f1
Upstream diff: 42b384ec0d...3b8665c5ab

This merge was created using https://github.com/rust-lang/josh-sync.
2025-10-03 05:00:28 +00:00
Shoyu Vanilla (Flint)
30796a0db3
Merge pull request #20787 from ChayimFriedman2/fix-type-alias-enum
fix: Fix erroneous diagnostic incorrect_generics_len when there are generics on enum variant used through type alias
2025-10-03 04:54:50 +00:00
The Miri Cronjob Bot
8583e1582e Prepare for merging from rust-lang/rust
This updates the rust-version file to 3b8665c5ab.
2025-10-03 04:52:46 +00:00
Jules Bertholet
d6fdadb8e9
Mitigate thread_local! shadowing issues
Mitigates https://github.com/rust-lang/rust/issues/147006
and https://github.com/rust-lang/rust/issues/99018
2025-10-03 00:00:39 -04:00
Chayim Refael Friedman
48df0e2833 Fix erroneous diagnostic incorrect_generics_len when there are generics on enum variant used through type alias 2025-10-03 06:54:32 +03:00
bors
3b8665c5ab Auto merge of #147282 - Zalathar:rollup-7wz3k9r, r=Zalathar
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#141839 (make rust-analyzer use a dedicated build directory)
 - rust-lang/rust#146166 (Implement range support in `//@ edition`)
 - rust-lang/rust#147259 (cg_llvm: Use helper methods for all calls to `LLVMMDNodeInContext2`)
 - rust-lang/rust#147263 (Disable triagebot auto stable-regression compiler backport nominations pending redesign)
 - rust-lang/rust#147268 (add arm-maintainers to various targets)
 - rust-lang/rust#147270 (Move doc_cfg-specific code into `cfg.rs`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-03 00:49:22 +00:00
dianqk
c2a03cefd8
debuginfo: Use LocalRef to simplify reference debuginfos
If the `LocalRef` is `LocalRef::Place`, we can refer to it directly,
because the local of place is an indirect pointer.
Such a statement is `_1 = &(_2.1)`.
If the `LocalRef` is `LocalRef::Operand`,
the `OperandRef` should provide the pointer of the reference.
Such a statement is `_1 = &((*_2).1)`.

But there is a special case that hasn't been handled, scalar pairs like `(&[i32; 16], i32)`.
2025-10-03 08:08:22 +08:00
Stuart Cook
9e1b24d9e4
Rollup merge of #147270 - GuillaumeGomez:move-cfg-code, r=lolbinarycat
Move doc_cfg-specific code into `cfg.rs`

Follow-up of https://github.com/rust-lang/rust/pull/138907.

r? lolbinarycat
2025-10-03 09:16:29 +10:00
Stuart Cook
87c7946c8f
Rollup merge of #147268 - davidtwco:add-arm-maintainers-to-targets, r=lqd
add arm-maintainers to various targets

Add the ``@rust-lang/arm-maintainers`` team as maintainers to the following targets:

- `aarch64-unknown-linux-gnu`
- `aarch64-unknown-none`/`aarch64-unknown-none-softfloat`
- `aarch64-unknown-uefi`
- `armv7-unknown-linux-gnueabi`/`armv7-unknown-linux-gnueabihf`
- `armv7a-none-eabi`/`armv7a-none-eabihf`
- `armv7r-none-eabi`/`armv7r-none-abihf`
- `armv8r-none-eabihf`
- `thumbv7em-none-eabi`/`thumbv7em-none-eabihf`
- `thumbv7m-none-eabi`
- `thumbv8m.base-none-eabi`
- `thumbv8m.main-none-eabi`/`thumbv8m.main-none-eabihf`

cc `@thejpster`
2025-10-03 09:16:29 +10:00
Stuart Cook
179d182c83
Rollup merge of #147263 - jieyouxu:disable-auto-backport-nominations, r=apiraino,Urgau
Disable triagebot auto stable-regression compiler backport nominations pending redesign

Current auto compiler stable-regression backport nominations seem to be too aggressive, and seems to unfortunately lower signal-to-noise ratio of the compiler backport channel. So this PR disables the triagebot compiler auto stable-regression backport nominations pending a redesign. Beta-regression auto backport nominations are not modified, we might want to gather some more experience with it.

No prejudice against re-enabling them if the nominations include a bit more context on _why_ it's automatically nominated and _which_ regression(s) are being addressed. Or as proposed, it could also simply become a reminder-to-nominate _comment_.

cf. [#t-compiler/backports > #146919: stable-nominated @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23146919.3A.20stable-nominated/near/540979327)

> I like the idea of rustbot just posting a message that suggests adding the label. That seems like a good compromise between avoiding forgotten nominations and avoiding spurious nominations.

In any case, this was very much worth experimenting!

r? `@apiraino` (or triagebot)
2025-10-03 09:16:28 +10:00
Stuart Cook
7a011558aa
Rollup merge of #147259 - Zalathar:node-in-context, r=nnethercote
cg_llvm: Use helper methods for all calls to `LLVMMDNodeInContext2`

Originally I was only planning on extracting an `md_node_in_context` method, but then I noticed that all callers of `LLVMMDNodeInContext2` could be covered by a small number of additional helper methods.

There should be no change in compiler output.
2025-10-03 09:16:27 +10:00
Stuart Cook
6fe05b5162
Rollup merge of #146166 - ferrocene:pvdrz/edition-range, r=fmease,jieyouxu
Implement range support in `//@ edition`

First step to solve https://github.com/rust-lang/rust/issues/145364
2025-10-03 09:16:27 +10:00
Stuart Cook
a3291ede1a
Rollup merge of #141839 - tshepang:ease-lsp-use, r=Mark-Simulacrum,fee1-dead
make rust-analyzer use a dedicated build directory

inspired by https://github.com/rust-lang/rust/pull/132794
2025-10-03 09:16:26 +10:00
Alex Crichton
ce2087692f Add a new wasm32-wasip3 target to Rust
This commit adds a new tier 3 target to rustc, `wasm32-wasip3`. This
follows in the footsteps of the previous `wasm32-wasip2` target and is
used to represent binding to the WASIp3 set of APIs managed by the WASI
subgroup to the WebAssembly Community Group.

As of now the WASIp3 set of APIs are not finalized nor standardized.
They're in the process of doing so and the current trajectory is to have
the APIs published in December of this year. The goal here is to get the
wheels turning in Rust to have the target in a
more-ready-than-nonexistent state by the time this happens in December.

For now the `wasm32-wasip3` target looks exactly the same as
`wasm32-wasip2` except that `target_env = "p3"` is specified. This
indicates to crates in the ecosystem that WASIp3 APIs should be used,
such as the [`wasip3` crate]. Over time this target will evolve as
implementation in guest toolchains progress, notably:

* The standard library will use WASIp3 APIs natively once they're
  finalized in the WASI subgroup.
* Support through `wasi-libc` will be updated to use WASIp3 natively
  which Rust will then transitively use.
* Longer-term, features such as cooperative multithreading will be added
  to the WASIp3-track of targets to enable using `std::thread`, for
  example, on this target.

These changes are all expected to be non-breaking changes for users of
this target. Runtimes supporting WASIp3, currently Wasmtime and Jco,
support WASIp2 APIs as well and will work with components whether or not
they import WASIp2, both WASIp2 and WASIp3, or just WASIp3 APIs. This
means that changing the internal implementation details of libstd over
time is expected to be a non-breaking change.

[`wasip3` crate]: https://crates.io/crates/wasip3
2025-10-02 15:09:09 -07:00
Deadbeef
a5c9030271 Extract common logic for iterating over features
Two places doing the same thing is enough to motivate me to extract this to a method :)
2025-10-02 21:43:14 +00:00
bors
8d603ef287 Auto merge of #147231 - CrooseGit:dev/reucru01/extend_rustc_force_inline, r=saethlin
Extending `#[rustc_force_inline]` to be applicable to inherent methods

`#[rustc_force_inline]` is an internal-only attribute similar to `#[inline(always)]` but which emits an error if inlining cannot occur. rustc_force_inline uses the MIR inliner to do this and has limitations on where it can be applied to ensure that an error is always emitted if inlining can't happen (e.g. it can't be applied to trait methods because calls to those can't always be resolved).

`#[rustc_force_inline]` is motivated by AArch64 pointer authentication intrinsics where it is vital for the security properties of these intrinsics that they do not exist in standalone functions that could be used as gadgets in an exploit (if they could, then you could sign whatever pointers you want, for example, which is bad, but if you force inlining, then you can't jump to a reusable function containing only these instructions).

Since its initial implementation, `#[rustc_force_inline]` could only be applied to free functions. This can be relaxed to also allow inherent methods while still preserving the desired properties. In a work-in-progress patch for manual pointer authentication intrinsics, it is useful to introduce types with inherent methods that would need to be force inlined.

r? `@saethlin`
2025-10-02 21:43:10 +00:00
Jubilee Young
99550fbc3e Return to needs-llvm-components being info-only
Partially revert a535042e80

Even with non-LLVM codegen backends, we want to allow for annotations
that express dependencies to LLVM-specific parts of the test suite.
This includes `//@ needs-llvm-components`, which just allows checking
that LLVM is built with relevant target support before the test is run.
It does not assert the test cannot work with another codegen backend.
2025-10-02 14:39:18 -07:00
jackh726
a3fbae599c Merge match and if 2025-10-02 21:19:57 +00:00
jackh726
c6c58e3fff Remove UsageKind::HasError 2025-10-02 21:15:16 +00:00
jackh726
9a5cef155f Cleanup opaque_type computation a bit 2025-10-02 21:12:32 +00:00
jackh726
db3c9b640e When computing opaque types in the next solver, take an initial pass pre-fallback where we equate hidden types but do not report errors 2025-10-02 21:06:16 +00:00
Michael Howell
c7d6857f75 rustdoc: use same stage for all pr check docs 2025-10-02 15:29:36 -05:00
binarycat
d0dc603c39 rustdoc: add testcase for traitParent deduplication 2025-10-02 15:29:22 -05:00
binarycat
a145dfff03 search.js: introduce optimized removeIdxListAsc routine 2025-10-02 15:29:11 -05:00
binarycat
2dd00d3391 fix rustdoc tests broke by trait item filtering 2025-10-02 15:28:00 -05:00
binarycat
c407d340de if a trait item is shown in search results, hide the impl item
for example, if we're showing `Iterator::next`,
we don't need to also show `Range::next` in the results.

Co-authored-by: Michael Howell <michael@notriddle.com>
2025-10-02 15:27:40 -05:00
Jason Newcomb
3d2a8df077 Upgrade toml to 0.9.7 and remove the serde feature. 2025-10-02 15:31:42 -04:00
reddevilmidzy
fab9906c21 test: Add regression test for ICE when projecting associated types through dyn traits 2025-10-03 04:28:29 +09:00
Folkert de Vries
9db778155e
add indirect call example to track-caller-ffi.rs 2025-10-02 20:53:13 +02:00
Folkert de Vries
7d99979077
use codegen_instance_attrs in some additional places 2025-10-02 20:53:13 +02:00
Folkert de Vries
20d62469ba
the #[track_caller] shim should not inherit #[no_mangle] 2025-10-02 20:53:12 +02:00
Karol Zwolak
d1d7b9472a bring back plural 'alternatives' in suggestion message 2025-10-02 20:24:34 +02:00
Karol Zwolak
5a8f963426 fix wording; we're replacing coma with a bar 2025-10-02 20:13:18 +02:00
dswij
aa1fa10458
split copies lints each into its own module (#15721)
changelog: none
2025-10-02 18:12:24 +00:00
Martin Nordholts
fe66eaa67a Fix backtraces with -C panic=abort on linux; emit unwind tables by default
The linux backtrace unwinder relies on unwind tables to work properly,
and generating and printing a backtrace is done by for example the
default panic hook.

Begin emitting unwind tables by default again with `-C panic=abort` (see
history below) so that backtraces work.

History
=======

Backtraces with `-C panic=abort` used to work in Rust 1.22 but broke in
Rust 1.23, because in 1.23 we stopped emitting unwind tables with `-C
panic=abort` (see 24cc38e3b0).

In 1.45 (see cda994633e) a workaround in the form
of `-C force-unwind-tables=yes` was added.

`-C panic=abort` was added in [Rust
1.10](https://blog.rust-lang.org/2016/07/07/Rust-1.10/#what-s-in-1-10-stable)
and the motivation was binary size and compile time. But given how
confusing that behavior has turned out to be, it is better to make
binary size optimization opt-in with `-C force-unwind-tables=no` rather
than default since the current default breaks backtraces.

Besides, if binary size is a primary concern, there are many other
tricks that can be used that has a higher impact.
2025-10-02 19:46:41 +02:00
Laurențiu Nicola
8efe156db7
Merge pull request #20784 from Supakornn/master
Update license references to use markdown links
2025-10-02 17:05:26 +00:00
Supakorn Ieamgomol
73ee45d13a
Update license references to use markdown links 2025-10-02 23:56:02 +07:00
Christian Poveda
6631c8ef55
Document range syntax on the rustc dev guide 2025-10-02 11:13:22 -05:00
Pietro Albini
c61ec946d2
implement range support in //@ edition 2025-10-02 11:13:20 -05:00
bors
5c7ae0c7ed Auto merge of #147196 - LorrensP-2158466:same-res-ambiguity-test, r=petrochenkov
Test: Ambigious bindings in same namespace with the same res

Add a test based on the discussion [here](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/near/542316157) and related to https://github.com/rust-lang/rust/issues/145575#issuecomment-3228868375.

This is the most reduced form I could create that passes on nightly but fails with rust-lang/rust#145108 (see [#gsoc > Project: Parallel Macro Expansion @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/near/542335131)).

Also not sure about the test names.

r? `@petrochenkov`
2025-10-02 15:23:49 +00:00
Yotam Ofek
78c2e58a7a [rustdoc] Optimize "highlight::end_expansion" 2025-10-02 17:49:05 +03:00
David Wood
7715c0d648
add arm-maintainers to various targets 2025-10-02 15:42:05 +01:00
Guillaume Gomez
6275a19255 Move doc_cfg-specific code into cfg.rs 2025-10-02 15:24:04 +02:00
Scott Schafer
6d06db51b6 test: Subtract code_offset from width for ui_testing 2025-10-02 05:45:16 -06:00
Scott Schafer
9c6897bd07
test: Subtract code_offset from width for ui_testing 2025-10-02 05:45:16 -06:00
Scott Schafer
0a5817aa2e
test: Set diagnostic-width flag for long diagnostic width tests 2025-10-02 05:45:16 -06:00
Scott Schafer
6e225424a6
test: Add empty line to tests getting new flag in next commit 2025-10-02 05:45:12 -06:00
bors
94ecb52bbe Auto merge of #147261 - matthiaskrgr:rollup-yh3fgvc, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#146281 (Support `#[rustc_align_static]` inside `thread_local!`)
 - rust-lang/rust#146535 (mbe: Implement `unsafe` attribute rules)
 - rust-lang/rust#146585 (indexing: reword help)
 - rust-lang/rust#147004 (Tweak handling of "struct like start" where a struct isn't supported)
 - rust-lang/rust#147221 (Forbid `//@ compile-flags: -Cincremental=` in tests)
 - rust-lang/rust#147225 (Don't enable shared memory by default with Wasm atomics)
 - rust-lang/rust#147227 (implement `Box::take`)
 - rust-lang/rust#147233 (Initialize llvm submodule if not already the case to run citool)
 - rust-lang/rust#147236 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-02 11:14:37 +00:00
Reuben Cruise
5bf5e71160 Extends rustc_force_inline to inherent methods
- Changes parser to allow application to inherent methods.
- Adds tests to confirm extended functionality works just as the existing.
2025-10-02 11:30:11 +01:00