Skip to content

Commit 4675fc9

Browse files
xwulorentey
authored andcommitted
[stdlib] Add @_inlineable attribute with FIXME to hashValue implementations
1 parent a77e811 commit 4675fc9

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

stdlib/public/core/ClosedRange.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ extension ClosedRange.Index : Comparable {
168168

169169
@available(swift, introduced: 4.1) // FIXME(conformance-availability)
170170
extension ClosedRange.Index: Hashable
171-
where Bound: Strideable, Bound.Stride: SignedInteger, Bound: Hashable {
171+
where Bound: Strideable, Bound.Stride: SignedInteger, Bound: Hashable {
172+
@_inlineable // FIXME(sil-serialize-all)
172173
@available(swift, introduced: 4.1)
173174
public var hashValue: Int {
174175
switch self {

stdlib/public/core/DropWhile.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,13 @@ extension LazyDropWhileCollection.Index: Equatable, Comparable {
188188

189189
@available(swift, introduced: 4.1) // FIXME(conformance-availability)
190190
extension LazyDropWhileCollection.Index: Hashable where Base.Index: Hashable {
191+
@_inlineable // FIXME(sil-serialize-all)
191192
@available(swift, introduced: 4.1)
192193
public var hashValue: Int {
193194
return base.hashValue
194195
}
195196

197+
@_inlineable // FIXME(sil-serialize-all)
196198
public func _hash(into hasher: inout _Hasher) {
197199
hasher.append(base)
198200
}

stdlib/public/core/Flatten.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ extension FlattenCollection.Index : Comparable {
233233
@available(swift, introduced: 4.1) // FIXME(conformance-availability)
234234
extension FlattenCollection.Index : Hashable
235235
where Base.Index : Hashable, Base.Element.Index : Hashable {
236+
@_inlineable // FIXME(sil-serialize-all)
236237
@available(swift, introduced: 4.1)
237238
public var hashValue: Int {
238239
return _hashValue(for: self)

stdlib/public/core/PrefixWhile.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,13 @@ extension LazyPrefixWhileCollection.Index: Comparable {
208208

209209
@available(swift, introduced: 4.1) // FIXME(conformance-availability)
210210
extension LazyPrefixWhileCollection.Index: Hashable where Base.Index: Hashable {
211+
@_inlineable // FIXME(sil-serialize-all)
211212
@available(swift, introduced: 4.1)
212213
public var hashValue: Int {
213214
return _hashValue(for: self)
214215
}
215216

217+
@_inlineable // FIXME(sil-serialize-all)
216218
public func _hash(into hasher: inout _Hasher) {
217219
switch _value {
218220
case .index(let value):

0 commit comments

Comments
 (0)