mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
fixed bug
This commit is contained in:
parent
73a3288282
commit
f9fcbbea03
@ -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 New Issue
Block a user