allocator-api2 icon indicating copy to clipboard operation
allocator-api2 copied to clipboard

(no_)global_oom_handling should be a feature

Open remexre opened this issue 1 year ago • 0 comments

It'd be helpful if I could get allocator-api2 to behave as if cfg(no_global_oom_handling) was set, without actually having to switch to nightly, rebuild libcore/liballoc, etc. for it.

I think this might best be done by:

  • Adding an enabled-by-default global_oom_handling feature
  • Switching existing #[cfg(not(no_global_oom_handling))]s to #[cfg(all(not(no_global_oom_handling), feature = "global_oom_handling"))]
  • Maybe adding a pub const somewhere to expose whether the feature ended up being enabled (I want to assert elsewhere that it was not).

remexre avatar Sep 14 '24 19:09 remexre