Skip to content

Commit 228a886

Browse files
committed
Mark a few API uses in Swift Compiler Sources as unsafe.
1 parent 09384be commit 228a886

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SwiftCompilerSources/Sources/Basic/SourceLoc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public struct CharSourceRange {
5757
}
5858

5959
public init?(bridged: swift.CharSourceRange) {
60-
guard let start = SourceLoc(bridged: bridged.getStart()) else {
60+
guard let start = SourceLoc(bridged: bridged.__getStartUnsafe()) else {
6161
return nil
6262
}
6363
self.init(start: start, byteLength: bridged.getByteLength())

SwiftCompilerSources/Sources/Basic/Utils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extension String {
6565
/// Underscored to avoid name collision with the std overlay.
6666
/// To be replaced with an overlay call once the CI uses SDKs built with Swift 5.8.
6767
public init(_cxxString s: std.string) {
68-
self.init(cString: s.c_str())
68+
self.init(cString: s.__c_strUnsafe())
6969
withExtendedLifetime(s) {}
7070
}
7171
}

0 commit comments

Comments
 (0)