This is only called from
check_unsafety in the same file it is declared, so this should not be necessary for the compile graph.
check_unsafety is only called during analysis https://github.com/rust-lang/rust/blob/7faeae0d385730e712634fb2af331ea0140771b4/src/librustc_interface/passes.rs#L839-L843
THis means that
check_unsafety should only be called exactly once for each body. As
unsafe_derive_on_repr_packed is only called using this body id, it should both be faster and "cleaner" to use a boolean in
check_unsafetyitself to prevent duplicates if I am not missing something
Will just try and implement this myself :sparkles: Let's see if this breaks something
if I am not missing something
Aaaa, we want to warn once for each impl, not once for each method. There are builtin impls containing multiple methods.