@@ -157,8 +157,9 @@ public struct ${Self}<Pointee>
157
157
158
158
/// Accesses the `Pointee` instance referenced by `self`.
159
159
///
160
- /// - Precondition: the pointee has been initialized with an instance of
161
- /// type `Pointee`.
160
+ /// - Precondition: Either the pointee has been initialized with an
161
+ /// instance of type `Pointee`, or `pointee` is being assigned to
162
+ /// and `Pointee` is a trivial type.
162
163
public var pointee: Pointee {
163
164
% if mutable:
164
165
@_transparent unsafeAddress {
@@ -212,8 +213,11 @@ public struct ${Self}<Pointee>
212
213
///
213
214
/// - Precondition: `count >= 0`
214
215
///
215
- /// - Precondition: The `Pointee`s at `self..<self + count` and
216
- /// `source..<source + count` are initialized.
216
+ /// - Precondition: The `Pointee`s at `source..<source + count` are
217
+ /// initialized.
218
+ ///
219
+ /// - Precondition: Either the `Pointee`s at `self..<self + count`
220
+ /// are initialized, or `Pointee` is a trivial type.
217
221
public func assign( from source: UnsafePointer < Pointee > , count: Int) {
218
222
_debugPrecondition (
219
223
count >= 0 , " ${Self}.assign with negative count " )
@@ -380,7 +384,9 @@ public struct ${Self}<Pointee>
380
384
381
385
/// Accesses the pointee at `self + i`.
382
386
///
383
- /// - Precondition: the pointee at `self + i` is initialized.
387
+ /// - Precondition: Either the pointee at `self + i` is initialized, or the
388
+ /// subscript is the left side of an assignment and `Pointee` is a trivial
389
+ /// type.
384
390
public subscript( i: Int) - > Pointee {
385
391
% if mutable:
386
392
@_transparent
0 commit comments