-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analyze: discard rewrites on bounds checking code (#1177)
This branch adds logic for identifying the bounds-checking code that rustc automatically inserts around array and slice accesses and for discarding rewrites that would normally be generated for that code. Trying to rewrite this code is pointless because the code is derived automatically from other parts of the function, and it can trigger errors due to the rewriter not having a distinct place in the source code where it can apply the rewrites. In the future, we could potentially extend this to skip rewrites on overflow assertions as well.
- Loading branch information
Showing
3 changed files
with
175 additions
and
36 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