Skip to content

Commit 1a5a721

Browse files
committed
ASTGen: Resolve 'was never mutated' warnings.
1 parent d10f6f9 commit 1a5a721

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ASTGen/Sources/ASTGen/DeclAttrs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ extension ASTGenVisitor {
936936

937937
func generateCustomAttr(attribute node: AttributeSyntax) -> BridgedCustomAttr? {
938938
guard
939-
var args = node.arguments?.as(LabeledExprListSyntax.self)?[...]
939+
let args = node.arguments?.as(LabeledExprListSyntax.self)?[...]
940940
else {
941941
// TODO: Diagnose.
942942
return nil

lib/ASTGen/Sources/ASTGen/Exprs.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ extension ASTGenVisitor {
317317
additionalTrailingClosures: MultipleTrailingClosureElementListSyntax?
318318
) -> BridgedArgumentList {
319319

320-
var bridgedArgs: BridgedArrayRef = {
320+
let bridgedArgs: BridgedArrayRef = {
321321
// Arguments before ')'
322322
let normalArgs = labeledExprList.lazy.map({ elem in
323323
let labelInfo = elem.label.map(self.generateIdentifierAndSourceLoc(_:))
@@ -363,7 +363,7 @@ extension ASTGenVisitor {
363363
// of the normal arguments because we don't have a convenient way to pass
364364
// Optional to ASTBridging, ASTBridging can know it's "nil" if
365365
// bridgedArgs.count == firstTrailingClosureIndex
366-
var firstTrailingClosureIndex = labeledExprList.count
366+
let firstTrailingClosureIndex = labeledExprList.count
367367

368368
return BridgedArgumentList.createParsed(
369369
self.ctx,

0 commit comments

Comments
 (0)