1
Fork 0
This commit is contained in:
bjorn3 2025-02-08 22:12:13 +00:00
parent 3183b44a1e
commit 1fcae03369
287 changed files with 5888 additions and 4608 deletions

View file

@ -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`,