about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-04-19Rollup merge of #139995 - spencer3035:clean-ui-tests-4-of-n, r=jieyouxuChris Denton-6/+1
Clean UI tests 4 of n Cleaned up some tests that have `issue` in the title. I kept the commits to be one per "`issue`" cleanup/rename to make it easier to check. I can rebase to one commit once the changes are approved. Related Issues: #73494 #133895 r? jieyouxu
2025-04-19Rollup merge of #139091 - mejrs:format, r=compiler-errorsChris Denton-1/+0
Rewrite on_unimplemented format string parser. This PR rewrites the format string parser for `rustc_on_unimplemented` and `diagnostic::on_unimplemented`. I plan on moving this code (and more) into the new attribute parsing system soon and wanted to PR it separately. This PR introduces some minor differences though: - `rustc_on_unimplemented` on trait *implementations* is no longer checked/used - this is actually never used (outside of some tests) so I plan on removing it in the future. - for `rustc_on_unimplemented`, it introduces the `{This}` argument in favor of `{ThisTraitname}` (to be removed later). It'll be easier to parse. - for `rustc_on_unimplemented`, `Self` can now consistently be used as a filter, rather than just `_Self`. It used to not match correctly on for example `Self = "[{integer}]"` - Some error messages now have better spans. Fixes https://github.com/rust-lang/rust/issues/130627
2025-04-19don't ignore config values that fail to parsejyn-14/+17
previously, these would just silently be ignored. now they give a warning such as: ``` invalid config values: /completion/snippets/custom: invalid type: null, expected a map; /cargo/extraEnv: invalid type: null, expected a string; ```
2025-04-19Rollup merge of #139297 - RossSmyth:NixClean, r=WaffleLapkinChris Denton-50/+111
Deduplicate & clean up Nix shell 1. Deduplicate the flake and shell files 2. Remove flake-utils 3. Remove `with` statements They are considered bad practice nowadays because the slow down the evalulator and have weird shadowing rules. 4. Use `env` :3 5. use `callPackage` It's the recommended way for derivations like these. 6. Use `packages` in the shell There is no reason to use `buildInputs` for a mkShell (except in funny cases that will not be seen here), so the `packages` attr is recommended now days. r? WaffleLapkin
2025-04-19Fix replace_string_with_char escaped char quoteA4-Tacks-5/+145
2025-04-19simd_select_bitmask: the 'padding' bits in the mask are just ignoredRalf Jung-42/+14
2025-04-19Cleaned up 4 tests in `tests/ui/issues`Spencer-6/+1
2025-04-19Merge from rustcThe Miri Cronjob Bot-4/+56
2025-04-19Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-18Merge pull request #19613 from ChayimFriedman2/substLukas Wirth-8/+46
fix: Fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
2025-04-18Support ide-assists raw_string suffixA4-Tacks-8/+148
2025-04-18Auto merge of #139996 - matthiaskrgr:rollup-0nka2hw, r=matthiaskrgrbors-4/+56
Rollup of 7 pull requests Successful merges: - #138528 (deref patterns: implement implicit deref patterns) - #139393 (rustdoc-json: Output target feature information) - #139553 (sync::mpsc: prevent double free on `Drop`) - #139615 (Remove `name_or_empty`) - #139853 (Disable combining LLD with external llvm-config) - #139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - #139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-18rtprintpanic: clarify that the error is aborting the processLieselotte-2/+2
2025-04-18Merge pull request #19618 from lnicola/pgo-revisionLaurențiu Nicola-12/+20
internal: Support specific revisions for PGO
2025-04-18Support specific revisions for pgoLaurențiu Nicola-12/+20
2025-04-18Sort notable traits in hoverChayim Refael Friedman-0/+1
Previously it was ordered by what accidentally happened to be the crate graph order, which isn't sensible, plus it caused changes when any change was done to salsa IDs.
2025-04-18Merge pull request #19616 from ChayimFriedman2/transparent-diagsLukas Wirth-0/+6
internal: Make hir-ty non-diagnostic queries transparent
2025-04-18Merge from rustcThe Miri Cronjob Bot-27/+53
2025-04-18Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-18Make hir-ty non-diagnostic queries transparentChayim Refael Friedman-0/+6
That is, all queries that have a `with_diagnostic` variant. Them being tracked was (maybe) needed before #19462, because back then diagnostics could refer `AstId`s (for macro types), but now they are no longer needed.
2025-04-18Fix a panic when a trait method in an impl declares a lifetime parameter not ↵Chayim Refael Friedman-8/+46
in the trait declaration Shuffle the code a bit.
2025-04-18Rollup merge of #139976 - jieyouxu:plumbing, r=KobzolMatthias Krüger-6/+0
run-make: drop `os_pipe` workaround now that `anonymous_pipe` is stable on beta Follow-up to #137537 where I had to include a temporary dep on `os_pipe` before `anonymous_pipe` was stabilized. Now that `anonymous_pipe` is stable on beta, we can get rid of this workaround. Closes #137532. (Final cleanup item) r? `@Kobzol`
2025-04-18Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmannMatthias Krüger-2/+2
Remove `name_or_empty` Another step towards #137978. r? ``@jdonszelmann``
2025-04-18Rollup merge of #139553 - petrosagg:channel-double-free, r=RalfJung,tgross35Matthias Krüger-0/+45
sync::mpsc: prevent double free on `Drop` 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
2025-04-18Rollup merge of #139393 - ↵Matthias Krüger-1/+8
willglynn:rustdoc_output_target_feature_information, r=aDotInTheVoid rustdoc-json: Output target feature information `#[target_feature]` attributes refer to a target-specific list of features. Enabling certain features can imply enabling other features. Certain features are always enabled on certain targets, since they are required by the target's ABI. Features can also be enabled indirectly based on other compiler flags. Feature information is ultimately known to `rustc`. Rather than force external tools to track it – which may be wildly impractical due to `-C target-cpu` – have `rustdoc` output `rustc`'s feature data. This change is motivated by https://github.com/obi1kenobi/cargo-semver-checks/issues/1246, which intends to detect semver hazards caused by `#[target_feature]`. try-job: aarch64-gnu try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple
2025-04-18Rollup merge of #138528 - dianne:implicit-deref-patterns, r=NadrierilMatthias Krüger-1/+1
deref patterns: implement implicit deref patterns This implements implicit deref patterns (per https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Implicit-deref-patterns) and adds tests and an unstable book chapter. Best reviewed commit-by-commit. Overall there's a lot of additions, but a lot of that is tests, documentation, and simple(?) refactoring. Tracking issue: #87121 r? ``@Nadrieril``
2025-04-17Rollup merge of #139969 - psumbera:libc-rust-analyzer, r=lnicolaMatthias Krüger-2/+2
update libc This is needed for https://github.com/rust-lang/rust/pull/138699#discussion_r2048603474
2025-04-17Rollup merge of #139967 - jieyouxu:auxiliary, r=wesleywiserMatthias Krüger-0/+11
Introduce and use specialized `//@ ignore-auxiliary` for test support files instead of using `//@ ignore-test` ### Summary Add a semantically meaningful directive for ignoring test *auxiliary* files. This is for auxiliary files that *participate* in actual tests but should not be built by `compiletest` (i.e. these files are involved through `mod xxx;` or `include!()` or `#[path = "xxx"]`, etc.). ### Motivation A specialized directive like `//@ ignore-auxiliary` makes it way easier to audit disabled tests via `//@ ignore-test`. - These support files cannot use the canonical `auxiliary/` dir because they participate in module resolution or are included, or their relative paths can be important for test intention otherwise. Follow-up to: - #139705 - #139783 - #139740 See also discussions in: - [#t-compiler > Directive name for non-test aux files?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Directive.20name.20for.20non-test.20aux.20files.3F/with/512773817) - [#t-compiler > Handling disabled &#96;//@ ignore-test&#96; tests](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Handling.20disabled.20.60.2F.2F.40.20ignore-test.60.20tests/with/512005974) - [#t-compiler/meetings > &#91;steering&#93; 2025-04-11 Dealing with disabled tests](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/511717981) ### Remarks on remaining unconditionally disabled tests under `tests/` After this PR, against commit 79a272c6402, only **14** remaining test files are disabled through `//@ ignore-test`: <details> <summary>Remaining `//@ ignore-test` files under `tests/`</summary> ``` tests/debuginfo/drop-locations.rs 4://@ ignore-test (broken, see #128971) tests/rustdoc/macro-document-private-duplicate.rs 1://@ ignore-test (fails spuriously, see issue #89228) tests/rustdoc/inline_cross/assoc-const-equality.rs 3://@ ignore-test (FIXME: #125092) tests/ui/match/issue-27021.rs 7://@ ignore-test (#54987) tests/ui/match/issue-26996.rs 7://@ ignore-test (#54987) tests/ui/issues/issue-49298.rs 9://@ ignore-test (#54987) tests/ui/issues/issue-59756.rs 2://@ ignore-test (rustfix needs multiple suggestions) tests/ui/precondition-checks/write.rs 5://@ ignore-test (unimplemented) tests/ui/precondition-checks/read.rs 5://@ ignore-test (unimplemented) tests/ui/precondition-checks/write_bytes.rs 5://@ ignore-test (unimplemented) tests/ui/explicit-tail-calls/drop-order.rs 2://@ ignore-test: tail calls are not implemented in rustc_codegen_ssa yet, so this causes 🧊 tests/ui/panics/panic-short-backtrace-windows-x86_64.rs 3://@ ignore-test (#92000) tests/ui/json/json-bom-plus-crlf-multifile-aux.rs 3://@ ignore-test Not a test. Used by other tests tests/ui/traits/next-solver/object-soundness-requires-generalization.rs 2://@ ignore-test (see #114196) ``` </details> Of these, most are either **unimplemented**, or **spurious**, or **known-broken**. The outstanding one is `tests/ui/json/json-bom-plus-crlf-multifile-aux.rs` which I did not want to touch in *this* PR -- that aux file has load-bearing BOM and carriage returns and byte offset matters. I think those test files that require special encoding / BOM probably are better off as `run-make` tests. See #139968 for that aux file. ### Review advice - Best reviewed commit-by-commit. - The directive name diverged from the most voted `//@ auxiliary` because I think that's easy to confuse with `//@ aux-{crate,dir}`. r? compiler
2025-04-17Rollup merge of #139483 - RalfJung:nan, r=tgross35Matthias Krüger-1/+1
f*::NAN: guarantee that this is a quiet NaN I think we should guarantee that this is a quiet NaN. This then implies that programs not using `f*::from_bits` (or unsafe type conversions) are guaranteed to only work with quiet NaNs. It would be awkward if people start to write `0.0 / 0.0` instead of using the constant just because they want to get a guaranteed-quiet NaN. This is a `@rust-lang/libs-api` change. The definition of this constant currently is `0.0 / 0.0`, which is already guaranteed to be a quiet NaN. So all this does is forward that guarantee to our users.
2025-04-17Merge pull request #4278 from RalfJung/cron-test-doneRalf Jung-1/+1
remove test trigger fron cron job
2025-04-17remove test trigger fron cron jobRalf Jung-1/+1
2025-04-17Merge from rustcThe Miri Cronjob Bot-744/+1145
2025-04-17Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-17Rollup merge of #139962 - ognevny:opt-dist-tests, r=KobzolMatthias Krüger-1/+14
opt-dist: add a flag for running tests when using `opt-dist local` user probably won't need to run tests (for various reasons). currently the only way to disable them is to set `TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI envronments (as I guess) possibly the `run_tests` name can be confusing too... r? Kobzol try-job: dist-x86_64-linux try-job: dist-x86_64-msvc
2025-04-17Rollup merge of #139935 - cuviper:rustc-rayon-core-0.5.1, r=lqdMatthias Krüger-3/+0
Upgrade to `rustc-rayon-core` 0.5.1 * [Fix a race with deadlock detection](https://github.com/rust-lang/rustc-rayon/pull/15) * [Cherry-pick changes from upstream rayon-core](https://github.com/rust-lang/rustc-rayon/pull/16) - This also removes a few dependencies from rustc's tidy list.
2025-04-17Rollup merge of #139870 - ↵Matthias Krüger-14/+25
Shourya742:2025-04-15-add-retries-to-remove_and_create_dir_all, r=jieyouxu add retries to remove and create dir all closes: #139230 r? ```@jieyouxu```
2025-04-17run-make: drop `os_pipe` workaround now that `anonymous_pipe` is stable on betaJieyou Xu-6/+0
2025-04-17for testing, run the CI job an extra time todayRalf Jung-1/+1
2025-04-17ci.yml: always create sync PR when there's any differenceRalf Jung-35/+37
2025-04-17update libcpetr sumbera - Sun Microsystems - Prague Czech Republic-2/+2
2025-04-17Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgrbors-29/+0
Rollup of 8 pull requests Successful merges: - #138632 (Stabilize `cfg_boolean_literals`) - #139416 (unstable book; document `macro_metavar_expr_concat`) - #139782 (Consistent with treating Ctor Call as Struct in liveness analysis) - #139885 (document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book) - #139904 (Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests) - #139932 (transmutability: Refactor tests for simplicity) - #139944 (Move eager translation to a method on Diag) - #139948 (git: ignore `60600a6fa403216bfd66e04f948b1822f6450af7` for blame purposes) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-17compiletest: add specific `//@ ignore-auxiliary` for test support filesJieyou Xu-0/+11
This is for files that *participate* in actual tests but should not be built by `compiletest` (i.e. these files are involved through `mod xxx;` or `include!()` or `#[path = "xxx"]`, etc.). A specialized directive like `//@ ignore-auxiliary` makes it way easier to audit disabled tests via `//@ ignore-test`.
2025-04-17opt-dist: add a flag for running testsMaksim Bondarenkov-1/+14
when using `opt-dist local` user probably won't need to run tests (for various reasons). currently the only way to disable them is to set `TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI envronments (as I guess)
2025-04-17Merge pull request #19614 from lnicola/macos-14-arm64Laurențiu Nicola-1/+1
internal: Build MacOS AArch64 releases on that platform
2025-04-17Merge pull request #19612 from ChayimFriedman2/parent-genericsLukas Wirth-5/+32
fix: Fix a bug with predicate lowering of associated items
2025-04-17Build MacOS AArch64 releases on that platformLaurențiu Nicola-1/+1
2025-04-17Auto merge of #139926 - weihanglo:update-cargo, r=weihanglobors-1/+2
Update cargo 4 commits in 864f74d4eadcaea3eeda37a2e7f4d34de233d51e..d811228b14ae2707323f37346aee3f4147e247e6 2025-04-11 20:37:27 +0000 to 2025-04-15 15:18:42 +0000 - use `zlib-rs` for gzip compression in rust code (rust-lang/cargo#15417) - test(rustfix): Use `snapbox` for snapshot testing (rust-lang/cargo#15429) - chore(deps): update rust crate gix to 0.71.0 [security] (rust-lang/cargo#15391) - Make sure search paths inside OUT_DIR precede external paths (rust-lang/cargo#15221) Also, * The license exception of sha1_smol with BSD-3-Clause is no longer needed, as `gix-*` doesn't depend on it. * Cargo depends on zlib-rs, which is distributed under Zlib license r? ghost
2025-04-17Merge pull request #4263 from geetanshjuneja/check_shim_abiRalf Jung-82/+405
Replace check_shim with check_shim_abi in unix/foreign_items shims
2025-04-17Auto merge of #139940 - matthiaskrgr:rollup-rd4d3fn, r=matthiaskrgrbors-2/+4
Rollup of 9 pull requests Successful merges: - #135340 (Add `explicit_extern_abis` Feature and Enforce Explicit ABIs) - #139440 (rustc_target: RISC-V: feature addition batch 2) - #139667 (cfi: Remove #[no_sanitize(cfi)] for extern weak functions) - #139828 (Don't require rigid alias's trait to hold) - #139854 (Improve parse errors for stray lifetimes in type position) - #139889 (Clean UI tests 3 of n) - #139894 (Fix `opt-dist` CLI flag and make it work without LLD) - #139900 (stepping into impls for normalization is unproductive) - #139915 (replace some #[rustc_intrinsic] usage with use of the libcore declarations) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-17Rollup merge of #138632 - clubby789:stabilize-cfg-boolean-lit, ↵Matthias Krüger-29/+0
r=davidtwco,Urgau,traviscross Stabilize `cfg_boolean_literals` Closes #131204 `@rustbot` labels +T-lang +I-lang-nominated This will end up conflicting with the test in #138293 so whichever doesn't land first will need updating -- # Stabilization Report ## General design ### What is the RFC for this feature and what changes have occurred to the user-facing design since the RFC was finalized? [RFC 3695](https://github.com/rust-lang/rfcs/pull/3695), none. ### What behavior are we committing to that has been controversial? Summarize the major arguments pro/con. None ### Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those? None ## Has a call-for-testing period been conducted? If so, what feedback was received? Yes; only positive feedback was received. ## Implementation quality ### Summarize the major parts of the implementation and provide links into the code (or to PRs) Implemented in [#131034](https://github.com/rust-lang/rust/pull/131034). ### Summarize existing test coverage of this feature - [Basic usage, including `#[cfg()]`, `cfg!()` and `#[cfg_attr()]`](https://github.com/rust-lang/rust/blob/6d71251cf9e40326461f90f8ff9a7024706aea87/tests/ui/cfg/true-false.rs) - [`--cfg=true/false` on the command line being accessible via `r#true/r#false`](https://github.com/rust-lang/rust/blob/6d71251cf9e40326461f90f8ff9a7024706aea87/tests/ui/cfg/raw-true-false.rs) - [Interaction with the unstable `#[doc(cfg(..))]` feature](https://github.com/rust-lang/rust/tree/6d71251/tests/rustdoc-ui/cfg-boolean-literal.rs) - [Denying `--check-cfg=cfg(true/false)`](https://github.com/rust-lang/rust/tree/6d71251/tests/ui/check-cfg/invalid-arguments.rs) - Ensuring `--cfg false` on the command line doesn't change the meaning of `cfg(false)`: `tests/ui/cfg/cmdline-false.rs` - Ensuring both `cfg(true)` and `cfg(false)` on the same item result in it being disabled: `tests/ui/cfg/both-true-false.rs` ### What outstanding bugs in the issue tracker involve this feature? Are they stabilization-blocking? The above mentioned issue; it should not block as it interacts with another unstable feature. ### What FIXMEs are still in the code for that feature and why is it ok to leave them there? None ### Summarize contributors to the feature by name for recognition and assuredness that people involved in the feature agree with stabilization - `@clubby789` (RFC) - `@Urgau` (Implementation in rustc) ### Which tools need to be adjusted to support this feature. Has this work been done? `rustdoc`'s unstable`#[doc(cfg(..)]` has been updated to respect it. `cargo` has been updated with a forward compatibility lint to enable supporting it in cargo once stabilized. ## Type system and execution rules ### What updates are needed to the reference/specification? (link to PRs when they exist) A few lines to be added to the reference for configuration predicates, specified in the RFC.