Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #155625 - bushrat011899:core_io_error, r=Mark-Simulacrum
Move `std::io::Error` into `core`
ACP: https://github.com/rust-lang/libs-team/issues/755
Tracking issue: https://github.com/rust-lang/rust/issues/154046
Related: https://github.com/rust-lang/rust/pull/155574
Related: https://github.com/rust-lang/rust/pull/152918
## Description
Moves `std::io::Error` into `core`, deferring `Box`-adjacent methods to incoherent implementations in `alloc`, and `RawOsError` methods to `std`. This requires some substantial changes to the internals of `Error`, but none of them are breaking changes or externally visible.
Notably, I've replaced usage of `Box` with a wrapper around a pointer and an appropriate drop function. This requires the addition of quite a few lines of unsafe, but is required to work around `Box` only being accessible from `alloc`. Additionally, an atomic pointer to a VTable is used for working with `RawOsError` in `core`, since we cannot know the required implementations without `std`.
As mention in [this comment](https://github.com/rust-lang/rust/pull/155625#issuecomment-4744932682), there may be concern around having a static `AtomicPtr` in `core` for certain users. I've added a configuration option `no_io_statics` which (similar to `no_sync`/etc. in `alloc`) can be used to prevent their inclusion in `core`. When active, the fallback default implementation will always be used.
---
## Notes
* This PR adopts the VTable technique from rust-lang/rust#152918
* This PR builds on my previous PR rust-lang/rust#155574
* No AI tooling of any kind was used during the creation of this PR.