-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 #116139
Clippy subtree update #116139
Conversation
Also stabilizes saturating_int_assign_impl, rust-langgh-92354. And also make pub fns const where the underlying saturating_* fns became const in the meantime since the Saturating type was created.
…riddle,Manishearth,flip1995 Reuse rustdoc's doc comment handling in Clippy Moves `source_span_for_markdown_range` and `span_of_attrs` (renamed to `span_of_fragments`) to `rustc_resolve::rustdoc` so it can be used in Clippy Fixes rust-lang/rust-clippy#10277 Fixes rust-lang/rust-clippy#5593 Fixes rust-lang/rust-clippy#10263 Fixes rust-lang/rust-clippy#2581
new unnecessary_map_on_constructor lint changelog: [`unnecessary_map_on_constructor`]: adds lint for cases in which map is not necessary. `Some(4).map(myfunction)` => `Some(myfunction(4))` Closes rust-lang/rust-clippy#6472 Note that the case mentioned in the issue `Some(..).and_then(|..| Some(..))` is fixed by a chain of lint changes. This PR completes the last part of that chain. By `bind_instead_of_map`[lint](https://rust-lang.github.io/rust-clippy/master/index.html#/bind_instead_of_map): `Some(4).and_then(|x| Some(foo(4)))` => `Some(4).map(|x| foo)` By `redundant_closure` [lint](https://rust-lang.github.io/rust-clippy/master/index.html#/redundant_closure): `Some(4).map(|x| foo)` => `Some(4).map(fun)` Finally by this PR `unnecessary_map_on_constructor`: `Some(4).map(fun)` => `Some(fun(4))` I'm not sure this is the desired behavior for clippy and if it should be addressed in another issue/PR. I'd be up to give it a try if that's the case.
…=dswij Ignore span's parents in `collect_ast_format_args`/`find_format_args` Fixes rust-lang#11470, covers some cases missed by rust-lang#10980 Can't have a test yet because of rust-lang#11126 but it works locally changelog: none r? `@dswij`
It is the last thing depending on syn 1.0 in clippy
Update Clippy r? `@Manishearth`
[`len_without_is_empty`]: follow type alias to find inherent `is_empty` method Fixes rust-lang#11165 When we see an `impl B` and `B` is a type alias to some type `A`, then we need to follow the type alias to look for an `is_empty` method on the aliased type `A`. Before this PR, it'd get the inherent impls of `B`, which there aren't any and so it would warn that there isn't an `is_empty` method even if there was one. Passing the type alias `DefId` to `TyCtxt::type_of` gives us the aliased `DefId` (or simply return the type itself if it wasn't a type alias) so we can just use that changelog: [`len_without_is_empty`]: follow type alias to find inherent `is_empty` method
Remove `derive_new` test dependency It is the last thing depending on syn 1.0 in clippy changelog: none
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
…-obk treat host effect params as erased in codegen This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`. r? `@oli-obk`
…affleLapkin Add a way to decouple the implementation and the declaration of a TyCtxt method. properly addresses rust-lang#115819 accepted MCP: rust-lang/compiler-team#395
Add missing tests for configuration options I noticed that a lot of lints didn't have test(s) for their configuration. This leads to issues like rust-lang#11481 where the lint just does nothing with it. This PR adds tests for *almost*[^1] all of the lints with a configuration that didn't have a test in ui-toml. The tests that I wrote here are usually two cases: one for where it's right above or under the limit set by the config where it shouldn't lint and another one for right above where it should. changelog: none [^1]: allow-one-hash-in-raw-strings is ignored by needless_raw_string_hashes
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
… r=y21 prevent ice when threshold is 0 and enum has no variants changelog: [`enum_variant_names`]: prevent ice when threshold is 0 and enum has no variants r? `@y21` Fixes the same ice issue raised during review of rust-lang/rust-clippy#11496
Rustup 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 |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d23062b): 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)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 632.394s -> 631.717s (-0.11%) |
r? @Manishearth