Negative Drop impls, Drop auto-trait and ImplicitDrop

There’s previous discussion on the topic. One of the most recent probably

which includes links to more topics, too.


That’s not quite accurate. The trait Drop itself is always explicit when it’s implemented. But types without Drop implementations can have so-called “drop glue”, which can (somewhat) be tested with mem::needs_drop. The situation as it currently stands also means that T: Drop bounds in (generic) Rust code are always useless.

5 Likes