Open
Description
Summary
The lint is fired also on code generated by a proc_macro.
Maybe it should not report an unsafe in generated code or if it would be possible to mark the unsafe call in the proc_macro to be safe - though the unsafe block already marks that the writer thought about it and decided that it is safe.
Or for this case: never warn on enums without fields.
Lint Name
unsafe_derive_deserialize
Reproducer
Minimal Example:
#[derive(Clone, Copy, serde::Deserialize, enum_tools::EnumTools)]
#[enum_tools(iter)]
#[repr(usize)]
pub enum Test {
One,
}
Version
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: aarch64-apple-darwin
release: 1.79.0
LLVM version: 18.1.7
Additional Labels
No response