1
Fork 0

Implement "items do not inherit unsafety" for THIR unsafeck

This commit is contained in:
syvb 2023-07-14 22:06:32 -04:00
parent ad963232d9
commit 2cfe8ed37d
6 changed files with 176 additions and 26 deletions

View file

@ -312,6 +312,8 @@ mir_build_unreachable_pattern = unreachable pattern
.label = unreachable pattern
.catchall_label = matches any value
mir_build_unsafe_not_inherited = items do not inherit unsafety from separate enclosing items
mir_build_unsafe_op_in_unsafe_fn_borrow_of_layout_constrained_field_requires_unsafe =
borrow of layout constrained field with interior mutability is unsafe and requires unsafe block (error E0133)
.note = references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values