@@ -1473,11 +1473,15 @@ pub enum Rvalue<'tcx> {
14731473 WrapUnsafeBinder ( Operand < ' tcx > , Ty < ' tcx > ) ,
14741474
14751475 /// Creates a bitwise copy of the indicated place with the same type (if Mut) or its
1476- /// CoerceShared target type (if Not), and disables the place for writes (and reads, if Mut) for
1477- /// the copy's lifetime. The type is known to be an ADT with exactly one lifetime parameter, and
1478- /// it is known to implement the Reborrow trait (for Mut), and the CoerceShared trait (only if
1479- /// Not). The CoerceShared target type is known to implement Copy and have the same memory
1480- /// layout as the source type.
1476+ /// CoerceShared target type (if Not). The type is known to be an ADT with exactly one lifetime
1477+ /// parameter, and it is known to implement the Reborrow trait (for Mut), and the CoerceShared
1478+ /// trait (only if Not). The CoerceShared target type is known to also have exactly one lifetime
1479+ /// parameter, implement Copy and (currently) have the same memory layout as the source type.
1480+ ///
1481+ /// The borrow checker uses the single lifetime in the source and target types to create a
1482+ /// Covariant outlives-bound between the source and target with the Mutability of the Reborrow.
1483+ /// This makes accessing the source value for writes (and reads if Mut) for the lifetime of the
1484+ /// target value a borrow check error, imitating `&mut T` and `&T`'s reborrowing on user ADTs.
14811485 ///
14821486 /// Future work may add support for multiple lifetimes and changing memory layout as part of
14831487 /// CoerceShared. These may be end up implemented as multiple MIR operations.
0 commit comments