about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-10-02Auto merge of #147261 - matthiaskrgr:rollup-yh3fgvc, r=matthiaskrgrbors-1/+82
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-02Rollup merge of #147221 - Zalathar:incremental, r=lqdMatthias Krüger-1/+9
Forbid `//@ compile-flags: -Cincremental=` in tests Tests should not try to manually enable incremental compilation with `-Cincremental`, because that typically results in stray directories being created in the repository root. Also, if the incremental directory is not cleared, there is a risk of interference between successive runs of the same test. Instead, use the `//@ incremental` directive, which instructs compiletest to handle the details of passing `-Cincremental` with a fresh directory.
2025-10-02Rollup merge of #146281 - Jules-Bertholet:static-align-thread-local, ↵Matthias Krüger-0/+73
r=Mark-Simulacrum Support `#[rustc_align_static]` inside `thread_local!` Tracking issue: rust-lang/rust#146177 ```rust thread_local! { #[rustc_align_static(64)] static SO_ALIGNED: u64 = const { 0 }; } ``` This increases the amount of recursion the macro performs (once per attribute in addition to the previous once per item), making it easier to hit the recursion limit. I’ve added workarounds to limit the impact in the case of long doc comments, but this still needs a crater run just in case. r? libs ``@rustbot`` label A-attributes A-macros A-thread-locals F-static_align T-libs
2025-10-02Auto merge of #147138 - jackh726:split-canonical-bound, r=lcnrbors-4/+4
Split Bound index into Canonical and Bound See [#t-types/trait-system-refactor > perf `async-closures/post-mono-higher-ranked-hang.rs`](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/perf.20.60async-closures.2Fpost-mono-higher-ranked-hang.2Ers.60/with/541535613) for context Things compile and tests pass, but not sure if this actually solves the perf issue (edit: it does). Opening up this to do a perf (and maybe crater) run. r? lcnr
2025-10-02Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnrbors-2/+2
Turn ProjectionElem::Subtype into CastKind::Subtype I noticed that drop elaboration can't, in general, handle `ProjectionElem::SubType`. It creates a disjoint move path that overlaps with other move paths. (`Subslice` does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent then `MovePath.place` has multiple possible projections. (It would probably make sense to remove all `Subtype` projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.) The only reason this doesn't break is that `Subtype` is always the sole projection of the local its applied to. For the same reason, it works fine as a `CastKind` so I figured that makes more sense than documenting and validating this hidden invariant. cc rust-lang/rust#112651, rust-lang/rust#133258 r? Icnr (bc you've been the main person dealing with `Subtype` it looks like)
2025-10-02Forbid `//@ compile-flags: -Cincremental=` in testsZalathar-1/+9
Tests should not try to manually enable incremental compilation with `-Cincremental`, because that typically results in stray directories being created in the repository root. Instead, use the `//@ incremental` directive, which instructs compiletest to handle the details of passing `-Cincremental` with a fresh directory.
2025-10-01Auto merge of #147210 - lnicola:sync-from-ra, r=lnicolabors-1519/+3736
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/a6bc4a4bbe6a65b71cbf76a0cf528c47a8d9f97f. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-10-01Fix memory leak in `os` implJules Bertholet-0/+13
2025-09-30Split Bound into Canonical and Boundjackh726-4/+4
2025-09-30Add regression test for another (long-standing) bug fixed by the new solverChayim Refael Friedman-1/+23
2025-09-30Impl `std::error::Error` for `SyntaxError`Chayim Refael Friedman-0/+2
2025-09-30Merge pull request #20745 from ↵Shoyu Vanilla (Flint)-1/+55
Oblarg/fix-negative-int-literals-in-macro-by-example Fix negative integer literals in const generics in declarative macro context
2025-09-30Pass around `DirectiveLine` instead of bare stringsZalathar-145/+107
2025-09-30Remove `parse_negative_name_directive`Zalathar-16/+2
This isn't actually used for anything, and its presence complicates the migration to `DirectiveLine`.
2025-09-30Split off a separate name/value parser for debuginfo test commandsZalathar-16/+19
2025-09-29move test per review feedbackOblarg-97/+42
2025-09-29Auto merge of #146376 - durin42:dwo-specify-path, r=davidtwcobors-0/+7
debuginfo: add an unstable flag to write split DWARF to an explicit directory Bazel requires knowledge of outputs from actions at analysis time, including file or directory name. In order to work around the lack of predictable output name for dwo files, we group the dwo files in a subdirectory of --out-dir as a post-processing step before returning control to bazel. Unfortunately some debugging workflows rely on directly opening the dwo file rather than loading the merged dwp file, and our trick of moving the files breaks those users. We can't just hardlink the file or copy it, because with remote build execution we wouldn't end up with the un-moved file copied back to the developer's workstation. As a fix, we add this unstable flag that causes dwo files to be written to a build-system-controllable location, which then lets bazel hoover up the dwo files, but the objects also have the correct path for the dwo files. r? `@davidtwco`
2025-09-29Auto merge of #147145 - Zalathar:rollup-s7kcs3w, r=Zalatharbors-12/+12
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue) - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout) - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-29Merge pull request #20760 from A4-Tacks/all-any-not-attr-compShoyu Vanilla (Flint)-6/+56
Add `all` `any` and `not` attribute completions
2025-09-29Merge ref 'f957826bff7a' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-109/+154
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f957826bff7a68b267ce75b1ea56352aed0cca0a Filtered ref: 7291893f9d875b6e8775a7a0e661abdaec15d3c1 Upstream diff: https://github.com/rust-lang/rust/compare/caccb4d0368bd918ef6668af8e13834d07040417...f957826bff7a68b267ce75b1ea56352aed0cca0a This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-29Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to f957826bff7a68b267ce75b1ea56352aed0cca0a.
2025-09-29Rollup merge of #146929 - Zalathar:capture, r=Kobzol,jieyouxuStuart Cook-66/+10
compiletest: Remove old-output-capture and become a stage0 bootstrap tool The new compiletest output-capture system became the default in rust-lang/rust#146574, and no problems have been reported since. This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool. In other words, compiletest no longer relies on any unstable features (such as `libtest` or `internal_output_capture`), and is now written entirely in stable Rust! The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via `rustc --print`, so we interpret `--stage` as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself. r? Kobzol
2025-09-28remove explicit deref of AbiAlign for most methodsJubilee Young-12/+12
Much of the compiler calls functions on Align projected from AbiAlign. AbiAlign impls Deref to its inner Align, so we can simplify these away. Also, it will minimize disruption when AbiAlign is removed. For now, preserve usages that might resolve to PartialOrd or PartialEq, as those have odd inference.
2025-09-28Rollup merge of #147120 - Shunpoco:issue-147105, r=KobzolMatthias Krüger-5/+6
Fix --extra-checks=spellcheck to prevent cargo install every time Fixes rust-lang/rust#147105 ## Background Current implementation of `ensure_version_of_cargo_install` uses `bin_name` to check if it exists, but it should use `<tool_root_dir>/<tool_bin_dir>/<bin_name>` instead. Otherwise the check fails every time, hence the function falls back to install the binary. ## Change Move lines which define bin_path at the top of the function, and use bin_path for the check
2025-09-28Rollup merge of #141469 - Kivooeo:remove-usnsafegate, r=compiler-errorsMatthias Krüger-1/+1
Allow `&raw [mut | const]` for union field in safe code fixes rust-lang/rust#141264 r? ``@Veykril`` Unresolved questions: - [x] Any edge cases? - [x] How this works with rust-analyzer (because all I've did is prevent compiler from emitting error in `&raw` context) (rust-lang/rust-analyzer#19867) - [x] Should we allow `addr_of!` and `addr_of_mut!` as well? In current version they both (`&raw` and `addr_of!`) are allowed (They are the same) - [x] Is chain of union fields is a safe? (Yes)
2025-09-28Merge pull request #19867 from Kivooeo/unsafegateLukas Wirth-1/+60
Allow `&raw [mut | const]` for union field
2025-09-28modify ensure_version_or_cargo_install to check existing binaryShunpoco-5/+6
Current implementation uses bin_name to check if it exists, but it should use tool_root_dir/tool_bin_dir/bin_name instead. Otherwise the check fails every time, hence the function falls back to install the binary.
2025-09-28Remove old-output-capture from compiletestZalathar-66/+10
2025-09-28Rollup merge of #147086 - Zalathar:payload, r=jieyouxuMatthias Krüger-14/+1
compiletest: Use `PanicHookInfo::payload_as_str` now that it's stable in beta Nice little FIXME cleanup after the bootstrap beta bump to 1.91 in https://github.com/rust-lang/rust/pull/146636. r? jieyouxu
2025-09-28Add `all` `any` and `not` attribute completionsA4-Tacks-6/+56
Example --- `#[cfg($0)]` -> `#[cfg(any($0))]`
2025-09-27Include additional hashes in src/stage0Erick Tryzelaar-11/+88
This patch changes `bump-stage0` to include: * The sha256 hash of the channel manifest used to create `src/stage0`. * The rust and rustfmt git commit in `src/stage0`. * Hashes of all the artifacts, like the source tarball, in `src/stage0`. Combined this will allow for: * Projects that bootstrap their own compiler, such as Fuchsia, or users of [bootstrap], to build their compilers offline without needing to communicate with static.rust-lang.org. * Auditors to detect if the channel manifest, and all the artifacts inside the manifest, were modified after it was used to generate `src/stage0`. Furthermore, if they did find modified artifacts, they could determine if the Rust Signing Key was compromised by checking if any modified file was signed properly. Finally, it allows regeneration of `src/stage0` when specifying both the day of the build for rust, and the day of the build for rustfmt, which can allow a maintainer to regenerate `src/stage0` to verify nothing changed. [bootstrap]: https://github.com/dtolnay/bootstrap [mrustc]: https://github.com/thepowersgang/mrustc
2025-09-27Use `PanicHookInfo::payload_as_str` now that it's stable in betaZalathar-14/+1
2025-09-27Auto merge of #146636 - Mark-Simulacrum:bootstrap-bump, r=jieyouxubors-8/+0
Bump bootstrap compiler to 1.91 beta https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-tuesday
2025-09-26Apply cfg(bootstrap) replacementMark Rousskov-8/+0
2025-09-26split-dwarf: add documentation and test coverageAugie Fackler-0/+7
2025-09-26Bump tar-fs from 2.1.3 to 2.1.4 in /editors/codedependabot[bot]-3/+3
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.3 to 2.1.4. - [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.3...v2.1.4) --- updated-dependencies: - dependency-name: tar-fs dependency-version: 2.1.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2025-09-26castkind::subtype in clippybeepster4096-2/+2
2025-09-26Support `#[rustc_align_static]` inside `thread_local!`Jules Bertholet-0/+60
2025-09-26Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnrMatthias Krüger-7/+4
resolve: Do not finalize shadowed bindings I.e. do not mark them as used, or non-speculatively loaded, or similar. Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-26Update memchr to 2.7.6J. Neuschäfer-2/+2
memchr 2.7.6 contains a bugfix for aarch64_be
2025-09-26Merge pull request #20748 from A4-Tacks/migrate-arith-op-precShoyu Vanilla (Flint)-12/+15
Migrate `replace_arith_op` assist to use `SyntaxEditor`
2025-09-26Merge pull request #20599 from A4-Tacks/bang-de-morganShoyu Vanilla (Flint)-7/+28
Add applicable on bang `!` for apply_demorgan
2025-09-26Migrate `replace_arith_op` assist to use `SyntaxEditor`A4-Tacks-12/+15
2025-09-26Merge pull request #20611 from A4-Tacks/replace-arith-op-precShoyu Vanilla (Flint)-1/+22
Fix precedence parenthesis for replace_arith_op
2025-09-26Merge pull request #20604 from A4-Tacks/cfg-attr-compShoyu Vanilla (Flint)-1/+53
Add cfg_attr predicate completion
2025-09-26Merge pull request #20729 from A4-Tacks/const-param-kwdShoyu Vanilla (Flint)-1/+28
Add const parameter keyword completion
2025-09-26Merge pull request #20731 from A4-Tacks/expand-rest-pat-in-tuple-slice-patShoyu Vanilla (Flint)-19/+289
Fix expand rest pattern in tuple and slice pattern
2025-09-26Fix expand rest pattern in tuple and slice patternA4-Tacks-19/+289
Assist: expand_tuple_rest_pattern Fills fields by replacing rest pattern in tuple patterns. Example --- ``` fn foo(bar: (char, i32, i32)) { let (ch, ..$0) = bar; } ``` -> ``` fn foo(bar: (char, i32, i32)) { let (ch, _1, _2) = bar; } ``` --- Assist: expand_slice_rest_pattern Fills fields by replacing rest pattern in slice patterns. Example --- ``` fn foo(bar: [i32; 3]) { let [first, ..$0] = bar; } ``` -> ``` fn foo(bar: [i32; 3]) { let [first, _1, _2] = bar; } ```
2025-09-26Merge pull request #20598 from A4-Tacks/let-chain-sup-conv-to-guarded-retShoyu Vanilla (Flint)-45/+252
Add let-chain support for convert_to_guarded_return
2025-09-26Merge pull request #20736 from A4-Tacks/fix-invert-if-let-chainShoyu Vanilla (Flint)-4/+13
Fix applicable on if-let-chain for invert_if