-
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
Update Clippy #108974
Update Clippy #108974
Conversation
(This is a large commit. The changes to `compiler/rustc_middle/src/ty/context.rs` are the most important ones.) The current naming scheme is a mess, with a mix of `_intern_`, `intern_` and `mk_` prefixes, with little consistency. In particular, in many cases it's easy to use an iterator interner when a (preferable) slice interner is available. The guiding principles of the new naming system: - No `_intern_` prefixes. - The `intern_` prefix is for internal operations. - The `mk_` prefix is for external operations. - For cases where there is a slice interner and an iterator interner, the former is `mk_foo` and the latter is `mk_foo_from_iter`. Also, `slice_interners!` and `direct_interners!` can now be `pub` or non-`pub`, which helps enforce the internal/external operations division. It's not perfect, but I think it's a clear improvement. The following lists show everything that was renamed. slice_interners - const_list - mk_const_list -> mk_const_list_from_iter - intern_const_list -> mk_const_list - substs - mk_substs -> mk_substs_from_iter - intern_substs -> mk_substs - check_substs -> check_and_mk_substs (this is a weird one) - canonical_var_infos - intern_canonical_var_infos -> mk_canonical_var_infos - poly_existential_predicates - mk_poly_existential_predicates -> mk_poly_existential_predicates_from_iter - intern_poly_existential_predicates -> mk_poly_existential_predicates - _intern_poly_existential_predicates -> intern_poly_existential_predicates - predicates - mk_predicates -> mk_predicates_from_iter - intern_predicates -> mk_predicates - _intern_predicates -> intern_predicates - projs - intern_projs -> mk_projs - place_elems - mk_place_elems -> mk_place_elems_from_iter - intern_place_elems -> mk_place_elems - bound_variable_kinds - mk_bound_variable_kinds -> mk_bound_variable_kinds_from_iter - intern_bound_variable_kinds -> mk_bound_variable_kinds direct_interners - region - intern_region (unchanged) - const - mk_const_internal -> intern_const - const_allocation - intern_const_alloc -> mk_const_alloc - layout - intern_layout -> mk_layout - adt_def - intern_adt_def -> mk_adt_def_from_data (unusual case, hard to avoid) - alloc_adt_def(!) -> mk_adt_def - external_constraints - intern_external_constraints -> mk_external_constraints Other - type_list - mk_type_list -> mk_type_list_from_iter - intern_type_list -> mk_type_list - tup - mk_tup -> mk_tup_from_iter - intern_tup -> mk_tup
Do not suggest using Self in const generic parameters Fixes rust-lang#10371 changelog: FP: [`use_self`]: do not suggest using `Self` in const generic parameters
…rcho chore: remove unneeded rustfmt skip --- The associated rustfmt bug that originally necessitated these skips was resolved a while back, so these are no longer necessary changelog: none
It was probably a leftover from the old `?` desugaring but anyways, it's unused now except for clippy, which can just use a diagnostics item.
…as From˂˂LangItemFromFn˃˃˃꞉꞉from, r=cjgillot Remove `from` lang item It was probably a leftover from the old `?` desugaring but anyways, it's unused now except for clippy, which can just use a diagnostics item.
Update Clippy Seems like `@flip1995` so this is a couple days late. r? `@Manishearth`
…r=Alexendoo exit lint: potentualy -> potentially changelog: none
Do not suggest to derive `Default` on generics with implicit arguments Fixes rust-lang#10396 changelog: FP: [`derivable_impls`]: do not suggest to derive `Default` on generics with implicit arguments
Fixing typos changelog: none
…p1995 Fix array-size-threshold config deserialization error changelog: Fix error when providing an `array-size-threshold` in `clippy.toml` Not entirely sure why it doesn't want to deserialize a u128, but converting it after the fact is an easy enough fix Fixes rust-lang#10422
Fix ICE in `multiple_unsafe_ops_per_block` fixes rust-lang#10367 changelog: [`multiple_unsafe_ops_per_block`]: Fix ICE when calling a function-like object in an unsafe block
Run dogfood to completion Run dogfood on all packages before failing the test. Failing early is painful on lints which trigger on multiple crates. changelog: None
…cs, r=dswij Scope `missing_docs_in_private_items` to only private items `missing_docs_in_private_items` currently detects missing docs for public items as well as private. Since `missing_docs`already covers public items, this PR updates `missing_docs_in_private_items` to only cover private items. Fixes rust-lang#1895 changelog: [`missing_docs_in_private_items`]: Apply lint only to private items (used to be public and private)
Two small documentation improvements The `wrong_self_convention` changes are for grammar and accuracy. The `must_use_candidate` change is because that lint flags only exported functions: /~https://github.com/rust-lang/rust-clippy/blob/8b65632b6ef737979d42f83664271d6baa8c0270/clippy_lints/src/functions/must_use.rs#L27-L31 changelog: `wrong_self_convention` and `must_use_candidate` documentation improvements
[arithmetic_side_effects] Fix rust-lang#10252 Fix rust-lang#10252 At least for integers, shifts are already handled by the compiler. ---- changelog: [`arithmetic_side_effects`]: No longer lints on right or left shifts with constant integers, as the compiler warns about them. [rust-lang#10309](rust-lang/rust-clippy#10309) <!-- changelog_checked-->
Add `let_with_type_underscore` lint Fixes rust-lang#10463 changelog: [`let_with_type_underscore`]: Add the lint.
…k, r=llogiq lintcheck: use multithreading unless --fix or --recursive is used Use multithreading unless there is a reason not to. changelog: none
Include async functions in the len_without_is_empty fixes rust-lang#7232 Changes done to the functionality: Allowing different error types for the functions was disallowed. So the following was linted before but is not after this change ``` impl Foo { pub len(&self) -> Result<usize, Error1> { todo!(); } pub is_empty(&self) -> Result<bool, Error2> { todo!(); } } ``` --- changelog: Enhancement: [`len_without_is_empty`]: Now also detects `async` functions [rust-lang#10359](rust-lang/rust-clippy#10359) <!-- changelog_checked -->
…ed, r=flip1995 Mark Rust 1.68.0 as release in the changelog Roses are red, this poem is dead, my creativity is lost, outside there is frost? Maybe I should really stop including a "roses are red" with every changelog PR. These are getting worse every time... --- changelog: none <!-- changelog_checked -->
Rustup r? `@ghost` changelog: none
Migrate `write.rs` to `rustc_ast::FormatArgs` changelog: none Part 1 of rust-lang#10233 The additions to `clippy_utils` are the main novelty of this PR, there's no removals yet since other parts still rely on `FormatArgsExpn` The changes to `write.rs` itself are relatively straightforward this time around, as there's no lints in it that rely on type checking format params r? `@flip1995`
These commits modify the If this was intentional then you can ignore this comment. Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@bors r+ p=1 rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ff4b772): 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. |
Update Clippy r? `@Manishearth` cc `@m-ou-se` This sync also includes rust-lang/rust-clippy#10275
r? @Manishearth
cc @m-ou-se This sync also includes rust-lang/rust-clippy#10275