-
Notifications
You must be signed in to change notification settings - Fork 14k
Generalize adjust_from_tcx for Allocation
#124492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @RalfJung (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits: |
|
The diff looks good, thanks!
But please rebase to get rid of the merge commit.
|
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits (since this message was last posted): |
d9104cb to
235770c
Compare
|
Looks good, thanks! |
|
@bors r- |
|
Thanks! |
|
Ah no this will need formatting. |
|
@bors r- |
This comment has been minimized.
This comment has been minimized.
7acd51e to
38181cb
Compare
|
Now it should be good to go. :) |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#124461 (handle the targets that are missing in stage0) - rust-lang#124492 (Generalize `adjust_from_tcx` for `Allocation`) - rust-lang#124588 (Use `ObligationCtxt` in favor of `TraitEngine` in many more places) - rust-lang#124612 (Add support for inputing via stdin with run-make-support) - rust-lang#124613 (Allow fmt to run on rmake.rs test files) - rust-lang#124649 (Fix HorizonOS build broken by rust-lang#124210) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124492 - Strophox:adjust-allocbytes, r=RalfJung Generalize `adjust_from_tcx` for `Allocation` Previously, `adjust_from_tcx` would take an `Allocation` and "adjust allocation from the ones in `tcx` to a custom Machine instance [...]". This PR generalizes this so the Machine instance can also determine the `Bytes` type of the output `Allocation`. r? `@RalfJung`
Adjust Allocation Bytes used by Miri to custom MiriAllocBytes Previously, the `MiriMachine` used `type Bytes = Box<[u8]>` for its allocations. This PR swaps this out for a custom `MiriAllocBytes` type implemented in `alloc_bytes.rs`. This is in anticipation of an extension to Miri's FFI, which will require its allocations to take care of alignment (the methods in `impl AllocBytes for Box<[u8]>` ignore this `_align: Align` argument). Needs rust-lang/rust#124492
Adjust Allocation Bytes used by Miri to custom MiriAllocBytes Previously, the `MiriMachine` used `type Bytes = Box<[u8]>` for its allocations. This PR swaps this out for a custom `MiriAllocBytes` type implemented in `alloc_bytes.rs`. This is in anticipation of an extension to Miri's FFI, which will require its allocations to take care of alignment (the methods in `impl AllocBytes for Box<[u8]>` ignore this `_align: Align` argument). Needs rust-lang#124492
Previously,
adjust_from_tcxwould take anAllocationand "adjust allocation from the ones intcxto a custom Machine instance [...]".This PR generalizes this so the Machine instance can also determine the
Bytestype of the outputAllocation.r? @RalfJung