Clippy subtree update - #160692
Conversation
This fix adds an aditional check, by checking if the previous element was an image, and ignoring the lack of punctuation for a subsequent link. An aditional test was added to account for this case. Closes rust-lang#16439
The main value of this help text is only provided when the developer already provided all the fields. So a better example is showing the developer that this lint can be used to clean up those struct initalizations. Besides the lint already points to the ...zero_point line so the developer is inclined to remove it.
Because of the way this lint implements text splitting, I need to track markdown and text lengths separately. This is fairly easy, since we can exhaustively check every markdown event and count the characters inside.
test: supply test for issue 16954. fix: suggest MethodCall for expr with type anchor. fix: remove redudant is_lit check. fix: missing parenthesis for a * b. fix: remove redundant lit check.
This better matches how the argument is actually used.
See `rustc_hir::intravisit::{walk_expr,walk_pat_expr}`.
Detect `match` expressions where every arm is a block ending in the same trailing expression and the `match` is in tail position, suggesting the expression be hoisted out below the `match`. changelog: [`branches_sharing_code`]: also lint `match` expressions whose arms end with the same expression
…modes Implement configuration-based approach with three options: - alphabetical (default) - trait_item_ordering - alphabetical_or_trait_item_ordering Fixes false positives for non-alphabetically-ordered trait definitions.
…ait_item_ordering` and `alphabetical_or_trait_item_ordering
The `opt.and_then(|x| { /* comment */ if .. { Some(x) } else { None } })`
to `filter` rewrite drops any comment inside the closure. Mark the
suggestion `MaybeIncorrect` when the replaced span contains a comment, so
`clippy --fix` no longer applies it silently. This matches the existing
`span_contains_comment` handling in manual_ok_err / manual_unwrap_or /
manual_flatten.
…ingjubilee Carry the `b_offset` inside `BackendRepr::ScalarPair` Inspired by rust-lang/compiler-team#1007 but doesn't actually change any of the layout rules just yet. This turned out to be a nice change even if we didn't use the extra flexibility, IMHO, because it allowed so many things like ```diff @@ -222,12 +224,12 @@ fn from_const_alloc<Bx: BuilderMethods<'a, 'tcx, Value = V>>( let val = read_scalar(offset, size, s, bx.immediate_backend_type(layout)); OperandRef { val: OperandValue::Immediate(val), layout, move_annotation: None } } - BackendRepr::ScalarPair( - a @ abi::Scalar::Initialized { .. }, - b @ abi::Scalar::Initialized { .. }, - ) => { + BackendRepr::ScalarPair { + a: a @ abi::Scalar::Initialized { .. }, + b: b @ abi::Scalar::Initialized { .. }, + b_offset, + } => { let (a_size, b_size) = (a.size(bx), b.size(bx)); - let b_offset = (offset + a_size).align_to(b.default_align(bx).abi); assert!(b_offset.bytes() > 0); let a_val = read_scalar( offset, ``` as *oh my* was that little magic incantation copy-pasted all over the place. Apologies for the pretty-giant PR. I tried to make it as direct a change as I could: if it was `(..)` before it's `{ .. }` now, if it was `(_, _)` before it's `{ a: _, b: _, b_offset: _ }` now. I kept the names the same so the code lines were unchanged even if normally I might have just renamed things, etc. I'll add some inline notes for places of particular interest. r? @workingjubilee
…is empty. This matches the same check from disallowed_macros and skips unnecessary work when the rule has been enabled but not configured.
This PR enables [the community reviews feature](https://forge.rust-lang.org/triagebot/pr-assignment.html#community-reviews) in triagebot. It's configured to require **2 approvals** before automatic assignment kicks in; manual assignments (`r?`) bypass this requirement. It's signaled (and controlled) on a PR with the `S-waiting-on-community-reviews` label ~~(to be created)~~. Context: - [#general > Article: Open Code Review at Bevy](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Article.3A.20Open.20Code.20Review.20at.20Bevy/with/604251242) - [#clippy > External approvals and review](https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/External.20approvals.20and.20review/with/604254405) - [Together for a healthier Clippy](https://blog.rust-lang.org/inside-rust/2026/07/06/unite-for-clippy/) cc @samueltardieu @blyxyas changelog: "none"
This comment has been minimized.
This comment has been minimized.
c2aadc5 to
a828969
Compare
A broken link will make the Clippy subtree sync fail in the compiler repo. changelog: none r? @flip1995
This comment was marked as outdated.
This comment was marked as outdated.
a828969 to
9e7db05
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
|
@bors r+ rollup=never p=1 subtree update |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 65bcac4 (parent) -> 1a98b1e (this PR) Test differencesShow 2 test diffs2 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 1a98b1e135b254f209c67d447b6d8bcd56a859e0 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (1a98b1e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 458.664s -> 458.124s (-0.12%) |
r? @samueltardieu
Cargo.lockupdate due to the removal of the rustc-semver dependency.