Skip to content

Commit 58af3ce

Browse files
committed
CompatbilitySpan: Add a missing @unsafe.
The missing attribute was causing "no unsafe expressions" warnings elsewhere when building the CompatibilitySpan library.
1 parent a85caaf commit 58af3ce

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

stdlib/toolchain/CompatibilitySpan/FakeStdlib.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ internal func _overrideLifetime<
7474
}
7575

7676
extension Range {
77-
@_alwaysEmitIntoClient
78-
internal init(_uncheckedBounds bounds: (lower: Bound, upper: Bound)) {
79-
self.init(uncheckedBounds: bounds)
80-
}
77+
@unsafe
78+
@_alwaysEmitIntoClient
79+
internal init(_uncheckedBounds bounds: (lower: Bound, upper: Bound)) {
80+
self.init(uncheckedBounds: bounds)
81+
}
8182
}
8283

8384
extension Optional {
@@ -90,4 +91,4 @@ extension Optional {
9091
_internalInvariantFailure("_unsafelyUnwrappedUnchecked of nil optional")
9192
}
9293
}
93-
}
94+
}

0 commit comments

Comments
 (0)