about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-04-11Update cargoWeihang Lo-0/+0
2025-04-12ci: cancel parallel jobs if test failsPrajwal S N-4/+16
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11Rollup merge of #139662 - nnethercote:tweak-DefPathData, r=compiler-errorsJacob Pratt-3/+3
Tweak `DefPathData` Some improvements in and around `DefPathData`, following on from #137977. r? `@spastorino`
2025-04-11Implement DeleteFileWRune Tynan-5/+46
2025-04-11refactor: migrate `expand_rest_pattern` to editorPrajwal S N-53/+66
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix clippy::useless-conversionduncan-1/+1
2025-04-11exclude build script targets from testingduncan-30/+19
2025-04-11test only packages that are workspace membersduncan-1/+2
2025-04-11Update rust-analyzer for new proc_macro span api.Mara Bos-38/+13
2025-04-11use underscores in the target name for test update notificationsduncan-1/+3
2025-04-11sync::mpsc: prevent double free on `Drop`Petros Angelatos-1/+1
This PR is fixing a regression introduced by #121646 that can lead to a double free when dropping the channel. The details of the bug can be found in the corresponding crossbeam PR https://github.com/crossbeam-rs/crossbeam/pull/1187 Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2025-04-11sync::mpsc: add miri reproducer of double freePetros Angelatos-0/+45
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2025-04-11fix build fail on macos bacause of libffi-sys 2.3.0; This updates libffi to ↵LorrensP-2158466-5/+5
new major version
2025-04-11Auto merge of #139578 - ferrocene:pa-compiletest-edition, r=jieyouxubors-3/+14
Fix breakage when running compiletest with `--test-args=--edition=2015` Compiletest has an `--edition` flag to change the default edition tests are run with. Unfortunately no test suite successfully executes when that flag is passed. If the edition is set to something greater than 2015 the breakage is expected, since the test suite currently supports only edition 2015 (Ferrous Systems will open an MCP about fixing that soonish). Surprisingly, the test suite is also broken if `--edition=2015` is passed to compiletest. This PR focuses on fixing the latter. This PR fixes the two categories of failures happening when `--edition=2015` is passed: * Some edition-specific tests set their edition through `//@ compile-flags` instead of `//@ edition`. Compiletest doesn't parse the compile flags, so it would see no `//@ edition` and add another `--edition` flag, leading to a rustc error. * Compiletest would add the edition after `//@ compile-flags`, while some tests depend on flags passed to `//@ compile-flags` being the last flags in the rustc invocation. Note that for the first category, I opted to manually go and replace all `//@ compile-flags` setting an edition with an explicit `//@ edition`. We could've changed compiletest to instead check whether an edition was set in `//@ compile-flags`, but I thought it was better to enforce a consistent way to set the edition in tests. I also added the edition to the stamp, so that changing `--edition` results in tests being re-executed. r? `@jieyouxu`
2025-04-11Introduce `DefPathData::AnonAssocTy`.Nicholas Nethercote-3/+3
PR #137977 changed `DefPathData::TypeNs` to contain `Option<Symbol>` to account for RPITIT assoc types being anonymous. This commit changes it back to `Symbol` and gives anonymous assoc types their own variant. It makes things a bit nicer overall.
2025-04-11Auto merge of #139011 - Zoxc:no-rayon-iters, r=oli-obkbors-2/+1
Remove the use of Rayon iterators This removes the use of Rayon iterators and the use of the `rustc-rayon` crate. `rustc-rayon-core` is still used however. In parallel loops, instead of a Rayon iterator a serial iterator are used to collect items into a `Vec` and we use a parallel loop over its elements using the new `par_slice` function which is built on `rustc-rayon-core`'s `join`. This change makes it easier to bring `rustc-rayon-core` in-tree. Tests using 7 threads: <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Physical Memory</td><td align="right">Physical Memory</td><td align="right">%</th><td align="right">Committed Memory</td><td align="right">Committed Memory</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">0.4827s</td><td align="right">0.4828s</td><td align="right"> 0.02%</td><td align="right">201.23 MiB</td><td align="right">201.31 MiB</td><td align="right"> 0.04%</td><td align="right">279.03 MiB</td><td align="right">279.46 MiB</td><td align="right"> 0.15%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.1443s</td><td align="right">0.1401s</td><td align="right">💚 -2.91%</td><td align="right">126.42 MiB</td><td align="right">126.70 MiB</td><td align="right"> 0.22%</td><td align="right">199.79 MiB</td><td align="right">199.99 MiB</td><td align="right"> 0.10%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.3252s</td><td align="right">0.3065s</td><td align="right">💚 -5.78%</td><td align="right">161.87 MiB</td><td align="right">161.78 MiB</td><td align="right"> -0.05%</td><td align="right">229.59 MiB</td><td align="right">230.23 MiB</td><td align="right"> 0.28%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">0.5845s</td><td align="right">0.5876s</td><td align="right"> 0.53%</td><td align="right">197.01 MiB</td><td align="right">196.89 MiB</td><td align="right"> -0.06%</td><td align="right">267.62 MiB</td><td align="right">267.47 MiB</td><td align="right"> -0.06%</td></tr><tr><td>Total</td><td align="right">1.5367s</td><td align="right">1.5169s</td><td align="right">💚 -1.29%</td><td align="right">686.53 MiB</td><td align="right">686.68 MiB</td><td align="right"> 0.02%</td><td align="right">976.04 MiB</td><td align="right">977.14 MiB</td><td align="right"> 0.11%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9796s</td><td align="right">💚 -2.04%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.04%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.12%</td></tr></table> <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Physical Memory</td><td align="right">Physical Memory</td><td align="right">%</th><td align="right">Committed Memory</td><td align="right">Committed Memory</td><td align="right">%</th></tr><tr><td>🟠 <b>clap</b>:debug</td><td align="right">1.6371s</td><td align="right">1.6529s</td><td align="right"> 0.96%</td><td align="right">395.58 MiB</td><td align="right">396.21 MiB</td><td align="right"> 0.16%</td><td align="right">460.98 MiB</td><td align="right">461.52 MiB</td><td align="right"> 0.12%</td></tr><tr><td>🟠 <b>hyper</b>:debug</td><td align="right">0.3248s</td><td align="right">0.3210s</td><td align="right">💚 -1.16%</td><td align="right">155.16 MiB</td><td align="right">155.19 MiB</td><td align="right"> 0.02%</td><td align="right">219.21 MiB</td><td align="right">219.30 MiB</td><td align="right"> 0.04%</td></tr><tr><td>🟠 <b>regex</b>:debug</td><td align="right">1.0148s</td><td align="right">0.9929s</td><td align="right">💚 -2.16%</td><td align="right">297.96 MiB</td><td align="right">295.07 MiB</td><td align="right"> -0.97%</td><td align="right">354.53 MiB</td><td align="right">351.58 MiB</td><td align="right"> -0.83%</td></tr><tr><td>🟠 <b>syn</b>:debug</td><td align="right">1.3614s</td><td align="right">1.3717s</td><td align="right"> 0.76%</td><td align="right">319.10 MiB</td><td align="right">321.19 MiB</td><td align="right"> 0.65%</td><td align="right">378.90 MiB</td><td align="right">381.27 MiB</td><td align="right"> 0.62%</td></tr><tr><td>Total</td><td align="right">4.3381s</td><td align="right">4.3386s</td><td align="right"> 0.01%</td><td align="right">1.14 GiB</td><td align="right">1.14 GiB</td><td align="right"> -0.01%</td><td align="right">1.38 GiB</td><td align="right">1.38 GiB</td><td align="right"> 0.00%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9960s</td><td align="right"> -0.40%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> -0.03%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> -0.01%</td></tr></table>
2025-04-10Stabilize `slice_as_chunks` library featureScott McMurray-2/+1
2025-04-11Rollup merge of #139469 - jieyouxu:compiletest-supports-crate-type, r=onur-ozkanStuart Cook-2/+117
Introduce a `//@ needs-crate-type` compiletest directive The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose `//@ ignore-$target` directive (often without comment). Fixes #132309. ### Example ```rs //@ needs-crate-type: dylib (ignored on e.g. wasm32-unknown-unknown) //@ compile-flags: --crate-type=dylib fn foo() {} ``` ### Review advice - Best reviewed commit-by-commit. - The impl is not very clean, I briefly attempted to clean up the directive handling but found that more invasive changes are needed, so I'd like to not block on the cleanup for now. try-job: test-various try-job: armhf-gnu
2025-04-11Rollup merge of #138682 - Alexendoo:extra-symbols, r=fee1-deadStuart Cook-6/+33
Allow drivers to supply a list of extra symbols to intern Allows adding new symbols as `const`s in external drivers, desirable in Clippy so we can use them in patterns to replace code like https://github.com/rust-lang/rust/blob/75530e9f72a1990ed2305e16fd51d02f47048f12/src/tools/clippy/clippy_lints/src/casts/cast_ptr_alignment.rs#L66 The Clippy change adds a couple symbols as a demo, the exact `clippy_utils` API and replacing other usages can be done on the Clippy side to minimise sync conflicts --- try-job: aarch64-gnu
2025-04-10Merge pull request #19570 from ChayimFriedman2/fix-store-panicChayim Refael Friedman-6/+44
fix: Fix an incorrect `ExpressionStore` that was passed
2025-04-11Fix an incorrect `ExpressionStore` that was passedChayim Refael Friedman-6/+44
It caused panics everywhere.
2025-04-11fix: `make::expr_call() -> CallExpr`Prajwal S N-29/+33
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_method_call() -> MethodCallExpr`Prajwal S N-27/+27
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_closure() -> ClosureExpr`Prajwal S N-7/+6
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_paren() -> ParenExpr`Prajwal S N-12/+13
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11refactor: editor for `destructure_struct_binding`Prajwal S N-99/+76
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-10compiletest: Trim the value of `dont-require-annotations`Vadim Petrochenkov-1/+1
2025-04-10compiletest: Turn `TestProps::require_annotations` into a setVadim Petrochenkov-46/+19
and further simplify its checking in runtest
2025-04-10compiletest: Make `SUGGESTION` annotations viralVadim Petrochenkov-3/+10
2025-04-10Auto merge of #137412 - scottmcm:redo-swap, r=cuviperbors-0/+30
Ensure `swap_nonoverlapping` is really always untyped This replaces #134954, which was arguably overcomplicated. ## Fixes #134713 Actually using the type passed to `ptr::swap_nonoverlapping` for anything other than its size + align turns out to not work, so this goes back to always erasing the types down to just bytes. (Except in `const`, which keeps doing the same thing as before to preserve `@RalfJung's` fix from #134689) ## Fixes #134946 I'd previously moved the swapping to use auto-vectorization *on bytes*, but someone pointed out on Discord that the tail loop handling from that left a whole bunch of byte-by-byte swapping around. This goes back to manual tail handling to avoid that, then still triggers auto-vectorization on pointer-width values. (So you'll see `<4 x i64>` on `x86-64-v3` for example.)
2025-04-10Remove the use of Rayon iteratorsJohn Kåre Alsaker-2/+1
2025-04-10Merge pull request #4261 from CraftSpider/windows-rtl-to-dosRalf Jung-1/+29
Implement RtlNtStatusToDosError and shim test for it
2025-04-10Implement RtlNtStatusToDosError and shim test for itRune Tynan-1/+29
2025-04-10Merge pull request #19565 from ↵David Barsky-13/+108
davidbarsky/davidbarsky/add-prime-caches-subcommand internal: add `prime-caches` subcommand
2025-04-10internal: cleanup CLI flag documentationDavid Barsky-10/+10
2025-04-10Rollup merge of #139630 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-229/+1531
Miri subtree update r? `@ghost` a sync is needed to fix the miri-test-libstd failures
2025-04-10Rollup merge of #139609 - jieyouxu:compiletest-path-misc, r=KobzolMatthias Krüger-22/+23
compiletest: don't use stringly paths for `compose_and_run` Eventually I'd like to fully migrate to `camino`'s `{Utf8Path,Utf8PathBuf}` because compiletest assumes UTF-8 paths all over the place, so this is an precursor change to make the migration diff cleaner. r? `@Kobzol` (or bootstrap/compiler)
2025-04-10Rollup merge of #139606 - jieyouxu:compiletest-edition2024, r=compiler-errorsMatthias Krüger-15/+44
Update compiletest to Edition 2024 r? bootstrap (or compiler) try-job: x86_64-apple-1 try-job: x86_64-msvc-1 try-jbo: x86_64-mingw-1
2025-04-10Rollup merge of #139510 - nnethercote:name-to-ident, r=fee1-deadMatthias Krüger-5/+5
Rename some `name` variables as `ident`. It bugs me when variables of type `Ident` are called `name`. It leads to silly things like `name.name`. `Ident` variables should be called `ident`, and `name` should be used for variables of type `Symbol`. This commit improves things by by doing `s/name/ident/` on a bunch of `Ident` variables. Not all of them, but a decent chunk. r? `@fee1-dead`
2025-04-10internal: add `prime-caches` subcommandDavid Barsky-6/+101
2025-04-10Merge pull request #19566 from flodiebold/push-vzpyzvpkwkytFlorian Diebold-5/+4
Fix dyn compatibility code bypassing callable_item_signature query
2025-04-10Fix dyn compatibility code bypassing callable_item_signature queryFlorian Diebold-5/+4
2025-04-10Bump crossbeam-channel from 0.5.14 to 0.5.15dependabot[bot]-2/+2
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.14 to 0.5.15. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15) --- updated-dependencies: - dependency-name: crossbeam-channel dependency-version: 0.5.15 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10chore(deps): bump crossbeam-channel from 0.5.14 to 0.5.15dependabot[bot]-3/+3
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.14 to 0.5.15. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15) --- updated-dependencies: - dependency-name: crossbeam-channel dependency-version: 0.5.15 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10fix: Walk const block expressions for unsafety checkingLukas Wirth-0/+21
2025-04-10run all 'thread' tests on FreeBSD, and also on 32bitRalf Jung-4/+4
2025-04-10fix: Fix invalid signature bitflagsLukas Wirth-103/+100
2025-04-10Allow drivers to supply a list of extra symbols to internAlex Macleod-6/+33
2025-04-10Merge from rustcRalf Jung-244/+174
2025-04-10Preparing for merge from rustcRalf Jung-1/+1