Skip to content
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

Heapster: niche optimization for sums with an uninhabited type #1631

Merged
merged 3 commits into from
Apr 21, 2022

Conversation

eddywestbrook
Copy link
Contributor

This PR fixes the Rust-to-Heapster type translation to handle sum types where one side of the sum is an uninhabited type, which Rust lays out as just the other branch of the sum without the tag. So, for example, the Rust type Result<Infallible,X> is just represented as X, where Infallible is an empty type with no constructors.

Eddy Westbrook added 3 commits April 20, 2022 15:48
…ed out get_out because it produces inline assembly that SAW currently cannot handle; added extract_from_result_infallible example function
…e where one branch is uninhabited to just the other type, without the tag
@eddywestbrook eddywestbrook added the subsystem: heapster Issues specifically related to memory verification using Heapster label Apr 21, 2022
Copy link
Member

@ChrisEPhifer ChrisEPhifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@ChrisEPhifer ChrisEPhifer added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Apr 21, 2022
@mergify mergify bot merged commit 2b0b46b into master Apr 21, 2022
@mergify mergify bot deleted the heapster/more-rust-niche-opt branch April 21, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run subsystem: heapster Issues specifically related to memory verification using Heapster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants