rust-assert-no-alloc
rust-assert-no-alloc copied to clipboard
Add option to permit dealloc
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.