-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Clippy subtree update #145056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clippy subtree update #145056
Conversation
When I first tried contributing to clippy, I encountered the problem that a lot of lint suggestions overlapped with existing lints, so I would spend a bunch of time implementing something only to figure out it wasn't actually needed. The "comparison with existing lints" field should hopefully reduce this somewhat, while not incresing the burden of requesting a new lint too much due to not being mandatory.
Co-authored-by: Philipp Krones <[email protected]>
changelog: none
changelog: [`ip_constant`]: fix suggestion when call is inside parentheses like `(Ipv4Addr::new(127, 0, 0, 1))` Very similar to the fix in rust-lang/rust-clippy#15191
Signed-off-by: Jonathan Brouwer <[email protected]>
Fix `duplicated_attributes` lint to detect prefixed attributes like `clippy::lint_name`. Fixes rust-lang/rust-clippy#14942 changelog: [`duplicated_attributes`]: detect duplicated prefixed attributes
…lang#15355) Closes rust-lang/rust-clippy#15349 changelog: [`empty_structs_with_brackets`] fix wrong suggestions on generics
rust-lang#15345) …rom a macro changelog: [`unnecessary_map_or`]: don't add parens if the parent expr comes from a macro fixes rust-lang/rust-clippy#14714
) Closes rust-lang/rust-clippy#15061 changelog: [`let_unit_value`] fix wrong suggestions for format macros
Follow-up of rust-lang/rust-clippy#15208. This PR removes the CSS `bootstrap` dependency which contains 1504 CSS rules and weights 16.1 kB minified. Considering we used less than 50 of these rules, it's quite a waste. So this time, there are minor UI changes: * The "expand/collapse all" buttons icon changed. It now uses the one from font-awesome. It's quite close but not exactly the same. * The layout is slightly different (you need to switch between two tabs to actually see the difference). Before this PR: <img width="719" height="515" alt="image" src="https://github.com/user-attachments/assets/1f067046-4ee9-49ee-bf38-50a8bf9888f2" /> With this PR: <img width="719" height="515" alt="image" src="https://github.com/user-attachments/assets/80331c98-1a1e-418f-b481-5b3f5c276926" /> With this, we will be able to go even further on reducing the page size next. =D This time, the DOM size itself reduced a bit but the difference is too small to be noteworthy. r? @samueltardieu changelog: Remove CSS bootstrap dependency
This limits repeated lookups in pre-checks (to determine if a MSRV should be checked), especially when those require locking up an interner: - The `core` crate is looked up once when creating the lint, instead of comparing the crate name with `sym::core` at every check. - `span.ctxt().outer_expn_data()` is lookup up only once. changelog: none r? blyxyas
Two optimizations have been done when checking for the context in which to apply the lint: - Checking for the mere presence of comments does not require building a `String` with the comment to then check if it is empty and discard it. - Checking for the presence of comment can be done after we have checked that we do have a `if` construct that we intend to lint instead of for every expression.
Two optimizations have been done when checking for the context in which to apply the lint: - Checking for the mere presence of comments does not require building a `String` with the comment to then check if it is empty and discard it. - Checking for the presence of comment can be done after we have checked that we do have a `if` construct that we intend to lint instead of for every expression. changelog: none r? blyxyas
Small typo I found while looking at recent lint requests/issues. changelog: none
r? @ghost changelog: none
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment was marked as off-topic.
This comment was marked as off-topic.
@bors r+ p=1 rollup=never thanks! |
☀️ Test successful - checks-actions |
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 321a89b (parent) -> 2fd855f (this PR) Test differencesShow 4 test diffs4 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 2fd855fbfc8239285aa2d596f76a8cc75e17ce02 --output-dir test-dashboard And 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 (2fd855f): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -3.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 464.69s -> 465.394s (0.15%) |
r? @Manishearth
Cargo.lock update due to clippy version bump