Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: make InPlaceInit available even without alloc feature
The only dependency of the InPlaceInit trait on the allocator API is the AllocError type. Replace it with Infallible instead, i.e. allow any error as long as it has an "impl From<Infallible> for MyError" - which can have a trivial implementation as seen in examples/rror.rs. While admittedly of limited usefulness due to orphan rules, this is a first step towards allowing usage of pinned_init entirely without the allocator API, and therefore on stable Rust. Signed-off-by: Paolo Bonzini <[email protected]>
- Loading branch information