Skip to content

Commit be38382

Browse files
committed
Do not require that unsafe fields lack drop glue
Instead, we adopt the position that introducing an `unsafe` field itself carries a safety invariant: that if you assign an invariant to that field weaker than what the field's destructor requires, you must ensure that field is in a droppable state in your destructor. See: - rust-lang/rfcs#3458 (comment) - https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/unsafe.20fields.20RFC/near/502113897
1 parent 655937c commit be38382

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/marker.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ impl Copy for ! {}
453453
#[stable(feature = "rust1", since = "1.0.0")]
454454
impl<T: ?Sized> Copy for &T {}
455455

456-
/// Marker trait for the types that are allowed in union fields, unsafe fields,
457-
/// and unsafe binder types.
456+
/// Marker trait for the types that are allowed in union fields and unsafe
457+
/// binder types.
458458
///
459459
/// Implemented for:
460460
/// * `&T`, `&mut T` for all `T`,

0 commit comments

Comments
 (0)