Skip to content

Commit

Permalink
Update clippy_lints/src/functions.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
  • Loading branch information
llogiq and ebroto authored Oct 11, 2020
1 parent cd8575e commit 4ee95ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ fn check_result_unit_err(cx: &LateContext<'_>, decl: &hir::FnDecl<'_>, item_span
}
if let hir::FnRetTy::Return(ref ty) = decl.output {
if let hir::TyKind::Path(ref qpath) = ty.kind {
if match_qpath(qpath, &crate::utils::paths::RESULT) {
if is_type_diagnostic_item(cx, hir_ty_to_ty(cx.tcx, ty), sym!(result_type)) {
if let Some(ref args) = last_path_segment(qpath).args {
if args.args.len() == 2 {
if let hir::GenericArg::Type(ref err_ty) = args.args[1] {
Expand Down

0 comments on commit 4ee95ed

Please sign in to comment.