-
Notifications
You must be signed in to change notification settings - Fork 12.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::complexity fixes #118885
clippy::complexity fixes #118885
Conversation
filter_map_identity needless_bool search_is_some unit_arg map_identity needless_question_mark derivable_impls
(rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
@bors r+ rollup |
@@ -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())?) |
There was a problem hiding this comment.
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 :/
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(deleted, misread 😅
…r-errors clippy::complexity fixes filter_map_identity needless_bool search_is_some unit_arg map_identity needless_question_mark derivable_impls
…r-errors clippy::complexity fixes filter_map_identity needless_bool search_is_some unit_arg map_identity needless_question_mark derivable_impls
…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
…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
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
filter_map_identity
needless_bool
search_is_some
unit_arg
map_identity
needless_question_mark
derivable_impls