Skip to content

Update stdlib for renaming initialize(with:) to initialize(to:). #3619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stdlib/public/core/ArrayCast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public func _arrayForceCast<SourceElement, TargetElement>(
_precondition(
bridged != nil, "array element cannot be bridged to Objective-C")
// FIXME: should be an unsafeDowncast.
p.initialize(with: unsafeBitCast(bridged!, to: TargetElement.self))
p.initialize(to: unsafeBitCast(bridged!, to: TargetElement.self))
p += 1
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ internal func _arrayConditionalBridgeElements<
guard let value = object as? TargetElement else {
return nil
}
p.initialize(with: value)
p.initialize(to: value)
p += 1
}
return Array(_buffer: _ArrayBuffer(buf, shiftedToStartIndex: 0))
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/core/UnsafePointer.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public struct ${Self}<Pointee>
Pointee.self, self._rawValue, source._rawValue, count._builtinWordValue)
// This builtin is equivalent to:
// for i in 0..<count {
// (self + i).initialize(with: (source + i).move())
// (self + i).initialize(to: (source + i).move())
// }
}

Expand Down Expand Up @@ -306,7 +306,7 @@ public struct ${Self}<Pointee>
// var src = source + count
// var dst = self + count
// while dst != self {
// (--dst).initialize(with: (--src).move())
// (--dst).initialize(to: (--src).move())
// }
}

Expand Down