about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-06Fix CIJakub Beránek-4/+4
2025-07-06Horrible hack to make codegen backends "work" during checkJakub Beránek-11/+32
2025-07-06Add support for allowing features when checking toolsJakub Beránek-2/+15
2025-07-06Use stage auto-bump when cross-checking on stage 1Jakub Beránek-17/+14
2025-07-06Add `#[tracing::instrument]` to the LLVM build stepJakub Beránek-0/+9
2025-07-06Update library cross-compilation testJakub Beránek-3/+2
2025-07-06Update `Mode::ToolStd` commentJakub Beránek-2/+7
2025-07-06Add staging comment to `check::Rustc`Jakub Beránek-0/+2
2025-07-06Add change tracker entryJakub Beránek-0/+5
2025-07-06Unify selection of build compiler for checking in a single functionJakub Beránek-48/+47
2025-07-06Implement `CoverageDump` checking through the `tool_check_step` macroJakub Beránek-66/+5
2025-07-06Fixup check of rust-analyzer, codegen backends, compiletest and other toolsZalathar-64/+113
2025-07-06Properly check that an expression might be the one returned (#15115)llogiq-9/+422
The `TyCtxt::hir_get_fn_id_for_return_block()` function was too broad, as it will return positively even when given part of an expression that can be used as a return value. A new `potential_return_of_enclosing_body()` utility function has been made to represent the fact that an expression might be directly returned from its enclosing body. changelog: [`return_and_then`]: prevent false positives in case of a partially used expression Fixes rust-lang/rust-clippy#15111 Fixes rust-lang/rust-clippy#14927 <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> ### Summary Notes - [Beta-nomination](https://github.com/rust-lang/rust-clippy/pull/15115#issuecomment-2996222332) by [samueltardieu](https://github.com/samueltardieu) *Managed by `@rustbot`—see [help](https://forge.rust-lang.org/triagebot/note.html) for details* <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
2025-07-06Handle potentially-shadowing bindings in `manual_let_else` (#15118)llogiq-11/+218
This commit also adds more test cases, which already worked but were mentioned in the issue. Fixes rust-lang/rust-clippy#9939 changelog: [`manual_let_else`]: correctly handle binding subpattern with unused name
2025-07-06fix: Improve floating point lint to handle ambiguous type (#15133)llogiq-19/+209
Fixes: rust-lang/rust-clippy#14897, rust-lang/rust-clippy#10015 This is not a perfect solution, but it fixes the issue. Happy to discuss further with the clippy team. This PR refines check_mul_add to avoid false positives on ambiguous float types (e.g., f32 vs f64). It improves type detection and ensures mul_add is only suggested when the type is clear. Changes: - Improved detection of ambiguous float types - Refined mul_add suggestion logic - Added tests for ambiguous cases ## Example Before this change, expressions like: ```rust let x = 1.0; // ambiguous type let _ = x * 2.0 + 0.5; // could incorrectly suggest mul_add ``` ---- changelog: [`suboptimal_flops`]: improve handling of ambiguous float types in mul_add suggestions
2025-07-06Don't remove explicit cast to trait object pointer (#15145)llogiq-1/+14
Fixes rust-lang/rust-clippy#15141 ---- changelog: [`borrow_as_ptr`]: do not remove cast to trait object pointer
2025-07-06FIX: NegMultiply should preserve parenthesis when method is called (#15179)llogiq-9/+63
Hi, I noticed that the lint [neg_multiply](https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply) generates bad code when we call a method on the expression. Consider `((a.delta - 0.5).abs() * -1.0).total_cmp(&1.0)`. Currently this would be changed by clippy to `-(a.delta - 0.5).abs() .total_cmp(&1.0)` - which does not compile because we are trying to negate an ordering enum - but what we really want is `(-(a.delta - 0.5).abs()).total_cmp(&1.0)`. This PR fixes this. changelog: [`neg_multiply`] does not remove parenthesis anymore if a method is being called on the affected expression NOTE: This is the first time I am contributing to clippy or the rust repo in general. So I am not sure whether my approach to fixing this issue is goo, if there are better solutions or if I missed something. Thanks & hope you have a good day, Dario
2025-07-06Make build compiler explicit in `check::Rustc` and `check::Std`Jakub Beránek-73/+87
2025-07-06Remove `custom_stage` override from `check::Std` and make 1 be the default ↵Jakub Beránek-54/+11
check stage for it
2025-07-06Make default check stage be 1, and error out on checking with stage 0Jakub Beránek-5/+11
2025-07-06fix: redundant_closure_call lint for closures with block (#15144)llogiq-15/+61
Fixes rust-lang/rust-clippy#9583 When a closure with no parameters is called immediately after being defined, clippy can now suggest replacing the entire expression with just the closure's body. ---- changelog: [`redundant_closure_call`]: add fixes for closures with block
2025-07-06rename panic_paylods → unwind_payloadsRalf Jung-7/+7
2025-07-06Renamed retain_mut to retain on LinkedList as mentioned in the ACPJoshua Gentry-37/+2
2025-07-06interpret: rename StackPopCleanupRalf Jung-56/+56
2025-07-06Rollup merge of #143518 - joshtriplett:sort-attrs, r=KobzolMatthias Krüger-0/+2
rustc_builtin_macros: Make sure registered attributes stay sorted As with the list of builtin macros, use tidy to make sure the list of builtin attributes stays sorted.
2025-07-06Rollup merge of #143514 - joshtriplett:macro-test-organization, r=jieyouxuMatthias Krüger-11/+11
Organize macro tests a bit more - Move some macro parsing tests from `tests/ui/parser` to `tests/ui/parser/macro`. - Most macro tests use `macro` in the name, making it easy to find and run tests relevant to macros. However, a few use `mbe` instead. Rename those to say `macro`.
2025-07-06Rollup merge of #143492 - Diggsey:db-fix-object-ambiguity, r=RalfJungMatthias Krüger-6/+14
Use `object` crate from crates.io to fix windows build error See https://rust-lang.zulipchat.com/#narrow/channel/386786-rustc-codegen-gcc/topic/Cannot.20compile.20rustc.20on.20Windows.2010/with/527240094
2025-07-06Rollup merge of #143252 - JonathanBrouwer:rewrite_empty_attribute, ↵Matthias Krüger-199/+201
r=jdonszelmann Rewrite empty attribute lint for new attribute parser cc `@jdonszelmann`
2025-07-06Auto merge of #143515 - rust-lang:cargo_update, r=clubby789bors-12/+27
Weekly `cargo update` Automation to keep dependencies in `Cargo.lock` current. r? dep-bumps The following is the output from `cargo update`: ```txt compiler & tools dependencies: Locking 6 packages to latest compatible versions Adding io-uring v0.7.8 Updating jsonpath-rust v1.0.2 -> v1.0.3 Updating libffi v4.1.0 -> v4.1.1 Updating libffi-sys v3.3.1 -> v3.3.2 Updating tokio v1.45.1 -> v1.46.1 Updating wasm-component-ld v0.5.14 -> v0.5.15 note: pass `--verbose` to see 41 unchanged dependencies behind latest library dependencies: Locking 0 packages to latest compatible versions note: pass `--verbose` to see 4 unchanged dependencies behind latest rustbook dependencies: Locking 1 package to latest compatible version Updating cc v1.2.27 -> v1.2.29 ```
2025-07-06move `stable_mir` back to its own crate and move `rustc_internal` to ↵Makai-1291/+1241
the`stable_mir` crate As part of this reorganization, some traits need to be moved from `rustc_smir::context::traits` to `stable_mir::unstable::internal_cx`. These traits are specifically designed for `InternalCx` to clarify the behavior of different functions that share the same name. This move is necessary to avoid orphan rule violations.
2025-07-06Include enum variants in world symbolsChayim Refael Friedman-0/+75
I opted to not include enum variant imports, only under the enum, and to not gate this behind a setting.
2025-07-06Auto merge of #143521 - matthiaskrgr:rollup-kpv1og3, r=matthiaskrgrbors-179/+350
Rollup of 6 pull requests Successful merges: - rust-lang/rust#143416 (mbe: Defer checks for `compile_error!` until reporting an unused macro rule) - rust-lang/rust#143470 (std: sys: net: uefi: tcp4: Implement read) - rust-lang/rust#143477 (use `is_multiple_of` and `div_ceil`) - rust-lang/rust#143484 (distinguish the duplicate item of rpitit) - rust-lang/rust#143493 (tidy: use --bless for tidy spellcheck instead of spellcheck:fix) - rust-lang/rust#143504 (compiletest: print slightly more information on fs::write failure) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-06Do not unify borrowed locals in CopyProp.Camille GILLOT-94/+360
2025-07-06Do not remove `as` if it changes the type (#15182)dswij-2/+30
While `expr as T` can be removed as a statement if `expr` has no side-effect, the `as T` part alone cannot be removed if the type of `expr` would be ambiguous without the cast. changelog: [`unnecessary_operation`]: do not remove casts if they are useful to type the expression Fixes rust-lang/rust-clippy#15173
2025-07-06Merge pull request #20184 from Veykril/push-ywpynxnltpokLukas Wirth-32/+44
chore: Remove dead field from `InferenceContext`
2025-07-06chore: Remove dead field from `InferenceContext`Lukas Wirth-32/+44
2025-07-06Rollup merge of #143504 - RalfJung:compiletest-err, r=jieyouxuMatthias Krüger-1/+2
compiletest: print slightly more information on fs::write failure See [#t-infra > compiletest: panic in dump_output_file: No such file or dire @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/compiletest.3A.20panic.20in.20dump_output_file.3A.20No.20such.20file.20or.20dire/near/527294714)
2025-07-06Rollup merge of #143493 - lolbinarycat:tidy-spellcheck-bless, r=KobzolMatthias Krüger-6/+17
tidy: use --bless for tidy spellcheck instead of spellcheck:fix previous behavior was inconsistent with existing extra checks. unsure if this needs a change tracker entry or a warning for people who try to use the old behavior. unsure if we should call this `spellcheck:lint` for consistency. making this consistent is a prerequisite for https://github.com/rust-lang/rust/pull/143398 cc `@nnethercote` r? `@Kobzol`
2025-07-06Rollup merge of #143484 - bvanjoi:issue-140796, r=compiler-errorsMatthias Krüger-2/+112
distinguish the duplicate item of rpitit Fixes rust-lang/rust#140796 r? compiler cc `@Zoxc`
2025-07-06Rollup merge of #143477 - folkertdev:use-is-multiple-of, r=joshtriplettMatthias Krüger-34/+33
use `is_multiple_of` and `div_ceil` In tricky logic, these functions are much more informative than the manual implementations. They also catch subtle bugs: - the manual `is_multiple_of` often does not handle division by zero - manual `div_ceil` often does not consider overflow The transformation is free for `is_multiple_of` if the divisor is compile-time known to be non-zero. For `div_ceil` there is a small cost to considering overflow. Here is some assembly https://godbolt.org/z/5zP8KaE1d.
2025-07-06Rollup merge of #143470 - Ayush1325:uefi-tcp4-recv, r=joshtriplettMatthias Krüger-6/+52
std: sys: net: uefi: tcp4: Implement read - A blocking implementation of tcp4 read. - Basically a copy of [write](https://github.com/rust-lang/rust/pull/141532)
2025-07-06Rollup merge of #143416 - joshtriplett:mbe-simplifications, r=nnethercoteMatthias Krüger-130/+134
mbe: Defer checks for `compile_error!` until reporting an unused macro rule The current MBE parser checks rules at initial parse time to see if their RHS has `compile_error!` in it, and returns a list of rule indexes and LHS spans that don't map to `compile_error!`, for use in unused macro rule checking. Instead, have the unused macro rule reporting ask the macro for the rule to report, and let the macro check at that time. That avoids checking rules unless they're unused. In the process, refactor the data structure used to store macro rules, to group the LHS and RHS (and LHS span) of each rule together, and refactor the unused rule tracking to only track rule indexes. This builds atop a couple of minor MBE refactors. I would suggest reviewing commit-by-commit. The overall result is a further simplification of the macro code.
2025-07-06Merge pull request #20132 from A4-Tacks/asmut-borrow-minicoreLukas Wirth-0/+34
Add AsMut, Borrow and BorrowMut to minicore and famous_defs
2025-07-06Merge pull request #20126 from Wilfred/no_unwrap_in_discover_projectsLukas Wirth-3/+8
fix: Avoid .unwrap() when running the discover command
2025-07-06Fix line break after ":" in unpretty attribute printJonathan Brouwer-10/+8
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06Rewrite empty attribute lintJonathan Brouwer-4/+4
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06Rewrite empty attribute lintJonathan Brouwer-191/+195
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06Propagate `accept-comment-above-attributes` to statements (#15213)Samuel Tardieu-4/+37
Turns out that things like `#[attr]return unsafe { func(); }` didn't work because we weren't checking above attributes on statements, only on blocks! fixes https://github.com/rust-lang/rust-clippy/issues/13189 Useful for Rust-For-Linux changelog:[`undocumented_unsafe_blocks`]: Make sure to propagate `accept-comment-above-attributes` to **all** statements.
2025-07-06Auto merge of #143354 - Shourya742:2025-07-03-bye-bye-as_mut-command, r=Kobzolbors-46/+76
Port streaming commands in bootstrap to `BootstrapCommand` and remove `as_command_mut` This PR adds streaming capabilities to BootstrapCommand and migrate existing command streaming scenario's used in bootstrap. r? `@Kobzol`
2025-07-06Merge pull request #20179 from ChayimFriedman2/destructuring-assignment-neverLukas Wirth-2/+61
fix: Fix diverging destructuring assignments