File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -453,6 +453,23 @@ impl Copy for ! {}
453
453
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
454
454
impl < T : ?Sized > Copy for & T { }
455
455
456
+ /// Marker trait for the types that are allowed in union fields, unsafe fields,
457
+ /// and unsafe binder types.
458
+ ///
459
+ /// Implemented for:
460
+ /// * `&T`, `&mut T` for all `T`,
461
+ /// * `ManuallyDrop<T>` for all `T`,
462
+ /// * tuples and arrays whose elements implement `BikeshedGuaranteedNoDrop`,
463
+ /// * or otherwise, all types that are `Copy`.
464
+ ///
465
+ /// Notably, this doesn't include all trivially-destructible types for semver
466
+ /// reasons.
467
+ ///
468
+ /// Bikeshed name for now.
469
+ #[ unstable( feature = "bikeshed_guaranteed_no_drop" , issue = "none" ) ]
470
+ #[ cfg_attr( not( bootstrap) , lang = "bikeshed_guaranteed_no_drop" ) ]
471
+ pub trait BikeshedGuaranteedNoDrop { }
472
+
456
473
/// Types for which it is safe to share references between threads.
457
474
///
458
475
/// This trait is automatically implemented when the compiler determines
You can’t perform that action at this time.
0 commit comments