Rollup merge of #106906 - matthiaskrgr:clone, r=Nilstrieb
remove redundant clones
This commit is contained in:
commit
8bd67dd12d
2 changed files with 3 additions and 3 deletions
|
@ -187,9 +187,9 @@ impl<'tcx> LateLintPass<'tcx> for TyTyKind {
|
||||||
},
|
},
|
||||||
None => cx.emit_spanned_lint(USAGE_OF_TY_TYKIND, path.span, TykindDiag),
|
None => cx.emit_spanned_lint(USAGE_OF_TY_TYKIND, path.span, TykindDiag),
|
||||||
}
|
}
|
||||||
} else if !ty.span.from_expansion() && path.segments.len() > 1 && let Some(t) = is_ty_or_ty_ctxt(cx, &path) {
|
} else if !ty.span.from_expansion() && path.segments.len() > 1 && let Some(ty) = is_ty_or_ty_ctxt(cx, &path) {
|
||||||
cx.emit_spanned_lint(USAGE_OF_QUALIFIED_TY, path.span, TyQualified {
|
cx.emit_spanned_lint(USAGE_OF_QUALIFIED_TY, path.span, TyQualified {
|
||||||
ty: t.clone(),
|
ty,
|
||||||
suggestion: path.span,
|
suggestion: path.span,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ impl<'tcx> LateLintPass<'tcx> for PassByValue {
|
||||||
cx.emit_spanned_lint(
|
cx.emit_spanned_lint(
|
||||||
PASS_BY_VALUE,
|
PASS_BY_VALUE,
|
||||||
ty.span,
|
ty.span,
|
||||||
PassByValueDiag { ty: t.clone(), suggestion: ty.span },
|
PassByValueDiag { ty: t, suggestion: ty.span },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue