Open
Description
openedon Apr 9, 2016
Currently, following ptr_arg
can lead to errors, if
- the function is used as a
Fn
reference (fn foo(&Vec<u8>) { .. }; let foo : Fn(&Vec<u8>) = foo
) - the function calls another function that expects a
&Vec
reference.
We could extend the lint to
- check the whole crate if the function is referenced anywhere (we obviously cannot check across crate boundaries, but I guess, that'll be OK.
- look into the function and check the signatures of the contained calls; if those are only functions within the crate, note if those are eligible for
ptr_arg
, otherwise don't lint. We should also bail on out-of-crate functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment