Skip to content

Commit 2e5aef9

Browse files
committed
stdlib: Remove redundant @usableFromInline attributes
1 parent b4e145d commit 2e5aef9

File tree

101 files changed

+20
-1449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+20
-1449
lines changed

stdlib/public/core/Algorithm.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public struct EnumeratedIterator<Base: IteratorProtocol> {
9898

9999
/// Construct from a `Base` iterator.
100100
@inlinable
101-
@usableFromInline
102101
internal init(_base: Base) {
103102
self._base = _base
104103
self._count = 0
@@ -145,7 +144,6 @@ public struct EnumeratedSequence<Base: Sequence> {
145144

146145
/// Construct from a `Base` sequence.
147146
@inlinable
148-
@usableFromInline
149147
internal init(_base: Base) {
150148
self._base = _base
151149
}

stdlib/public/core/AnyHashable.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,22 @@ internal struct _ConcreteHashableBox<Base : Hashable> : _AnyHashableBox {
6161
internal var _baseHashable: Base
6262

6363
@inlinable // FIXME(sil-serialize-all)
64-
@usableFromInline // FIXME(sil-serialize-all)
6564
internal init(_ base: Base) {
6665
self._baseHashable = base
6766
}
6867

6968

7069
@inlinable // FIXME(sil-serialize-all)
71-
@usableFromInline // FIXME(sil-serialize-all)
7270
internal var _typeID: ObjectIdentifier {
7371
return ObjectIdentifier(type(of: self))
7472
}
7573

7674
@inlinable // FIXME(sil-serialize-all)
77-
@usableFromInline // FIXME(sil-serialize-all)
7875
internal func _unbox<T : Hashable>() -> T? {
7976
return (self as _AnyHashableBox as? _ConcreteHashableBox<T>)?._baseHashable
8077
}
8178

8279
@inlinable // FIXME(sil-serialize-all)
83-
@usableFromInline // FIXME(sil-serialize-all)
8480
internal func _isEqual(to rhs: _AnyHashableBox) -> Bool? {
8581
if let rhs: Base = rhs._unbox() {
8682
return _baseHashable == rhs
@@ -89,25 +85,21 @@ internal struct _ConcreteHashableBox<Base : Hashable> : _AnyHashableBox {
8985
}
9086

9187
@inlinable // FIXME(sil-serialize-all)
92-
@usableFromInline // FIXME(sil-serialize-all)
9388
internal var _hashValue: Int {
9489
return _baseHashable.hashValue
9590
}
9691

9792
@inlinable // FIXME(sil-serialize-all)
98-
@usableFromInline // FIXME(sil-serialize-all)
9993
func _hash(_into hasher: inout _Hasher) {
10094
_baseHashable._hash(into: &hasher)
10195
}
10296

10397
@inlinable // FIXME(sil-serialize-all)
104-
@usableFromInline // FIXME(sil-serialize-all)
10598
internal var _base: Any {
10699
return _baseHashable
107100
}
108101

109102
@inlinable // FIXME(sil-serialize-all)
110-
@usableFromInline // FIXME(sil-serialize-all)
111103
internal
112104
func _downCastConditional<T>(into result: UnsafeMutablePointer<T>) -> Bool {
113105
guard let value = _baseHashable as? T else { return false }
@@ -122,7 +114,6 @@ internal struct _ConcreteHashableBox<Base : Hashable> : _AnyHashableBox {
122114
// turns a non-custom representation into a custom one, which is used as
123115
// the lowest-common-denominator for comparisons.
124116
@inlinable // FIXME(sil-serialize-all)
125-
@usableFromInline // FIXME(sil-serialize-all)
126117
internal func _getBridgedCustomAnyHashable<T>(_ value: T) -> AnyHashable? {
127118
let bridgedValue = _bridgeAnythingToObjectiveC(value)
128119
return (bridgedValue as?
@@ -191,7 +182,6 @@ public struct AnyHashable {
191182
}
192183

193184
@inlinable // FIXME(sil-serialize-all)
194-
@usableFromInline // FIXME(sil-serialize-all)
195185
internal init<H : Hashable>(_usingDefaultRepresentationOf base: H) {
196186
self._box = _ConcreteHashableBox(base)
197187
self._usedCustomRepresentation = false
@@ -217,7 +207,6 @@ public struct AnyHashable {
217207
/// This avoids the intermediate re-boxing we would get if we just did
218208
/// a downcast on `base`.
219209
@inlinable // FIXME(sil-serialize-all)
220-
@usableFromInline // FIXME(sil-serialize-all)
221210
internal
222211
func _downCastConditional<T>(into result: UnsafeMutablePointer<T>) -> Bool {
223212
// Attempt the downcast.

stdlib/public/core/ArrayBody.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ internal struct _ArrayBody {
2424
internal var _storage: _SwiftArrayBodyStorage
2525

2626
@inlinable
27-
@usableFromInline
2827
internal init(
2928
count: Int, capacity: Int, elementTypeIsBridgedVerbatim: Bool = false
3029
) {
@@ -43,14 +42,12 @@ internal struct _ArrayBody {
4342
/// capacity after a new buffer is allocated, it's typical to want
4443
/// to update it immediately after construction.
4544
@inlinable
46-
@usableFromInline
4745
internal init() {
4846
_storage = _SwiftArrayBodyStorage(count: 0, _capacityAndFlags: 0)
4947
}
5048

5149
/// The number of elements stored in this Array.
5250
@inlinable
53-
@usableFromInline
5451
internal var count: Int {
5552
get {
5653
return _assumeNonNegative(_storage.count)
@@ -63,7 +60,6 @@ internal struct _ArrayBody {
6360
/// The number of elements that can be stored in this Array without
6461
/// reallocation.
6562
@inlinable
66-
@usableFromInline
6763
internal var capacity: Int {
6864
return Int(_capacityAndFlags &>> 1)
6965
}
@@ -75,7 +71,6 @@ internal struct _ArrayBody {
7571
/// avoid the cost of calls into the runtime that compute the
7672
/// answer.
7773
@inlinable
78-
@usableFromInline
7974
internal var elementTypeIsBridgedVerbatim: Bool {
8075
get {
8176
return (_capacityAndFlags & 0x1) != 0
@@ -89,7 +84,6 @@ internal struct _ArrayBody {
8984
/// Storage optimization: compresses capacity and
9085
/// elementTypeIsBridgedVerbatim together.
9186
@inlinable
92-
@usableFromInline
9387
internal var _capacityAndFlags: UInt {
9488
get {
9589
return _storage._capacityAndFlags

0 commit comments

Comments
 (0)