Skip to content
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::complexity fixes #118885

Merged
merged 1 commit into from
Dec 13, 2023
Merged

clippy::complexity fixes #118885

merged 1 commit into from
Dec 13, 2023

Conversation

matthiaskrgr
Copy link
Member

filter_map_identity
needless_bool
search_is_some
unit_arg
map_identity
needless_question_mark
derivable_impls

 filter_map_identity
 needless_bool
 search_is_some
 unit_arg
 map_identity
 needless_question_mark
 derivable_impls
@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 12, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 12, 2023

📌 Commit d707461 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2023
@@ -21,7 +21,7 @@ pub trait ValueVisitor<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>>: Sized {
/// `read_discriminant` can be hooked for better error messages.
#[inline(always)]
fn read_discriminant(&mut self, v: &Self::V) -> InterpResult<'tcx, VariantIdx> {
Ok(self.ecx().read_discriminant(&v.to_op(self.ecx())?)?)
self.ecx().read_discriminant(&v.to_op(self.ecx())?)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually prefer consistently putting in the ? and Ok-wrapping... but I guess it's futile to fight against clippy lints :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in this case, the ())?)?) is pretty hard to read

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(deleted, misread 😅

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 12, 2023
…r-errors

clippy::complexity fixes

 filter_map_identity
 needless_bool
 search_is_some
 unit_arg
 map_identity
 needless_question_mark
 derivable_impls
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 12, 2023
…r-errors

clippy::complexity fixes

 filter_map_identity
 needless_bool
 search_is_some
 unit_arg
 map_identity
 needless_question_mark
 derivable_impls
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 12, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#117050 ([`RFC 3086`] Attempt to try to resolve blocking concerns  )
 - rust-lang#118500 (Move some methods from `tcx.hir()` to `tcx`)
 - rust-lang#118871 (Coroutine variant fields can be uninitialized)
 - rust-lang#118872 (Add rustX check to codeblock attributes lint)
 - rust-lang#118884 (NFC: simplify merging of two vecs)
 - rust-lang#118885 (clippy::complexity fixes)
 - rust-lang#118886 (Clean up variables in `search.js`)
 - rust-lang#118887 (Typo)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2023
…kingjubilee

Rollup of 10 pull requests

Successful merges:

 - rust-lang#118858 (Remove dead codes in core)
 - rust-lang#118864 (Fix alignment passed down to LLVM for simd_masked_load)
 - rust-lang#118872 (Add rustX check to codeblock attributes lint)
 - rust-lang#118873 (fix `waker_getters` tracking issue number)
 - rust-lang#118884 (NFC: simplify merging of two vecs)
 - rust-lang#118885 (clippy::complexity fixes)
 - rust-lang#118886 (Clean up variables in `search.js`)
 - rust-lang#118887 (Typo)
 - rust-lang#118889 (more clippy::complexity fixes)
 - rust-lang#118891 (Actually parse async gen blocks correctly)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5308733 into rust-lang:master Dec 13, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 13, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2023
Rollup merge of rust-lang#118885 - matthiaskrgr:compl_2023, r=compiler-errors

clippy::complexity fixes

 filter_map_identity
 needless_bool
 search_is_some
 unit_arg
 map_identity
 needless_question_mark
 derivable_impls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants