diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-08 22:12:13 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-08 22:12:13 +0000 |
| commit | 1fcae03369abb4c2cc180cd5a49e1f4440a81300 (patch) | |
| tree | fe705ff77c286f5fc4c09acc98d2f124086d0479 /compiler/rustc_lint/src/noop_method_call.rs | |
| parent | 3183b44a1ec209b06e0c26cbc92217176b59dc76 (diff) | |
| download | rust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.tar.gz rust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.zip | |
Rustfmt
Diffstat (limited to 'compiler/rustc_lint/src/noop_method_call.rs')
| -rw-r--r-- | compiler/rustc_lint/src/noop_method_call.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/compiler/rustc_lint/src/noop_method_call.rs b/compiler/rustc_lint/src/noop_method_call.rs index 790ef910b04..b7835e6c36a 100644 --- a/compiler/rustc_lint/src/noop_method_call.rs +++ b/compiler/rustc_lint/src/noop_method_call.rs @@ -128,13 +128,17 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall { ty::Adt(def, _) => Some(cx.tcx.def_span(def.did()).shrink_to_lo()), _ => None, }; - cx.emit_span_lint(NOOP_METHOD_CALL, span, NoopMethodCallDiag { - method: call.ident, - orig_ty, - trait_, - label: span, - suggest_derive, - }); + cx.emit_span_lint( + NOOP_METHOD_CALL, + span, + NoopMethodCallDiag { + method: call.ident, + orig_ty, + trait_, + label: span, + suggest_derive, + }, + ); } else { match name { // If `type_of(x) == T` and `x.borrow()` is used to get `&T`, |
