@@ -136,7 +136,7 @@ extension InlineArray where Element: ~Copyable {
136
136
/// - Complexity: O(*n*), where *n* is the number of elements in the array.
137
137
@available ( SwiftStdlib 6 . 2 , * )
138
138
@_alwaysEmitIntoClient
139
- public init< E: Error > ( _ body: ( Int ) throws ( E ) -> Element ) throws ( E) {
139
+ public init< E: Error > ( _ body: ( Index ) throws ( E ) -> Element ) throws ( E) {
140
140
#if $BuiltinEmplaceTypedThrows
141
141
self = try Builtin . emplace { ( rawPtr) throws ( E) -> ( ) in
142
142
let buffer = InlineArray < count , Element > . _initializationBuffer (
@@ -284,7 +284,7 @@ extension InlineArray where Element: ~Copyable {
284
284
@available ( SwiftStdlib 6 . 2 , * )
285
285
@_alwaysEmitIntoClient
286
286
@_transparent
287
- public var startIndex : Int {
287
+ public var startIndex : Index {
288
288
0
289
289
}
290
290
@@ -297,7 +297,7 @@ extension InlineArray where Element: ~Copyable {
297
297
@available ( SwiftStdlib 6 . 2 , * )
298
298
@_alwaysEmitIntoClient
299
299
@_transparent
300
- public var endIndex : Int {
300
+ public var endIndex : Index {
301
301
count
302
302
}
303
303
@@ -307,7 +307,7 @@ extension InlineArray where Element: ~Copyable {
307
307
@available ( SwiftStdlib 6 . 2 , * )
308
308
@_alwaysEmitIntoClient
309
309
@_transparent
310
- public var indices : Range < Int > {
310
+ public var indices : Range < Index > {
311
311
Range ( _uncheckedBounds: ( 0 , count) )
312
312
}
313
313
@@ -321,7 +321,7 @@ extension InlineArray where Element: ~Copyable {
321
321
@available ( SwiftStdlib 6 . 2 , * )
322
322
@_alwaysEmitIntoClient
323
323
@_transparent
324
- public borrowing func index( after i: Int ) -> Int {
324
+ public borrowing func index( after i: Index ) -> Index {
325
325
i &+ 1
326
326
}
327
327
@@ -335,14 +335,14 @@ extension InlineArray where Element: ~Copyable {
335
335
@available ( SwiftStdlib 6 . 2 , * )
336
336
@_alwaysEmitIntoClient
337
337
@_transparent
338
- public borrowing func index( before i: Int ) -> Int {
338
+ public borrowing func index( before i: Index ) -> Index {
339
339
i &- 1
340
340
}
341
341
342
342
@_alwaysEmitIntoClient
343
343
@_semantics ( " fixed_storage.check_index " )
344
344
@inline ( __always)
345
- internal func _checkIndex( _ i: Int ) {
345
+ internal func _checkIndex( _ i: Index ) {
346
346
_precondition ( indices. contains ( i) , " Index out of bounds " )
347
347
}
348
348
@@ -355,7 +355,7 @@ extension InlineArray where Element: ~Copyable {
355
355
@available ( SwiftStdlib 6 . 2 , * )
356
356
@_addressableSelf
357
357
@_alwaysEmitIntoClient
358
- public subscript( _ i: Int ) -> Element {
358
+ public subscript( _ i: Index ) -> Element {
359
359
@_transparent
360
360
unsafeAddress {
361
361
_checkIndex ( i)
@@ -389,8 +389,8 @@ extension InlineArray where Element: ~Copyable {
389
389
@available ( SwiftStdlib 6 . 2 , * )
390
390
@_alwaysEmitIntoClient
391
391
public mutating func swapAt(
392
- _ i: Int ,
393
- _ j: Int
392
+ _ i: Index ,
393
+ _ j: Index
394
394
) {
395
395
guard i != j else {
396
396
return
0 commit comments