-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #130778
Clippy subtree update #130778
Conversation
When a user explicitly tags a param as unused (yet?), there is no need to raise another lint on it.
…ws a value Fixes rust-lang#12907 changelog: Fix [`needless_return`] false negative when returned expression borrows a value
…times, r=cjgillot Fix `elided_named_lifetimes` in code rust-lang#129207 (comment) r? cjgillot
…ng_sub_expression, r=xFrednet Diverging subexpression lint should not fire on todo!() As per rust-lang#10243 it is not that helpful to point out that a subexpression diverges, so do not fire on todo changelog: [`diverging_sub_expression`]: do not trigger on todo
Clippy subtree update r? `@Manishearth`
…blyxyas Ignore underscore-prefixed args for needless_pass_by_value lint When a user explicitly tags a param as unused (yet?), there is no need to raise another lint on it. fixes rust-lang#7295 Note that I had to rename all `_*` params in the tests, but kept the variable name length to avoid extra changes in the expected output. changelog: [`needless_pass_by_value`]: do not warn if the argument name starts with an `_`
…=dswij Rewrite `empty_line_after_doc_comments` and `empty_line_after_outer_attr`, move them from `nursery` to `suspicious` changelog: [`empty_line_after_doc_comments`], [`empty_line_after_outer_attr`]: rewrite and move them from `nursery` to `suspicious` They now lint when there's a comment between the last attr/doc comment and the empty line, to cover the case: ```rust /// Docs for `old_code // fn old_code() {} fn new_code() {} ``` When these lints or `suspicious_doc_comments` trigger we no longer trigger any other doc lint as a broad fix for rust-lang#12917, reverts some of rust-lang#13002 as the empty line lints cover it I ended up not doing rust-lang/rust-clippy#12917 (comment) as I don't think it's needed
check std::panic::panic_any in panic lint close rust-lang#13292 This PR detects `std::panic::panic_any` in panic lint. changelog: check std::panic::panic_any in panic lint
…ns, r=Manishearth Fix manual_range_patterns case with one element at OR Close rust-lang#11825 As mentioned rust-lang#11825 `OR` can be used for stylistic purposes with one element, we can filter this case from triggering lint changelog: [`manual_range_patterns`]: not trigger when `OR` has only one element
…e_items, r=llogiq Add new lint: `used_underscore_items` Closes rust-lang#13260 --- changelog: new [`used_underscore_items`] lint against using items with a single leading underscore
new lint: `zombie_processes` Closes rust-lang#10754 Lint description should explain this PR, so I think there's nothing else to say here ^^ changelog: new lint: [`zombie_processes`]
Use `is_diagnostic_item` for checking a def_id in `unnecessary_min_or_max`. close rust-lang#13191 This PR fixes the false positives in `unnecessary_min_or_max `. We should use `is_diagnostic_item` for checking def_ids in this lint. ---- changelog: fix false positive in `unnecessary_min_or_max `.
…ature, r=flip1995 Remove `feature=cargo-clippy` argument Roses are red, Violets are blue, Fixme was written, And now it's due --- changelog: **Important Change** Removed the implicit `cargo-clippy` feature set by Clippy as announced here: <https://blog.rust-lang.org/2024/02/28/Clippy-deprecating-feature-cargo-clippy.html> [rust-lang#13246](rust-lang/rust-clippy#13246) Follow-up of: rust-lang/rust-clippy#12292 r? `@flip1995` cc: `@GuillaumeGomez`
…nishearth Clippy subtree update r? `@Manishearth` Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier. It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump. Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
…nishearth Clippy subtree update r? `@Manishearth` Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier. It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump. Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (38352b0): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 3.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 2.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 772.048s -> 771.82s (-0.03%) |
See rust-lang/rust#130778. ``` warning: empty line after doc comment --> test/integration-ebpf/build.rs:16:1 | 16 | / /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies 17 | | | |_ 18 | fn main() { | --------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it error: empty line after doc comment --> aya/src/maps/bloom_filter.rs:34:1 | 34 | / /// ``` 35 | | | |_ ... 38 | pub struct BloomFilter<T, V: Pod> { | --------------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments note: the lint level is defined here --> aya/src/lib.rs:41:5 | 41 | clippy::all, | ^^^^^^^^^^^ = note: `#[deny(clippy::empty_line_after_doc_comments)]` implied by `#[deny(clippy::all)]` = help: if the empty line is unintentional remove it error: empty line after doc comment --> aya/src/maps/lpm_trie.rs:46:1 | 46 | / /// ``` 47 | | | |_ ... 50 | pub struct LpmTrie<T, K, V> { | --------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = help: if the empty line is unintentional remove it warning: empty line after doc comment --> test/integration-test/build.rs:38:1 | 38 | / /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies 39 | | | |_ 40 | fn main() { | --------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it warning: calling `CStr::new` with a byte string literal --> test/integration-test/src/tests/xdp.rs:45:20 | 45 | .from_name(CStr::from_bytes_with_nul(b"lo\0").unwrap()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"lo"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals = note: `#[warn(clippy::manual_c_str_literals)]` on by default ```
See rust-lang/rust#130778. ``` warning: empty line after doc comment --> test/integration-ebpf/build.rs:16:1 | 16 | / /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies 17 | | | |_ 18 | fn main() { | --------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it error: empty line after doc comment --> aya/src/maps/bloom_filter.rs:34:1 | 34 | / /// ``` 35 | | | |_ ... 38 | pub struct BloomFilter<T, V: Pod> { | --------------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments note: the lint level is defined here --> aya/src/lib.rs:41:5 | 41 | clippy::all, | ^^^^^^^^^^^ = note: `#[deny(clippy::empty_line_after_doc_comments)]` implied by `#[deny(clippy::all)]` = help: if the empty line is unintentional remove it error: empty line after doc comment --> aya/src/maps/lpm_trie.rs:46:1 | 46 | / /// ``` 47 | | | |_ ... 50 | pub struct LpmTrie<T, K, V> { | --------------------------- the comment documents this struct | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = help: if the empty line is unintentional remove it warning: empty line after doc comment --> test/integration-test/build.rs:38:1 | 38 | / /// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies 39 | | | |_ 40 | fn main() { | --------- the comment documents this function | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default = help: if the empty line is unintentional remove it warning: calling `CStr::new` with a byte string literal --> test/integration-test/src/tests/xdp.rs:45:20 | 45 | .from_name(CStr::from_bytes_with_nul(b"lo\0").unwrap()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"lo"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals = note: `#[warn(clippy::manual_c_str_literals)]` on by default ```
…nishearth Clippy subtree update r? `@Manishearth` Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier. It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump. Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
r? @Manishearth
Really delayed sync (2 1/2 weeks), because of a
debug_assertion
we hit, and I didn't have the time to investigate earlier.It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump.
Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.