|
|
|
|
|
by johncolanduoni
3332 days ago
|
|
I was actually thinking about this precise issue this morning (due to this GitHub issue[1]). I think a valuable middleground would be to include this kind of check even without the ?Leave stuff. In essence, the compiler could just give an error if it would have needed to issue a Drop call anywhere for the type. This ability is pretty useful when dealing with destructors that need context that you don't want to always wrap with the given type (sometimes for performance reasons). [1]: https://github.com/gfx-rs/gfx/issues/1216 |
|