@@ -27,16 +27,6 @@ extension AnyHashable : _AnyHashableProtocol {}
27
27
// FIXME: remove these trampolines when extensions below can be
28
28
// properly expressed in the language.
29
29
extension Set {
30
- @inline(__always)
31
- internal func _concreteElement_contains(_ member: Element) -> Bool {
32
- return contains(member)
33
- }
34
-
35
- @inline(__always)
36
- internal func _concreteElement_index(of member: Element) -> Index? {
37
- return index(of: member)
38
- }
39
-
40
30
@inline(__always)
41
31
internal mutating func _concreteElement_insert(
42
32
_ newMember: Element
@@ -61,18 +51,6 @@ extension Set {
61
51
62
52
// FIXME(ABI)(compiler limitation): replace with `where Element == AnyHashable`.
63
53
extension Set where Element : _AnyHashableProtocol {
64
- public func contains<ConcreteElement : Hashable>(
65
- _ member: ConcreteElement
66
- ) -> Bool {
67
- return _concreteElement_contains(AnyHashable(member) as! Element)
68
- }
69
-
70
- public func index<ConcreteElement : Hashable>(
71
- of member: ConcreteElement
72
- ) -> SetIndex<Element>? {
73
- return _concreteElement_index(of: AnyHashable(member) as! Element)
74
- }
75
-
76
54
public mutating func insert<ConcreteElement : Hashable>(
77
55
_ newMember: ConcreteElement
78
56
) -> (inserted: Bool, memberAfterInsert: ConcreteElement) {
@@ -107,11 +85,6 @@ extension Set where Element : _AnyHashableProtocol {
107
85
// FIXME: remove these trampolines when extensions below can be
108
86
// properly expressed in the language.
109
87
extension Dictionary {
110
- @inline(__always)
111
- internal func _concreteKey_index(forKey key: Key) -> Index? {
112
- return index(forKey: key)
113
- }
114
-
115
88
internal subscript(_concreteKey key: Key) -> Value? {
116
89
@inline(__always)
117
90
get {
@@ -138,12 +111,6 @@ extension Dictionary {
138
111
139
112
// FIXME(ABI)(compiler limitation): replace with `where Element == AnyHashable`.
140
113
extension Dictionary where Key : _AnyHashableProtocol {
141
- public func index<ConcreteKey : Hashable>(forKey key: ConcreteKey)
142
- -> DictionaryIndex<Key, Value>?
143
- {
144
- return _concreteKey_index(forKey: AnyHashable(key) as! Key)
145
- }
146
-
147
114
public subscript(_ key: _Hashable) -> Value? {
148
115
// FIXME(ABI)(compiler limitation): replace this API with a
149
116
// generic subscript.
0 commit comments