-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As discussed in #32838 (comment) and following, instead of *mut pointers, use NonNull for the allocator API. One issue is that older rustc versions, used to bootstrap the compiler, expands #[global_allocator], used in various places including libstd or librustc_[almt]san, to code that uses the Alloc trait, so changes to that trait make bootstrapping fail. Thankfully, it does so through the location of the Alloc trait before 94d1970 so we can use at our advantage by making stage0 expose the old API as alloc::heap::Alloc. At the same time, we change the expansion for #[global_allocator] to use the new trait location under core, which will allow newer versions of rustc to bootstrap stage0 as well, despite the workaround described above.
- Loading branch information
Showing
20 changed files
with
281 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.