Propagate errors rather than using return_if_err
This commit is contained in:
parent
db193c1c9d
commit
e65cefcf6f
11 changed files with 17 additions and 13 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#![feature(never_type)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(unwrap_infallible)]
|
||||
#![recursion_limit = "512"]
|
||||
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
|
||||
#![allow(
|
||||
|
|
|
|||
|
|
@ -830,7 +830,9 @@ pub fn deref_closure_args(cx: &LateContext<'_>, closure: &hir::Expr<'_>) -> Opti
|
|||
applicability: Applicability::MachineApplicable,
|
||||
};
|
||||
|
||||
ExprUseVisitor::for_clippy(cx, def_id, &mut visitor).consume_body(closure_body);
|
||||
ExprUseVisitor::for_clippy(cx, def_id, &mut visitor)
|
||||
.consume_body(closure_body)
|
||||
.into_ok();
|
||||
|
||||
if !visitor.suggestion_start.is_empty() {
|
||||
return Some(DerefClosure {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ pub fn mutated_variables<'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) ->
|
|||
expr.hir_id.owner.def_id,
|
||||
&mut delegate,
|
||||
)
|
||||
.walk_expr(expr);
|
||||
.walk_expr(expr)
|
||||
.into_ok();
|
||||
|
||||
if delegate.skip {
|
||||
return None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue