mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-04 18:40:18 +00:00
fixed bug
This commit is contained in:
parent
73a3288282
commit
f9fcbbea03
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue