mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +00:00
Disambiguate ContainersPreview and stdlib
Adds trailing underscores to the BorrowingSequence protocols and requirements, in order to allow both parallel conformances and the ability to evolve the requirements in this package.
This commit is contained in:
1 parent
4c04822689
commit
a99a015934
49 files changed
+350
-363
No files matched your search
@@ -19,14 +19,14 @@ import ContainersPreview
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueSet: BorrowingSequence where Element: ~Copyable {
|
||||
extension UniqueSet: BorrowingSequence_ where Element: ~Copyable {
|
||||
public typealias BorrowingIterator = RigidSet<Element>.BorrowingIterator
|
||||
|
||||
@inlinable
|
||||
public var underestimatedCount: Int { count }
|
||||
|
||||
@inlinable
|
||||
public func _customContainsEquatableElement(
|
||||
public func _customContainsEquatableElement_(
|
||||
_ element: borrowing Element
|
||||
) -> Bool? {
|
||||
self.contains(element)
|
||||
|
||||
@@ -78,7 +78,7 @@ extension UniqueSet where Element: Copyable {
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@_alwaysEmitIntoClient
|
||||
public init<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
S: BorrowingSequence_<Element> & ~Copyable & ~Escapable
|
||||
>(
|
||||
copying items: borrowing S
|
||||
) {
|
||||
@@ -97,7 +97,7 @@ extension UniqueSet where Element: Copyable {
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@_alwaysEmitIntoClient
|
||||
public init<
|
||||
S: BorrowingSequence<Element> & Sequence<Element>
|
||||
S: BorrowingSequence_<Element> & Sequence<Element>
|
||||
>(
|
||||
copying items: borrowing S
|
||||
) {
|
||||
|
||||
@@ -133,7 +133,7 @@ extension UniqueSet /* where Element: Copyable */ {
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@_alwaysEmitIntoClient
|
||||
package mutating func _insert<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
S: BorrowingSequence_<Element> & ~Copyable & ~Escapable
|
||||
>(
|
||||
copying items: borrowing S
|
||||
) {
|
||||
@@ -152,7 +152,7 @@ extension UniqueSet /* where Element: Copyable */ {
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public mutating func insert<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
S: BorrowingSequence_<Element> & ~Copyable & ~Escapable
|
||||
>(
|
||||
copying items: borrowing S
|
||||
) {
|
||||
@@ -175,7 +175,7 @@ extension UniqueSet /* where Element: Copyable */ {
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public mutating func insert<
|
||||
S: BorrowingSequence<Element> & Sequence<Element>
|
||||
S: BorrowingSequence_<Element> & Sequence<Element>
|
||||
>(
|
||||
copying items: borrowing S
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user