about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-04-24Merge pull request #19678 from Veykril/push-mkznvpsktnnzLukas Wirth-60/+126
Arena allocate `LifetimeRef`s
2025-04-24Auto merge of #140245 - matthiaskrgr:rollup-e0fwsfv, r=matthiaskrgrbors-2/+6
Rollup of 8 pull requests Successful merges: - #139261 (mitigate MSVC alignment issue on x86-32) - #140075 (Mention average in midpoint documentations) - #140184 (Update doc of cygwin target) - #140186 (Rename `compute_x` methods) - #140194 (minicore: Have `//@ add-core-stubs` also imply `-Cforce-unwind-tables=yes`) - #140195 (triagebot: label minicore changes w/ `A-test-infra-minicore` and ping jieyouxu on changes) - #140214 (Remove comment about handling non-global where bounds with corresponding projection) - #140228 (Revert overzealous parse recovery for single colons in paths) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-24Remove `weak` alias terminologyBoxy-2/+2
2025-04-24Rollup merge of #140194 - jieyouxu:minicore-force-unwind-tables, r=bjorn3Matthias Krüger-2/+6
minicore: Have `//@ add-core-stubs` also imply `-Cforce-unwind-tables=yes` To preserve CFI directives in assembly tests, as `//@ add-core-stubs` already imply `-C panic=abort`. This is a blocker for https://github.com/rust-lang/rust/pull/140037#issuecomment-2816665358. cc ```@RalfJung``` r? ```@bjorn3```
2025-04-24clippyRalf Jung-14/+12
2025-04-24CI: print message when skipping PRRalf Jung-1/+1
2025-04-24Merge from rustcRalf Jung-6990/+13732
2025-04-24Preparing for merge from rustcRalf Jung-1/+1
2025-04-24Merge pull request #19675 from Veykril/push-uuluymsosttrLukas Wirth-12/+29
fix: Fix type argument mismatch incorrectly triggering on inferred trait args
2025-04-24Arena allocate `LifetimeRef`sLukas Wirth-60/+126
2025-04-24Shrink `WherePredicate` by 8 bytesLukas Wirth-2/+3
2025-04-24Correctly set `infer_args = true` in more placesChayim Refael Friedman-8/+10
Previously this being incorrect wasn't a problem, it just meant we put an error type that then changed to infer type, so exactly what rustc does at the end. But now there is a diagnostic.
2025-04-24fix: Fix type argument mismatch incorrectly triggering on inferred trait argsLukas Wirth-4/+19
2025-04-24refactor: Remove `WherePredicateTypeTarget`Lukas Wirth-311/+302
2025-04-24Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etcbendn-67/+87
2025-04-24Rollup merge of #134446 - tgross35:stabilize-cell_update, r=jhprattMatthias Krüger-1/+0
Stabilize the `cell_update` feature Included API: ```rust impl<T: Copy> Cell<T> { pub fn update(&self, f: impl FnOnce(T) -> T); } ``` FCP completed once at https://github.com/rust-lang/rust/issues/50186#issuecomment-2198783432 but the signature has since changed. Closes: https://github.com/rust-lang/rust/issues/50186
2025-04-24Properly handle lifetimes when checking generic arguments lenChayim Refael Friedman-226/+858
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
2025-04-24Revert compiletest new-executor, to re-land without download-rustcZalathar-11/+7
Revert <https://github.com/rust-lang/rust/pull/139998> because the original merge triggered download-rustc, which messes with test metrics and prevents us from properly comparing them before/after the change. The plan is to re-land this PR as-is, combined with a trivial compiler change to avoid download-rustc and get proper test metrics for comparison. This reverts commit be181dd75c83d72fcc95538e235768bc367b76b9, reversing changes made to 645d0ad2a4f145ae576e442ec5c73c0f8eed829b.
2025-04-23Update wasm-component-ld to 0.5.13Alex Crichton-1/+1
This commit updates the vendored `wasm-component-ld` binary to 0.5.13 which includes some various bug fixes and new feature updates for upcoming component model features coming down the pike. Not expected to break any existing workflows, just a normal update.
2025-04-23Auto merge of #139983 - flip1995:clippy-subtree-update, r=Manishearthbors-6980/+13718
Clippy subtree update r? `@Manishearth` Cargo.lock update due to the Clippy version bump and because Clippy moved from rinja (unmaintained) to askama. Last sync was skipped due to the askama issue and me not getting to fixing this in time.
2025-04-23fix: Fix incorrect diagnostic for lifetime parameter count mismatchLukas Wirth-15/+21
2025-04-23Auto merge of #139998 - Zalathar:new-executor, r=onur-ozkanbors-7/+11
compiletest: Use the new non-libtest executor by default The new executor was implemented in #139660, but required a manual opt-in. This PR activates the new executor by default, but leaves the old libtest-based executor in place (temporarily) to make reverting easier if something unexpectedly goes horribly wrong. Currently the new executor can be explicitly disabled by passing the `-N` flag to compiletest (e.g. `./x test ui -- -N`), but eventually that flag will be removed, alongside the removal of the libtest dependency. The flag is mostly there to make manual comparative testing easier if something does go wrong. As before, there *should* be no user-visible difference between the old executor and the new executor. --- I didn't get much of a response to my [call for testing thread on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Call.20for.20testing.3A.20New.20test.20executor.20for.20compiletest/with/512452105), and the reports I did get (along with my own usage) indicate that there aren't any problems. So I think it's reasonable to move forward with making this the default, in the hopes of being able to remove the libtest dependency relatively soon. When the libtest dependency is removed, it should be reasonable to build compiletest against pre-built stage0 std by default, even after the stage0 redesign. (Though we should probably have at least one CI job using in-tree stage1 std instead, to guard against the possibility of the `#![feature(internal_output_capture)]` API actually changing.)
2025-04-23Mark `incorrect_generics_len` diagnostic as experimentalLukas Wirth-0/+1
2025-04-23compiletest: `//@ add-core-stubs` implies `-Cforce-unwind-tables=yes`Jieyou Xu-2/+6
To preserve CFI directives in assembly tests.
2025-04-23Clippy: Fix doc issuePhilipp Krones-0/+1
2025-04-23Remove `git_repository` field from `GitConfig`Jakub Beránek-8/+0
It is no longer needed after a recent refactoring.
2025-04-23Make algebraic intrinsics into 'const fn' items; Make algebraic functions of ↵Gabriel Bjørnager Jensen-26/+0
'f16', 'f32', 'f64', and 'f128' into 'const fn' items;
2025-04-23Merge from rustcThe Miri Cronjob Bot-21/+68
2025-04-23Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-23Auto merge of #138591 - Kobzol:git-ci, r=Mark-Simulacrumbors-1/+1
Refactor git change detection in bootstrap While working on https://github.com/rust-lang/rust/pull/138395, I finally found the courage to delve into the insides of git path change detection in bootstrap, which is used (amongst other things) to detect if we should rebuilt od download `[llvm|rustc|gcc]`. I found it a bit hard to understand, and given that this code was historically quite fragile, I thought that it would be better to rebuild it from scratch. The previous approach had a bunch of limitations: - It separated the computation of "are there local changes?" and "what upstream SHA should we use?" even though these two things are intertwined. - It used hacks to work around what happens on CI. - It had special cases for CI scattered throughout the codebase, rather than centralized in one place. - It wasn't documented enough and didn't have tests for the git behavior. The current approach should hopefully resolve all of that. I implemented a single entrypoint called `check_path_modifications` (naming bikeshed pending, half of the time I spend on this PR was thinking about names, as it's quite tricky here..) that explicitly receives a mode of operation (in CI or outside CI), and accordingly figures out that upstream SHA that we should use for downloading artifacts and it also figures out if there are any local changes. Users of this function can then use this unified output to implement `download-ci-X` and other functionality. Notably, this change detection no longer uses `git merge-base`, which makes it easier to use and doesn't require setting up remotes. I also added a bunch of integration tests that literally spawn a git repository on disk and then check that the function can deal with various situations (PR CI, auto/try CI, local builds). After I built this inner layer, I used it for downloading GCC, LLVM and rustc. The latter two (and especially rustc) were using the `last_modified_commit` function before, but in all cases but one this function was actually only used to check if there are any local changes, which was IMO confusing. The LLVM handling would deserve a bit of refactoring, but that's a larger change that can be done as a follow-up. I hope that the implementation is now clear and easy to understand, so that in combination with the tests we can have more confidence that it does what we want. I tried to include a lot of documentation in the code, so I won't be repeating the actual implementation details here, if there are any questions, I'll add the answers to the documentation too :) The new approach explicitly supports three scenarios: - Running on PR CI, where we have one upstream bors parent commit and one PR merge commit made by GitHub. - Running on try/auto CI, where we have one upstream bors parent commit and one PR merge commit made by bors. - Running locally, where we assume that we have at least one upstream bors parent commit in our git history. I removed the handling of upstreams on CI, as I think that it shouldn't be needed and I considered it to be a hack. However, it's possible that there are other use-cases that I haven't considered, so I want to ask around if people have other situations than the three use-cases described above. If there are other such use-cases, I would like to include them in the new centralized implementation and add them to the git test suite, rather than going back to the old ways :) In particular, the code before relied on `git merge-base`, but I don't see why we can't just lookup the most recent bors commit and assume that is a merge commit that is also upstream? I might be running into Chesterton's Fence here :) CC `@pietroalbini` To make sure that this won't break downstream users of Rust's CI. Best reviewed commit by commit. Companion PRs: - For testing beta: https://github.com/rust-lang/rust/pull/138597 r? `@onur-ozkan` Fixes: https://github.com/rust-lang/rust/issues/101907 try-job: x86_64-gnu-aux try-job: aarch64-gnu try-job: dist-x86_64-apple
2025-04-23compiletest: Use the new non-libtest executor by defaultZalathar-7/+11
Currently the new executor can be explicitly disabled by passing the `-N` flag to compiletest (e.g. `./x test ui -- -N`), but eventually that flag will be removed, alongside the removal of the libtest dependency.
2025-04-22[compiletest] Parallelize test discoveryTyler Mandry-38/+60
Certain filesystems for large monorepos are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
2025-04-22Merge pull request #19647 from roife/fix-issue-19646Lukas Wirth-41/+31
fix: panics in inlay hints that produce empty text edits for closure return types
2025-04-22Merge commit '0621446356e20fd2ead13a6763bb936c95eb0cfa' into ↵Philipp Krones-6980/+13717
clippy-subtree-update
2025-04-23fix: panics in inlay hints that produce empty text edits for closure return ↵roifewu-41/+31
types
2025-04-22Rollup merge of #140072 - folkertdev:miri-fn-align, r=RalfJungChris Denton-0/+21
handle function alignment in miri tracking issue: https://github.com/rust-lang/rust/issues/82232 Fixes https://github.com/rust-lang/miri/issues/4282 The `#[repr(align(N))]` attribute on functions was ignored when using miri. For such a function, its address should be a multiple of `N`. There is some further discussion in the thread [#t-compiler/const-eval > function address alignment](https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/function.20address.20alignment) on how `dyn Fn` should be handled. The behavior there appears to be consistent between miri and nightly, though both may be incorrect. In any case, that can be resolved separately.
2025-04-22Merge pull request #19657 from ChayimFriedman2/better-offset-ofLukas Wirth-3/+230
feat: Better support `offset_of!()`
2025-04-22Account for `IngredientCache::get_or_create()` taking `&Zalsa` and not `&dyn ↵Chayim Refael Friedman-1/+1
Database`
2025-04-22Fix varianceChayim Refael Friedman-7/+3
This one does need fixpoint.
2025-04-22Adapt for new cycle handling changing in SalsaChayim Refael Friedman-339/+133
2025-04-22Adjust for `salsa::Id::from_u32()` being unsafeChayim Refael Friedman-183/+80
This impacts our manual `salsa::Id` wrappers. I refactored them a bit to improve safety.
2025-04-22Adjust for new Salsa not implementing `Debug` by defaultChayim Refael Friedman-6/+6
2025-04-22Depend on Salsa v0.20.0Chayim Refael Friedman-10/+11
2025-04-22Merge pull request #19479 from ChayimFriedman2/generic-mismatchLukas Wirth-405/+1243
feat: Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
2025-04-22compiletest: Fix deadline bugs in new executorZalathar-21/+47
2025-04-22The new diagnostic has found a bug lurking in minicoreChayim Refael Friedman-1/+1
It's cute, isn't it?
2025-04-22Add two new diagnostics: one for mismatch in generic arguments count, and ↵Chayim Refael Friedman-404/+1242
another for mismatch in their kind Also known as E0747 and E0107. And by the way, rewrite how we lower generic arguments and deduplicate it between paths and method calls. The new version is taken almost straight from rustc. This commit also changes the binders of `generic_defaults()`, to only include the binders of the arguments up to (and not including) the current argument. This make it easier to handle it in the rewritten lowering of generic args. It's also how rustc does it.
2025-04-22Merge pull request #19622 from A4-Tacks/raw-string-suffixLukas Wirth-13/+293
Fix ide-assists raw_string suffix fail
2025-04-22Merge pull request #19662 from Veykril/push-lqqvmnonlwrxLukas Wirth-1/+1
minor: Fix outdated comment in hir-ty/generics.rs
2025-04-22minor: Fix outdated comment in hir-ty/generics.rsLukas Wirth-1/+1