-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve our tests to check instances and visitor #51
Merged
Conversation
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
Converting this into draft since it depends on changes from rust-lang/rust#117688. |
r? @ouz-a |
lgtm! |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 17, 2023
…er-errors Misc changes to StableMIR required to Kani use case. First, I wanted to say that I can split this review into multiple if it makes reviewing easier. I bundled them up, since I've been testing them together (See rust-lang/project-stable-mir#51 for the set of more thorough checks). So far, this review includes 3 commits: 1. Add more APIs and fix `Instance::body` - Add more APIs to retrieve information about types. - Add a few more instance resolution options. For the drop shim, we return None if the drop body is empty. Not sure it will be enough. - Make `Instance::body()` return an Option<Body>, since not every instance might have an available body. For example, foreign instances, virtual instances, dependencies. 2. Fix a bug on MIRVisitor - We were not iterating over all local variables due to a typo. 3. Add more SMIR internal impl and callback return value - In cases like Kani, we will invoke the rustc_internal run command directly for now. It would be handly to be able to have a callback that can return a value. - We also need extra methods to convert stable constructs into internal ones, so we can break down the transition into finer grain commits. - For the internal implementation of Region, we're always returning `ReErased` for now.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 17, 2023
Rollup merge of rust-lang#117688 - celinval:smir-kani-reach, r=compiler-errors Misc changes to StableMIR required to Kani use case. First, I wanted to say that I can split this review into multiple if it makes reviewing easier. I bundled them up, since I've been testing them together (See rust-lang/project-stable-mir#51 for the set of more thorough checks). So far, this review includes 3 commits: 1. Add more APIs and fix `Instance::body` - Add more APIs to retrieve information about types. - Add a few more instance resolution options. For the drop shim, we return None if the drop body is empty. Not sure it will be enough. - Make `Instance::body()` return an Option<Body>, since not every instance might have an available body. For example, foreign instances, virtual instances, dependencies. 2. Fix a bug on MIRVisitor - We were not iterating over all local variables due to a typo. 3. Add more SMIR internal impl and callback return value - In cases like Kani, we will invoke the rustc_internal run command directly for now. It would be handly to be able to have a callback that can return a value. - We also need extra methods to convert stable constructs into internal ones, so we can break down the transition into finer grain commits. - For the internal implementation of Region, we're always returning `ReErased` for now.
- Use "`" to print stable mir items
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add new checks to verify instance body and visitor.
Also fix an issue with the rustc script when running with custom toolchain.