mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
parent
4d9ed8beef
commit
b4ea47d23e
1 changed files with 5 additions and 0 deletions
|
@ -121,6 +121,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
|
|||
.zip(&body.arguments)
|
||||
.enumerate()
|
||||
{
|
||||
// All spans generated from a proc-macro invocation are the same...
|
||||
if span == input.span {
|
||||
return;
|
||||
}
|
||||
|
||||
// * Exclude a type that is specifically bounded by `Borrow`.
|
||||
// * Exclude a type whose reference also fulfills its bound.
|
||||
// (e.g. `std::convert::AsRef`, `serde::Serialize`)
|
||||
|
|
Loading…
Add table
Reference in a new issue