about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-10-04Auto merge of #147323 - chenyukang:yukang-fix-tidy-check, r=jieyouxu HEAD masterbors-7/+6
Fix top level ui tests check in tidy I got an error when pushing code: ```console fmt check fmt: checked 6330 modified files tidy check tidy [ui_tests (tests)]: ui tests should be added under meaningful subdirectories: `/Users/yukang/rust/tests/ui/.DS_Store` tidy [ui_tests (tests)]: FAIL ``` I think it's better to use `ignore::WalkBuilder` for checking the path. r? `@jieyouxu`
2025-10-04Fix top level ui tests check in tidyyukang-7/+6
2025-10-04Auto merge of #147308 - matthiaskrgr:rollup-ov04tbi, r=matthiaskrgrbors-175/+386
Rollup of 5 pull requests Successful merges: - rust-lang/rust#147245 (only replace the intended comma in pattern suggestions) - rust-lang/rust#147269 (Add regression test for 123953) - rust-lang/rust#147277 (Extract common logic for iterating over features) - rust-lang/rust#147292 (Respect `-Z` unstable options in `rustdoc --test`) - rust-lang/rust#147300 (Add xtensa arch to object file creation) r? `@ghost` `@rustbot` modify labels: rollup
2025-10-04Auto merge of #147299 - compiler-errors:hr-norm, r=jackh726bors-13/+107
Don't normalize higher-ranked assumptions if they're not used See the comment in the code. Normalizing these assumptions may cause us to register things like new placeholder outlives obligations that cause higher-ranked lifetime errors, and this is problematic if we're not even using these assumptions in borrowck. Fixes rust-lang/rust#147244 Fixes rust-lang/rust#147285
2025-10-03Rollup merge of #147300 - esp-rs:xtensa-meta, r=saethlinMatthias Krüger-0/+1
Add xtensa arch to object file creation Just something that was missed in the xtensa target PRs.
2025-10-03Rollup merge of #147292 - Urgau:rustdoc-test-unstable_opts, r=fmeaseMatthias Krüger-134/+213
Respect `-Z` unstable options in `rustdoc --test` This PR makes rustdoc respect `-Z` unstable options when collecting doctests (`rustdoc --test`). In the process I also realized that `--error-format` wasn't respected as well, making UI annotations impossible to write so I fixed that as well. Best reviewed commit by commit. Fixes https://github.com/rust-lang/rust/issues/147276 Fixes https://github.com/rust-lang/rust/issues/143930 r? fmease
2025-10-03Rollup merge of #147277 - fee1-dead-contrib:featiter, r=ZalatharMatthias Krüger-11/+13
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-03Rollup merge of #147269 - reddevilmidzy:ice-fix, r=petrochenkovMatthias Krüger-0/+80
Add regression test for 123953 close: rust-lang/rust#123953
2025-10-03Rollup merge of #147245 - ↵Matthias Krüger-30/+79
karolzwolak:only-replace-intended-bar-not-all-in-pattern, r=lcnr only replace the intended comma in pattern suggestions Only suggest to replace the intended comma, not all bars in the pattern. Fixes rust-lang/rust#143330. This continues rust-lang/rust#143331, the credit for making the fix goes to `@A4-Tacks.` I just blessed tests and added a regression test.
2025-10-03Auto merge of #147301 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 24 commits in f2932725b045d361ff5f18ba02b1409dd1f44e71..2394ea6cea8b26d717aa67eb1663a2dbf2d26078 2025-09-24 11:31:26 +0000 to 2025-10-03 14:13:01 +0000 - Recommend `package.rust-version` in the Rust version section of `reference/semver.md`. (rust-lang/cargo#15806) - fix(toml): Prevent non-script fields in Cargo scripts (rust-lang/cargo#16026) - chore(ci): unpin libc (rust-lang/cargo#16044) - chore: Update dependencies (rust-lang/cargo#16034) - Fix FileLock path tracking after rename in package operation (rust-lang/cargo#16036) - Lockfile schemas error cleanup (rust-lang/cargo#16039) - Convert a multi-part diagnostic to a report (rust-lang/cargo#16035) - fix(run): Override arg0 for cargo scripts (rust-lang/cargo#16027) - Public in private manifest errors (rust-lang/cargo#16002) - chore(deps): update actions/checkout action to v5 (rust-lang/cargo#16031) - fix: remove FIXME comment that's no longer a problem (rust-lang/cargo#16025) - Add retry for `git fetch` failures in `CARGO_NET_GIT_FETCH_WITH_CLI` path (rust-lang/cargo#16016) - Added better filesystem layout testing harness (rust-lang/cargo#15874) - Small cleanup to normalize_dependencies (rust-lang/cargo#16022) - fix: better error message for rust version incompatibility (rust-lang/cargo#16021) - fix(shell): Use a distinct style for transient status (rust-lang/cargo#16019) - chore(deps): Depend on `serde_core` in `cargo-platform` (rust-lang/cargo#15992) - Remove package-workspace from unstable doc index (rust-lang/cargo#16014) - fix(shell): Switch to annotate snippets for notes (rust-lang/cargo#15945) - docs: update changelog (rust-lang/cargo#15986) - chore(ci): add rustfmt for docs job (rust-lang/cargo#16013) - chore: bump to 0.93.0 (rust-lang/cargo#16009) - fix(config): combine key error context into one (rust-lang/cargo#16004) - test(docker): openssh requires a newer libcrypto3 (rust-lang/cargo#16010) r? ghost
2025-10-03Update cargo submoduleWeihang Lo-0/+0
2025-10-03Add xtensa arch to object file creationScott Mabin-0/+1
2025-10-03Add regression test for `-Zcrate-attr` in `rustdoc --test`Urgau-0/+54
2025-10-03Respect `--error-format` in `rustdoc --test`Urgau-28/+52
2025-10-03Auto merge of #143613 - Enselic:panic-abort-uwtables, r=petrochenkovbors-9/+74
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. Closes https://github.com/rust-lang/rust/issues/81902 which is **regression-from-stable-to-stable** Closes https://github.com/rust-lang/rust/issues/94815 ### 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 https://github.com/rust-lang/rust/pull/45031 and https://github.com/rust-lang/rust/issues/81902#issuecomment-3046487084). In 1.45 a workaround in the form of `-C force-unwind-tables=yes` was added (see https://github.com/rust-lang/rust/pull/69984). `-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. # Release Note Entry Draft: ## Compatibility Notes * [Fix backtraces with `-C panic=abort` on Linux by generating unwind tables by default](https://github.com/rust-lang/rust/pull/143613). Build with `-C force-unwind-tables=no` to keep omitting unwind tables. try-job: aarch64-apple try-job: armhf-gnu try-job: aarch64-msvc-1
2025-10-03Don't normalize higher-ranked assumptions if they're not usedMichael Goulet-13/+107
2025-10-03Auto merge of #142771 - dianqk:mir-stmt-debuginfo, r=cjgillotbors-581/+2798
Introduce debuginfo to statements in MIR The PR introduces support for debug information within dead statements. Currently, only the reference statement is supported, which is sufficient to fix rust-lang/rust#128081. I don't modify Stable MIR, as I don't think we need debug information when using it. This PR represents the debug information for the dead reference statement via `#dbg_value`. For example, `let _foo_b = &foo.b` becomes `#dbg_value(ptr %foo, !22, !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value), !26)`. You can see this here: https://rust.godbolt.org/z/d43js6adv. The general principle for handling debug information is to never provide less debug information than the optimized LLVM IR. The current rules for dropping debug information in this PR are: - If the LLVM IR cannot represent a reference address, it's replaced with poison or simply dropped. For example, see: https://rust.godbolt.org/z/shGqPec8W. I'm using poison in all such cases now. - All debuginfos is dropped when merging multiple successor BBs. An example is available here: https://rust.godbolt.org/z/TE1q3Wq6M. I doesn't drop debuginfos in `MatchBranchSimplification`, because LLVM also pick one branch for it.
2025-10-03Respect `-Z` unstable options in `rustdoc --test`Urgau-119/+120
2025-10-03Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, ↵bors-96/+275
r=GuillaumeGomez,notriddle If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
2025-10-03Auto merge of #147282 - Zalathar:rollup-7wz3k9r, r=Zalatharbors-425/+839
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-03debuginfo: Use `LocalRef` to simplify reference debuginfosdianqk-157/+318
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-03Rollup merge of #147270 - GuillaumeGomez:move-cfg-code, r=lolbinarycatStuart Cook-264/+268
Move doc_cfg-specific code into `cfg.rs` Follow-up of https://github.com/rust-lang/rust/pull/138907. r? lolbinarycat
2025-10-03Rollup merge of #147268 - davidtwco:add-arm-maintainers-to-targets, r=lqdStuart Cook-17/+152
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-03Rollup merge of #147263 - jieyouxu:disable-auto-backport-nominations, ↵Stuart Cook-4/+0
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-03Rollup merge of #147259 - Zalathar:node-in-context, r=nnethercoteStuart Cook-111/+93
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-03Rollup merge of #146166 - ferrocene:pvdrz/edition-range, r=fmease,jieyouxuStuart Cook-14/+284
Implement range support in `//@ edition` First step to solve https://github.com/rust-lang/rust/issues/145364
2025-10-03Rollup merge of #141839 - tshepang:ease-lsp-use, r=Mark-Simulacrum,fee1-deadStuart Cook-15/+42
make rust-analyzer use a dedicated build directory inspired by https://github.com/rust-lang/rust/pull/132794
2025-10-02Extract common logic for iterating over featuresDeadbeef-11/+13
Two places doing the same thing is enough to motivate me to extract this to a method :)
2025-10-02Auto merge of #147231 - CrooseGit:dev/reucru01/extend_rustc_force_inline, ↵bors-25/+346
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-02rustdoc: use same stage for all pr check docsMichael Howell-1/+1
2025-10-02rustdoc: add testcase for traitParent deduplicationbinarycat-0/+38
2025-10-02search.js: introduce optimized removeIdxListAsc routinebinarycat-9/+30
2025-10-02fix rustdoc tests broke by trait item filteringbinarycat-35/+42
2025-10-02if a trait item is shown in search results, hide the impl itembinarycat-61/+174
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-03test: Add regression test for ICE when projecting associated types through ↵reddevilmidzy-0/+80
dyn traits
2025-10-02bring back plural 'alternatives' in suggestion messageKarol Zwolak-6/+6
2025-10-02fix wording; we're replacing coma with a barKarol Zwolak-3/+3
2025-10-02Fix backtraces with `-C panic=abort` on linux; emit unwind tables by defaultMartin Nordholts-9/+74
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 24cc38e3b00). In 1.45 (see cda994633ee) 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-02Document range syntax on the rustc dev guideChristian Poveda-0/+14
2025-10-02implement range support in `//@ edition`Pietro Albini-14/+270
2025-10-02Auto merge of #147196 - LorrensP-2158466:same-res-ambiguity-test, r=petrochenkovbors-0/+86
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-02add arm-maintainers to various targetsDavid Wood-17/+152
2025-10-02Move doc_cfg-specific code into `cfg.rs`Guillaume Gomez-264/+268
2025-10-02Auto merge of #147261 - matthiaskrgr:rollup-yh3fgvc, r=matthiaskrgrbors-309/+1295
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-02Extends `rustc_force_inline` to inherent methodsReuben Cruise-25/+346
- Changes parser to allow application to inherent methods. - Adds tests to confirm extended functionality works just as the existing.
2025-10-02triagebot: disable auto stable-regression compiler backport nominationsJieyou Xu-4/+0
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_.
2025-10-02Rollup merge of #147236 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 1 commits in 33f1af40cc44dde7e3e892f7a508e6f427d2cbc6..1d7c3e6abec2d5a9bfac798b29b7855b95025426 2025-09-28 21:24:16 UTC to 2025-09-28 21:24:16 UTC - Chunk of chapters from copyedit (rust-lang/book#4506) ## rust-lang/edition-guide 1 commits in aa6ce337c0adf7a63e33960d184270f2a45ab9ef..e2ed891f00361efc26616d82590b1c85d7a8920e 2025-10-01 17:11:54 UTC to 2025-10-01 17:11:54 UTC - link to never type fallback lint as deny by default (rust-lang/edition-guide#377) ## rust-lang/nomicon 1 commits in f17a018b9989430967d1c58e9a12c51169abc744..23fc2682f8fcb887f77d0eaabba708809f834c11 2025-09-24 10:10:31 UTC to 2025-09-24 10:10:31 UTC - a typo in ffi.md (rust-lang/nomicon#502) ## rust-lang/reference 13 commits in cc7247d8dfaef4c39000bb12c55c32ba5b5ba976..e11adf6016a362766eea5a3f9832e193994dd0c8 2025-09-29 00:55:42 UTC to 2025-09-23 23:33:32 UTC - const functions: separate rule about users and rule about what is allowed in such functions (rust-lang/reference#2013) - use "tuple enum variant" more consistently (rust-lang/reference#2015) - Remove caveats related to `format_args!` expansion (rust-lang/reference#2017) - RISC-V: Extension Updates (including document references) (rust-lang/reference#2002) - Move inferred sentence to an example block (rust-lang/reference#2019) - Add triagebot range-diff feature (rust-lang/reference#2011) - use AND when searching for multiple terms (rust-lang/reference#2016) - enumerations.md: fix pluralisation (rust-lang/reference#2014) - const_eval.md: use sentence case for section title, for consistency (rust-lang/reference#2012) - destructors.md: improve readability by adding pauses (rust-lang/reference#2007) - RISC-V: Add vector state registers (rust-lang/reference#2005) - destructors.md: point to core:: instead of std:: (rust-lang/reference#2006) - Create Whitespace grammar productions (rust-lang/reference#1991)
2025-10-02Rollup merge of #147233 - GuillaumeGomez:citool-submodule-init, r=KobzolMatthias Krüger-2/+22
Initialize llvm submodule if not already the case to run citool While working on https://github.com/rust-lang/rust/pull/146414, I ran the following command (to run CI docker locally): ``` cargo run --manifest-path src/ci/citool/Cargo.toml run-local --type pr x86_64-gnu-gcc ``` However, since I didn't have `src/llvm` submodule initialized, it failed. Apparently it's a common issue for people using this tool so this PR removes this small inconvenience. r? ``@Kobzol``
2025-10-02Rollup merge of #147227 - edwloef:box_take, r=joboetMatthias Krüger-0/+31
implement `Box::take` Tracking issue: https://github.com/rust-lang/rust/issues/147212 I'm not entirely sure about the wording of the doc comment, if anyone has any suggestions that'd be great :)
2025-10-02Rollup merge of #147225 - daxpedda:wasm-u-u-atomics-threads, r=alexcrichtonMatthias Krüger-36/+13
Don't enable shared memory by default with Wasm atomics This prepares us for a future where LLVM eventually stabilizes the atomics target feature, in which case we don't want to inflate atomics with threads. Otherwise users would be stuck with shared memory even when they don't want it/need it. ### Context Currently the atomics target features is unstable and can't be used without re-building Std with it (`-Zbuild-std`). Enabling the atomics target feature automatically enables shared memory. Shared memory is required to actually allow multi-threading. However, shared memory comes with a performance overhead when atomic instructions aren't able to be lowered to regular memory access instructions or when interacting with certain Web APIs. So it is very undesirable to enable shared memory by default for the majority of users. While it is possible to use atomics without shared memory, the question remains what use-case this scenario has. The only one I can think of would involve multiple memories, where the main memory remains un-shared but a second shared memory exists. While Rust doesn't support multiple memories, it might be possible with inline assembly (rust-lang/rust#136382). So alternatively, we might consider *not* enabling atomics by default even when LLVM does. In which case everything would remain the same. --- This will break current Web multi-threading users. To address this they can add the following `RUSTFLAGS`: ``` -Clink-args=--shared-memory,--max-memory=1073741824,--import-memory,--export=__wasm_init_tls,--export=__tls_size,--export=__tls_align,--export=__tls_base ``` We could add a new experimental flag that enables the right linker arguments for users, but I feel that's not in Rusts scope. Or like suggested before: a Rust-only `threads` target feature. Addresses rust-lang/rust#77839. r? ``@alexcrichton``