2 Checks for functions taking arguments by value, where
3 the argument type is `Copy` and large enough to be worth considering
4 passing by reference. Does not trigger if the function is being exported,
5 because that might induce API breakage, if the parameter is declared as mutable,
6 or if the argument is a `self`.
9 Arguments passed by value might result in an unnecessary
10 shallow copy, taking up more space in the stack and requiring a call to
11 `memcpy`, which can be expensive.
15 #[derive(Clone, Copy)]
16 struct TooLarge([u8; 2048]);
18 fn foo(v: TooLarge) {}
23 fn foo(v: &TooLarge) {}