Skip to content

Commit ac92a49

Browse files
committed
[SwiftFixIt] Don't borrow 'SourceFile' in 'fixIt' and 'highlights' APIs
1 parent 06b3aaf commit ac92a49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftFixIt/SwiftFixit.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ extension DiagnosticConverter {
323323
// emit notes with those fix-its.
324324
private static func fixIt(
325325
from diagnostic: borrowing some AnyDiagnostic,
326-
in sourceFile: borrowing SourceFile
326+
in sourceFile: /*borrowing*/ SourceFile
327327
) throws -> SwiftDiagnostics.FixIt {
328328
let changes = try diagnostic.fixIts.map { fixIt in
329329
let startPosition = try sourceFile.position(of: fixIt.start)
@@ -341,7 +341,7 @@ extension DiagnosticConverter {
341341

342342
private static func highlights(
343343
from diagnostic: borrowing some AnyDiagnostic,
344-
in sourceFile: borrowing SourceFile
344+
in sourceFile: /*borrowing*/ SourceFile
345345
) throws -> [Syntax] {
346346
try diagnostic.ranges.map { startLocation, endLocation in
347347
let startPosition = try sourceFile.position(of: startLocation)

0 commit comments

Comments
 (0)