-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #8632 - Jarcho:cast_ptr_alignment, r=llogiq
Don't lint `cast_ptr_alignment` when used for unaligned reads and writes fixes #2881 Ideally this would trace the usage of the value rather than only looking at the parent expression, but that would require dataflow analysis. e.g. ```rust let x = ptr as *const u16; c.read_unaligned(x); ``` Arch specific intrinsic functions need to be checked for ones which could take an unaligned pointer. This can be another PR. changelog: Don't lint `cast_ptr_alignment` when used for unaligned reads and writes
- Loading branch information
Showing
4 changed files
with
86 additions
and
38 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
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