Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali Schneider committed Aug 31, 2020
1 parent 73a3288 commit f9fcbbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clippy_lints/src/panic_in_result.rs
Expand Up @@ -34,12 +34,15 @@ impl<'tcx> LateLintPass<'tcx> for PanicInResult {
fn check_fn(
&mut self,
cx: &LateContext<'tcx>,
_: FnKind<'tcx>,
fn_kind: FnKind<'tcx>,
_: &'tcx hir::FnDecl<'tcx>,
body: &'tcx hir::Body<'tcx>,
span: Span,
hir_id: hir::HirId,
) {
if let FnKind::Closure(_) = fn_kind {
return;
}
if_chain! {
if is_type_diagnostic_item(cx, return_ty(cx, hir_id), sym!(result_type));
then
Expand Down

0 comments on commit f9fcbbe

Please sign in to comment.