@@ -125,6 +125,16 @@ mir_build_initializing_type_with_requires_unsafe_unsafe_op_in_unsafe_fn_allowed
125
125
.note = initializing a layout restricted type's field with a value outside the valid range is undefined behavior
126
126
.label = initializing type with `rustc_layout_scalar_valid_range` attr
127
127
128
+ mir_build_initializing_type_with_unsafe_field_requires_unsafe =
129
+ initializing type with an unsafe field is unsafe and requires unsafe block
130
+ .note = unsafe fields may carry library invariants
131
+ .label = initialization of struct with unsafe field
132
+
133
+ mir_build_initializing_type_with_unsafe_field_requires_unsafe_unsafe_op_in_unsafe_fn_allowed =
134
+ initializing type with an unsafe field is unsafe and requires unsafe block
135
+ .note = unsafe fields may carry library invariants
136
+ .label = initialization of struct with unsafe field
137
+
128
138
mir_build_inline_assembly_requires_unsafe =
129
139
use of inline assembly is unsafe and requires unsafe block
130
140
.note = inline assembly is entirely unchecked and can cause undefined behavior
@@ -340,6 +350,16 @@ mir_build_unreachable_pattern = unreachable pattern
340
350
.unreachable_covered_by_many = multiple earlier patterns match some of the same values
341
351
.suggestion = remove the match arm
342
352
353
+ mir_build_unsafe_field_requires_unsafe =
354
+ use of unsafe field is unsafe and requires unsafe block
355
+ .note = unsafe fields may carry library invariants
356
+ .label = use of unsafe field
357
+
358
+ mir_build_unsafe_field_requires_unsafe_unsafe_op_in_unsafe_fn_allowed =
359
+ use of unsafe field is unsafe and requires unsafe block
360
+ .note = unsafe fields may carry library invariants
361
+ .label = use of unsafe field
362
+
343
363
mir_build_unsafe_fn_safe_body = an unsafe function restricts its caller, but its body is safe by default
344
364
mir_build_unsafe_not_inherited = items do not inherit unsafety from separate enclosing items
345
365
@@ -388,6 +408,11 @@ mir_build_unsafe_op_in_unsafe_fn_initializing_type_with_requires_unsafe =
388
408
.note = initializing a layout restricted type's field with a value outside the valid range is undefined behavior
389
409
.label = initializing type with `rustc_layout_scalar_valid_range` attr
390
410
411
+ mir_build_unsafe_op_in_unsafe_fn_initializing_type_with_unsafe_field_requires_unsafe =
412
+ initializing type with an unsafe field is unsafe and requires unsafe block
413
+ .note = unsafe fields may carry library invariants
414
+ .label = initialization of struct with unsafe field
415
+
391
416
mir_build_unsafe_op_in_unsafe_fn_inline_assembly_requires_unsafe =
392
417
use of inline assembly is unsafe and requires unsafe block
393
418
.note = inline assembly is entirely unchecked and can cause undefined behavior
@@ -408,6 +433,11 @@ mir_build_unsafe_op_in_unsafe_fn_union_field_requires_unsafe =
408
433
.note = the field may not be properly initialized: using uninitialized data will cause undefined behavior
409
434
.label = access to union field
410
435
436
+ mir_build_unsafe_op_in_unsafe_fn_unsafe_field_requires_unsafe =
437
+ use of unsafe field is unsafe and requires unsafe block
438
+ .note = unsafe fields may carry library invariants
439
+ .label = use of unsafe field
440
+
411
441
mir_build_unsized_pattern = cannot use unsized non-slice type `{ $non_sm_ty } ` in constant patterns
412
442
413
443
mir_build_unused_unsafe = unnecessary `unsafe` block
0 commit comments