rust-assert-no-alloc icon indicating copy to clipboard operation
rust-assert-no-alloc copied to clipboard

Add option to permit dealloc

Open Marcono1234 opened this issue 2 years ago • 0 comments

Could you please add some kind of option or a separate assert_no_... function to only disallow alloc, but permit dealloc?

For my use case I currently really only care about alloc, and also I have methods which consume self (and then implicitly perform deallocation). It appears PermitDrop cannot be used in that case to call these methods (or I am overlooking some Rust feature), and using permit_alloc for these method calls is not ideal because it prevents checking if those method calls perform any additional allocation.

Marcono1234 avatar Aug 06 '23 17:08 Marcono1234