-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in validate_cast_and_convert_metadata (#376)
Previously, `validate_cast_and_convert_metadata` incorrectly assumed that, for slice DSTs, the trailing slice element would always have an alignment at least as large as the outer type's alignment, and so there would never be any padding added after the trailing slice. In this commit, we rewrite `validate_cast_and_convert_metadata` to no longer assume this behavior. While we're here, we add the `test_validate_rust_layout` test, which validates many of our assumptions about Rust's type layout against the standard library to help catch mismatches like this in the future.
- Loading branch information
Showing
7 changed files
with
960 additions
and
204 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
Oops, something went wrong.