-
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 #135297
Clippy subtree update #135297
Conversation
`is_integer_const()` does the const folding.
…sing_errors_doc`
Handle field attributes in suggestions Fix adjacent code Address review comments rust-lang/rust-clippy#13737 (comment) Address all review comments but one This comment is not yet addressed: rust-lang/rust-clippy#13737 (comment) `initializer_suggestions` -> `lint_inconsistent_struct_field_initializers`
`is_integer_const()` does the const folding. changelog: none
fix rust-lang#13843 The `manual_div_ceil` lint makes incorrect suggestion when type suffixes need to be made explicit in the suggested code. changelog: [`manual_div_ceil`]: suggested code now includes appropriate type suffixes where necessary
…lready been resolved (rust-lang#13873) The "known problems" pointed out in the `match_same_arms` lint seem to have already been resolved. changelog: none
…uirement configurable (rust-lang#13737) Fixes rust-lang#11846. This PR has three commits: - The first commit adds an `initializer-suggestions` configuration to control suggestion applicability when initializers are present. The following are the options: - "none": do not suggest - "maybe-incorrect": suggest, but do not apply suggestions with `--fix` - "machine-applicable": suggest and apply suggestions with `--fix` - The second commit fixes suggestions to handle field attributes (problem [noticed by @samueltardieu](rust-lang/rust-clippy#13737 (comment))). - The third commit adds `initializer-suggestions = "machine-applicable"` to Clippy's `clippy.toml` and applies the suggestions. (Nothing seems to break.) --- changelog: make `inconsistent_struct_constructor` "all fields are shorthand" requirement configurable
changelog: none
…ntinue`, recursively fixes: rust-lang#4077
Convert the ICE reported in rust-lang#12979 into a false negative. We prefer a false negative to a ICE (because the ICE could still affect the user even when not activating the lint).
Close rust-lang#13837 changelog: [`trailing_empty_array`]: do not trigger on tests
Examples fixes for regex changelog: none
…ang#13863) Fixes rust-lang#13862 `missing_headers::check` is sometimes called from outside of a body (specifically, from `check_attributes`, where the LateContext's ParamEnv is not yet properly initialized for that item). Using that empty ParamEnv for trait solving things from within the body can then lead to various ICEs, like the linked issue where we have a const generic parameter `DMA_INST` without a `ConstArgHasType` bound in the ParamEnv so the const parameter has no type, which is normally not supposed to happen. We have the item's DefId so we can just get its ParamEnv/TypingEnv from there, and using that one for trait solving should be safe. changelog: none
Also, simplify boolean expression, and ensure that proper applicability is used.
This PR just makes sure that we exit the function before getting an ICE and adds a regression test. Related to rust-lang#12979. We would need to keep researching the issue, but as the ICEing code isn't that complicated, getting a hotfix into nightly is urgent. changelog:[`borrow_interior_mutable_const`] Fix ICE rust-lang#12979
…t-lang#13884) Also, simplify boolean shortcut expression, and ensure that applicability is properly applied, as it was ignored and `MachineApplicable` was always used. changelog: [`borrow_as_ptr`]: do not remove required parentheses in autofix suggestion Close rust-lang#13882
Removing `.map(identity)` may result in invalid code if the receiver of `map()` is an immutable binding, and the result of `map()` is used as the receiver of a method call expecting a mutable reference.
Using `lifetime.ident.name` in suggestions will not output the raw modifier. For example, `'r#struct` will be rendered as `'struct` which would be incorrect.
I discovered that there were paths declared in `clippy_utils::paths` in rust-lang/rust-clippy#13829 so moving a few remaining hardcoded ones in one place. changelog: Move more def paths into `clippy_utils::paths` r? @y21
…ust-lang#13906) Proper parentheses need to be added to some expressions in receiver position. Fix rust-lang#13902 changelog: [`redundant_pattern_matching`]: use proper parentheses when suggesting replacing `matches!(…, None)` by `.is_none()`
Using `lifetime.ident.name` in suggestions will not output the raw modifier. For example, `'r#struct` will be rendered as `'struct` which would be incorrect. Fix rust-lang#13899 changelog: [`needless_arbitrary_self_type`]: use the raw lifetime name in suggestions
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 |
Cargo.lock update is for bumping the Clippy version. |
@bors r+ p=5 |
…tthiaskrgr Clippy subtree update r? `@Manishearth`
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
I guess bors doesn't respond to treeclosed on closed PRs so stealing this one @bors treeclosed- |
☀️ Test successful - checks-actions |
Finished benchmarking commit (88ab2d8): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (secondary -0.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.
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: 763.867s -> 762.519s (-0.18%) |
r? @Manishearth