-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat rust better optimization fix (#5771)
### Description A recent Rust PR tackled a Dafny-to-Rust soundness issue by making all references to self mutable. This had a lot of problematic implications, such as the impossibility to nest function calls, and in the future to have general traits. This PR fixes the soundness issue with another way, to prevent the inlining of a function that otherwise Rust's global analysis might determine is safe to remove when it is not for Dafny. ### How has this been tested? A test that I checked was failing without the `[inline(never)]` annotation now succeeds. Fixes #5774 and I added it as a test case as well. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information
1 parent
5a42b5a
commit 8fa713a
Showing
6 changed files
with
443 additions
and
416 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
Oops, something went wrong.