1
Fork 0

Rollup merge of #85415 - LeSeulArtichaut:no-packed-borrow-unsafeck, r=RalfJung

Clean up remnants of BorrowOfPackedField

cc #82525 which removed `BorrowOfPackedField` from unsafety-checking
r? `@RalfJung`
This commit is contained in:
Guillaume Gomez 2021-05-18 14:08:57 +02:00 committed by GitHub
commit f4a0d97def
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 43 deletions

View file

@ -32,7 +32,6 @@ pub enum UnsafetyViolationDetails {
UseOfInlineAssembly,
InitializingTypeWith,
CastOfPointerToInt,
BorrowOfPackedField,
UseOfMutableStatic,
UseOfExternStatic,
DerefOfRawPointer,
@ -64,11 +63,6 @@ impl UnsafetyViolationDetails {
CastOfPointerToInt => {
("cast of pointer to int", "casting pointers to integers in constants")
}
BorrowOfPackedField => (
"borrow of packed field",
"fields of packed structs might be misaligned: dereferencing a misaligned pointer \
or even just creating a misaligned reference is undefined behavior",
),
UseOfMutableStatic => (
"use of mutable static",
"mutable statics can be mutated by multiple threads: aliasing violations or data \