summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-06-20Fix ICE in `missing_const_for_fn` (rust-lang/rust-clippy#14776)Alejandra González-2/+45
The `mir_drops_elaborated_and_const_checked` query result has been stolen already and cannot be borrowed again. Use the `optimized_mir` query result instead. changelog: [`missing_const_for_fn`]: fix ICE with some compilation options Fixes rust-lang/rust-clippy#14774 r? @Jarcho
2025-06-20`needless_borrow`: do not contradict `dangerous_implicit_autorefs` ↵Alejandra González-22/+49
(rust-lang/rust-clippy#14810) Rust 1.88 introduces the `dangerous_implicit_autorefs` lint which warns about using implicit autorefs on a place obtained from a raw pointer, as this may create aliasing issues. Prevent `clippy::needless_borrow` from triggering in this case, by disabling the lint when taking a reference on a raw pointer dereference. There might be a better way for doing this in the long run with a finer way of distinguish the problematic cases, but this will prevent Clippy from contradicting the compiler in the meantime. Fixes rust-lang/rust-clippy#14743 changelog: [`needless_borrow`]: do not contradict the compiler's `dangerous_implicit_autorefs` lint even though the refererences are not mandatory @rustbot label +beta-nominated <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> - [Beta nomination for 1.88](https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957) by [samueltardieu](https://github.com/samueltardieu) Generated by triagebot, see [help](https://forge.rust-lang.org/triagebot/note.html) for how to add more <!-- TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957":{"title":"Beta nomination for 1.88","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14810#issuecomment-2883753957","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END --> <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
2025-06-20remove superseded lints (rust-lang/rust-clippy#14703)Samuel Tardieu-1091/+116
changelog: [`transmute_float_to_int, transmute_int_to_char, transmute_int_to_float`, `transmute_num_to_bytes`]: remove lints, now in rustc these lints are now mostly in rustc, so they dont need to be in clippy anymore https://github.com/rust-lang/rust/pull/136083#discussion_r2009897120 pending https://github.com/rust-lang/rust/pull/140431: transmute_int_to_bool <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> - ["Rust version of new lints should be checked" by @samueltardieu](https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576) Generated by triagebot, see [help](https://forge.rust-lang.org/triagebot/note.html) for how to add more <!-- TRIAGEBOT_SUMMARY_DATA_START$${"entries_by_url":{"https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576":{"title":"Rust version of new lints should be checked","comment_url":"https://github.com/rust-lang/rust-clippy/pull/14703#issuecomment-2861982576","author":"samueltardieu"}}}$$TRIAGEBOT_SUMMARY_DATA_END --> <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
2025-06-20Fix `collapsible_if` FP on block stmt before expr (rust-lang/rust-clippy#14730)Samuel Tardieu-8/+29
Closes rust-lang/rust-clippy#14722 changelog: [`collapsible_if`] fix FP on block stmt before expr
2025-06-20Don't warn about unloaded crates (rust-lang/rust-clippy#14733)Alex Macleod-4/+41
Fixes https://github.com/rust-lang/rust-clippy/pull/14397#issuecomment-2848328221 r? @samueltardieu changelog: Don't warn about clippy.toml disallowed paths for crates that were not loaded
2025-05-10[beta-1.88] Update cargoWeihang Lo-0/+0
2025-05-09Rollup merge of #140804 - bend-n:signed, r=lcnrStuart Cook-0/+1
add signed ints to unn- transmutes to ensure feature parity i forgot a few cases https://github.com/rust-lang/rust-clippy/pull/14703/#pullrequestreview-2824194994 adds - char -> i32 - i32 -> char - float -> size () - size -> float - i32 -> float ``@rustbot`` label L-unnecessary_transmutes
2025-05-08Auto merge of #140786 - Kobzol:try-builds-no-deny-warnings, r=jieyouxubors-13/+32
Do not deny warnings in "fast" try builds When we do the classic ``@bors` try` build without specifying `try-job` in the PR description, we want to get a compiler toolchain for perf./crater/local experimentation as fast as possible. We don't run any tests in that case, so it seems reasonable to also ignore warnings. Fixes: https://github.com/rust-lang/rust/issues/140753 r? `@jieyouxu` try-job: dist-x86_64-linux
2025-05-08add signed integers to unnecessary_lints to ensure feature parity with clippybendn-0/+1
2025-05-08Do not deny warnings for fast try buildsJakub Beránek-10/+27
2025-05-08Rollup merge of #140755 - dpaoliello:arm64windebuginfo, r=jieyouxuMatthias Krüger-0/+1
[win][arm64] Disable various DebugInfo tests that don't work on Arm64 Windows While trying to get the aarch64-msvc build working correctly (#140136), various DebugInfo related tests were failing. I've added comments to each test to indicate why it is disabled and linked to appropriate bugs. * `tests/debuginfo/step-into-match.rs`: Stepping at the end of a function on goes to the callsite, not the instruction after it. * `tests/debuginfo/type-names.rs`: Arm64 Windows cdb doesn't support JavaScript extensions. Followed up with the Microsoft Debugger Tools team to fix this. * `tests/ui/runtime/backtrace-debuginfo.rs`: Backtraces are truncated due to #140489
2025-05-08Migrate `opt-dist` to edition 2024Jakub Beránek-2/+5
2025-05-08Remove unused dependency from opt-distJakub Beránek-1/+0
2025-05-08Rollup merge of #140260 - compiler-errors:only-global-post-norm, r=lcnrMatthias Krüger-3/+3
Only prefer param-env candidates if they remain non-global after norm Introduce `CandidateSource::GlobalParamEnv`, and dynamically compute the `CandidateSource` based on whether the predicate contains params *post-normalization*. This code needs some cleanup and documentation. I'm just putting this up for review. cc https://github.com/rust-lang/trait-system-refactor-initiative/issues/179 r? lcnr
2025-05-08Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrierilbors-0/+3
allow deref patterns to participate in exhaustiveness analysis Per [this proposal](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Exhaustiveness), this PR allows deref patterns to participate in exhaustiveness analysis. Currently all deref patterns enforce `DerefPure` bounds on their scrutinees, so this assumes all patterns it's analyzing are well-behaved. This also doesn't support [mixed exhaustiveness](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Mixed-exhaustiveness), and instead emits an error if deref patterns are used together with normal constructors. I think mixed exhaustiveness would be nice to have (especially if we eventually want to support arbitrary `Deref` impls[^1]), but it'd require more work to get reasonable diagnostics[^2]. Tracking issue for deref patterns: #87121 r? `@Nadrieril` [^1]: Regardless of whether we support limited exhaustiveness checking for untrusted `Deref` or always require other arms to be exhaustive, I think it'd be useful to allow mixed matching for user-defined smart pointers. And it'd be strange if it worked there but not for `Cow`. [^2]: I think listing out witnesses of non-exhaustiveness can be confusing when they're not necessarily disjoint, and when you only need to cover some of them, so we'd probably want special formatting and/or explanatory subdiagnostics. And if it's implemented similarly to unions, we'd probably also want some way of merging witnesses; the way witnesses for unions can appear duplicated is pretty unfortunate. I'm not sure yet how the diagnostics should look, especially for deeply nested patterns.
2025-05-07[win][arm64] Disable various DebugInfo tests that don't work on Arm64 WindowsDaniel Paoliello-0/+1
2025-05-07Rollup merge of #140745 - jchecahi:run-make-support-cargo-rustc-dylib, ↵Guillaume Gomez-1/+4
r=jieyouxu run-make-support: set rustc dylib path for cargo wrapper Some run-make tests invoke Cargo via run_make_support::cargo(), but fail to execute correctly when rustc is built without rpath. In these setups, runtime loading of rustc’s shared libraries fails unless the appropriate dynamic library path is set manually. This commit updates the cargo() wrapper to call set_host_compiler_dylib_path(), aligning its behavior with the existing rustc() wrapper: https://github.com/rust-lang/rust/blob/f76c7367c6363d33ddb5a93b5de0d158b2d827f6/src/tools/run-make-support/src/external_deps/rustc.rs#L39-L43 This ensures that Cargo invocations during tests inherit the necessary dylib paths, avoiding errors related to missing shared libraries in rpath-less builds. Fixes part of #140738
2025-05-07Require T: TypeFoldable in Binder<T> visitMichael Goulet-3/+3
2025-05-07run-make-support: set rustc dylib path for cargo wrapperJesus Checa Hidalgo-1/+4
Some run-make tests invoke Cargo via run_make_support::cargo(), but fail to execute correctly when rustc is built without rpath. In these setups, runtime loading of rustc’s shared libraries fails unless the appropriate dynamic library path is set manually. This commit updates the cargo() wrapper to call set_host_compiler_dylib_path(), aligning its behavior with the existing rustc() wrapper: https://github.com/rust-lang/rust/blob/f76c7367c6363d33ddb5a93b5de0d158b2d827f6/src/tools/run-make-support/src/external_deps/rustc.rs#L39 This ensures that Cargo invocations during tests inherit the necessary dylib paths, avoiding errors related to missing shared libraries in rpath-less builds. Fixes part of #140738
2025-05-07Auto merge of #137995 - hkBst:parse_format_reuse_unescape, r=nnethercotebors-3/+3
Remove duplicate impl of string unescape from parse_format r? `@nnethercote`
2025-05-06add stubbed-out cases for rust-analyzerdianne-0/+3
rust-analyzer doesn't construct `DerefPattern(_)` constructors, so these shouldn't crash. It looks like this is how slice patterns are implemented too.
2025-05-07Rollup merge of #134273 - RalfJung:de-stabilize-bench, r=ibraheemdev,traviscrossJacob Pratt-0/+1
de-stabilize bench attribute This has been soft-unstable since forever (https://github.com/rust-lang/rust/pull/64066), and shown in future-compat reports since Rust 1.77 (https://github.com/rust-lang/rust/pull/116274). The feature covering `bench` itself is tracked in https://github.com/rust-lang/rust/issues/50297, which has been closed despite still having active feature gates referencing it. Cc `@rust-lang/libs-api`
2025-05-06Remove duplicate impl of string unescapeMarijn Schouten-3/+3
2025-05-06Rollup merge of #140687 - ehuss:update-mdbook, r=jieyouxuStuart Cook-3/+3
Update mdbook to 0.4.49 This is a routine update to pull in some fixes and updates. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0449
2025-05-06Rollup merge of #140251 - Zalathar:coverage-dump-path, r=clubby789Stuart Cook-104/+279
coverage-dump: Resolve global file IDs to filenames The coverage-dump tool, used by coverage tests, currently includes “global file ID” numbers in its dump output. This PR adds support for parsing coverage filename information from LLVM assembly `.ll` files, and resolving those file IDs to the corresponding filename, for inclusion in dump output. This makes dump output more informative, especially for test cases involving multiple files, and will be important for testing expansion region support in the future. --- The bootstrap changes don't necessarily have to land at the same time (e.g. they could be deferred to after the stage0 redesign if requested), but I would prefer to land them now if possible.
2025-05-06Rollup merge of #140035 - fee1-dead-contrib:push-oszwkkvmpkks, ↵Stuart Cook-1/+18
r=jieyouxu,wesleywiser Implement RFC 3503: frontmatters Tracking issue: #136889 Supercedes #137193. This implements [RFC 3503](https://github.com/rust-lang/rfcs/blob/master/text/3503-frontmatter.md). This might break rust-analyzer. Will look into how to fix that. Suggestions welcome for how to improve diagnostics.
2025-05-06Rollup merge of #139773 - thaliaarchi:vec-into-iter-last, r=workingjubileeStuart Cook-7/+46
Implement `Iterator::last` for `vec::IntoIter` Avoid iterating everything when we have random access to the last element.
2025-05-06coverage-dump: Dump filenames instead of global file IDs (and bless)Zalathar-2/+1
2025-05-06coverage-dump: Make filenames available to covfun record dumpingZalathar-3/+87
Actually printing the filenames is deferred to a subsequent commit that will simultaneously bless all affected tests.
2025-05-06coverage-dump: Include filenames hash in covfun line dataZalathar-26/+101
2025-05-06coverage-dump: Extract a common parser method for maybe-compressed bytesZalathar-23/+41
2025-05-06coverage-dump: Extract some common code to an `llvm_utils` submoduleZalathar-48/+51
2025-05-06bootstrap: Add check/test/run steps for src/tools/coverage-dumpZalathar-4/+0
This also causes the coverage-dump unit tests to run in CI and `./x test` by default.
2025-05-06Auto merge of #131160 - ↵bors-31/+31
ismailarilik:handle-potential-query-instability-lint-for-rustc-middle, r=oli-obk Handle `rustc_middle` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_middle/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/lib.rs#L29) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447 r? `@compiler-errors`
2025-05-05Auto merge of #140682 - GuillaumeGomez:rollup-6xjf6zn, r=GuillaumeGomezbors-1/+1
Rollup of 11 pull requests Successful merges: - #140080 (mir-opt: Use one MirPatch in MatchBranchSimplification) - #140115 (mir-opt: execute MatchBranchSimplification after GVN) - #140357 (bypass linker configuration and cross target check on `x check`) - #140374 (Resolve instance for SymFn in global/naked asm) - #140559 (Removing rustc_type_ir in the rustc_infer codebase) - #140605 (`fn check_opaque_type_parameter_valid` defer error) - #140636 (implement `PanicTracker` to track `t` panics) - #140661 (Make `-Zfixed-x18` into a target modifier) - #140670 (calculate step duration in a panic-safe way) - #140672 (Deeply normalize in the new solver in WF) - #140676 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-05Update mdbook to 0.4.49Eric Huss-3/+3
This is a routine update to pull in some fixes and updates. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0449
2025-05-05Rollup merge of #140374 - compiler-errors:global_asm-bug, r=lcnrGuillaume Gomez-1/+1
Resolve instance for SymFn in global/naked asm `Instance::expect_resolve` ensures that we're actually going from trait item -> impl item. Fixes #140373
2025-05-05Auto merge of #140664 - RalfJung:miri-sync, r=RalfJungbors-1541/+1796
Miri subtree update r? `@ghost`
2025-05-05Implement RFC 3503: frontmattersDeadbeef-1/+18
Supercedes #137193
2025-05-05Auto merge of #140651 - lnicola:sync-from-ra, r=lnicolabors-1704/+2427
Subtree update of `rust-analyzer` r? `@ghost`
2025-05-05Handle rustc_middle cases of rustc::potential_query_instability lintismailarilik-31/+31
2025-05-05Rename Instance::new to Instance::new_raw and add a note that it is rawMichael Goulet-1/+1
2025-05-05Merge pull request #4310 from RalfJung/addr-space-conservationRalf Jung-8/+17
alloc_addresses: when we are running out of addresses, start reusing more aggressively
2025-05-05Merge pull request #4309 from RalfJung/both-borrows-testsRalf Jung-532/+94
move tests that are identical between SB and TB to shared files
2025-05-05alloc_addresses: when we are running out of addresses, start reusing more ↵Ralf Jung-8/+17
aggressively
2025-05-05consistent folder naming: stacked-borrows -> stacked_borrowsRalf Jung-6/+6
2025-05-05Merge pull request #4306 from yoctocell/fix-unsafecell-inside-boxRalf Jung-1/+43
Tree Borrows: Correctly handle interior mutable data in `Box`
2025-05-05move tests that are identical between SB and TB to shared filesRalf Jung-764/+326
2025-05-05Merge pull request #4307 from JoJoDeveloping/remove-unique-is-uniqueRalf Jung-451/+12
Remove -Zunique-is-unique
2025-05-05Auto merge of #140353 - rust-lang:cargo_update, r=Mark-Simulacrumbors-62/+135
Weekly `cargo update` Automation to keep dependencies in `Cargo.lock` current. The following is the output from `cargo update`: ```txt compiler & tools dependencies: Locking 36 packages to latest compatible versions Updating addr2line v0.21.0 -> v0.24.2 Updating anyhow v1.0.97 -> v1.0.98 Updating askama v0.13.0 -> v0.13.1 (available: v0.14.0) Updating askama_derive v0.13.0 -> v0.13.1 Updating backtrace v0.3.71 -> v0.3.74 Updating blake3 v1.8.1 -> v1.8.2 Updating chrono v0.4.40 -> v0.4.41 Updating clap v4.5.36 -> v4.5.37 Updating clap_builder v4.5.36 -> v4.5.37 Updating color-eyre v0.6.3 -> v0.6.4 Updating color-spantrace v0.2.1 -> v0.2.2 Updating derive-where v1.2.7 -> v1.4.0 Updating getrandom v0.2.15 -> v0.2.16 Removing gimli v0.28.1 Updating hashbrown v0.15.2 -> v0.15.3 Updating jiff v0.2.6 -> v0.2.12 Updating jiff-static v0.2.6 -> v0.2.12 Updating libm v0.2.11 -> v0.2.13 Removing object v0.32.2 Updating openssl-sys v0.9.107 -> v0.9.108 Adding owo-colors v4.2.0 Updating proc-macro2 v1.0.94 -> v1.0.95 Updating psm v0.1.25 -> v0.1.26 Updating rand v0.9.0 -> v0.9.1 Updating redox_syscall v0.5.11 -> v0.5.12 Updating rustix v1.0.5 -> v1.0.7 Updating sha2 v0.10.8 -> v0.10.9 Updating stacker v0.1.20 -> v0.1.21 Updating syn v2.0.100 -> v2.0.101 Updating synstructure v0.13.1 -> v0.13.2 Updating toml_datetime v0.6.8 -> v0.6.9 Adding windows v0.61.1 Adding windows-collections v0.2.0 Adding windows-future v0.2.0 Adding windows-numerics v0.2.0 Updating winnow v0.7.6 -> v0.7.9 Updating zerocopy v0.8.24 -> v0.8.25 Updating zerocopy-derive v0.8.24 -> v0.8.25 note: pass `--verbose` to see 33 unchanged dependencies behind latest library dependencies: Locking 2 packages to latest compatible versions Removing allocator-api2 v0.2.21 Updating hashbrown v0.15.2 -> v0.15.3 Removing proc-macro2 v1.0.94 Removing quote v1.0.40 Updating rand v0.9.0 -> v0.9.1 Removing syn v2.0.100 Removing unicode-ident v1.0.18 Removing zerocopy v0.8.24 Removing zerocopy-derive v0.8.24 note: pass `--verbose` to see 3 unchanged dependencies behind latest rustbook dependencies: Locking 31 packages to latest compatible versions Updating ammonia v4.0.0 -> v4.1.0 Updating anyhow v1.0.97 -> v1.0.98 Updating cc v1.2.19 -> v1.2.21 Updating chrono v0.4.40 -> v0.4.41 Updating clap v4.5.36 -> v4.5.37 Updating clap_builder v4.5.36 -> v4.5.37 Updating clap_complete v4.5.47 -> v4.5.48 Adding cssparser v0.35.0 Adding cssparser-macros v0.6.1 Adding dtoa v1.0.10 Adding dtoa-short v0.3.5 Updating hashbrown v0.15.2 -> v0.15.3 Updating html5ever v0.27.0 -> v0.31.0 Updating jiff v0.2.6 -> v0.2.12 Updating jiff-static v0.2.6 -> v0.2.12 Updating libc v0.2.171 -> v0.2.172 Updating markup5ever v0.12.1 -> v0.16.1 Adding match_token v0.1.0 Adding phf_macros v0.11.3 Updating proc-macro2 v1.0.94 -> v1.0.95 Updating redox_syscall v0.5.11 -> v0.5.12 Updating rustix v1.0.5 -> v1.0.7 Updating sha2 v0.10.8 -> v0.10.9 Updating syn v2.0.100 -> v2.0.101 Updating synstructure v0.13.1 -> v0.13.2 Updating toml v0.8.20 -> v0.8.22 Updating toml_datetime v0.6.8 -> v0.6.9 Updating toml_edit v0.22.24 -> v0.22.26 Adding toml_write v0.1.1 Adding web_atoms v0.1.1 Updating winnow v0.7.6 -> v0.7.9 ```