Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ncMN committed Mar 31, 2022
1 parent 9de8758 commit 7eee09b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions clippy_lints/src/methods/err_expect.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
use super::ERR_EXPECT;
use clippy_utils::{meets_msrv, msrvs, ty::is_type_diagnostic_item};
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::ty::implements_trait;
use clippy_utils::{meets_msrv, msrvs, ty::is_type_diagnostic_item};
use rustc_errors::Applicability;
use rustc_lint::LateContext;
use rustc_middle::ty;
use rustc_middle::ty::Ty;
use rustc_semver::RustcVersion;
use rustc_span::{Span, sym};
use rustc_span::{sym, Span};

pub(super) fn check(cx: &LateContext<'_>, _expr: &rustc_hir::Expr<'_>, recv: &rustc_hir::Expr<'_>, msrv: Option<&RustcVersion>, span: Span) {
pub(super) fn check(
cx: &LateContext<'_>,
_expr: &rustc_hir::Expr<'_>,
recv: &rustc_hir::Expr<'_>,
msrv: Option<&RustcVersion>,
span: Span,
) {
if_chain! {
if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(recv), sym::Result);
if meets_msrv(msrv, &msrvs::EXPECT_ERR);
Expand Down

0 comments on commit 7eee09b

Please sign in to comment.