wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

codegen: Ignore `clippy::drop_non_drop` in generated free fn

Open ijc opened this issue 3 years ago • 0 comments

Depending on the underlying types clippy can warn:

call to std::mem::drop with a value that does not implement Drop. Dropping such a type only extends its contained lifetimes

However such a drop is ultimately harmless and in generated code it's easier to ignore it than to conditionally generate code with/without the drop.

This is an alternative to #2984 and is related to #2858.

ijc avatar Sep 21 '22 10:09 ijc