Rustfmt
This commit is contained in:
parent
3183b44a1e
commit
1fcae03369
287 changed files with 5888 additions and 4608 deletions
|
@ -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`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue