   // fields (including proto3's default use of packed) without
   // introducing the baggage of a separate option.
 
-  private mutating func _visitPacked<T>(value: [T], fieldNumber: Int, encode: (T) -> ()) throws {
+  private mutating func _visitPacked<T>(
+    value: [T], fieldNumber: Int,
+    encode: (T, inout TextFormatEncoder) -> ()
+  ) throws {
       emitFieldName(lookingUp: fieldNumber)
       encoder.startRegularField()
       var firstItem = true

          if !firstItem {
              encoder.arraySeparator()
          }
          encode(v)
          firstItem = false
      }
      encoder.endArray()

  }

  mutating func visitPackedBoolField(value: [Bool], fieldNumber: Int) throws {
    try _visitPacked(value: value, fieldNumber: fieldNumber) {
      (v: Bool, encoder: inout TextFormatEncoder) in
      encoder.putBoolValue(value: v)
    }
  }

  mutating func visitPackedEnumField<E: Enum>(value: [E], fieldNumber: Int) throws {
    try _visitPacked(value: value, fieldNumber: fieldNumber) {
      (v: E, encoder: inout TextFormatEncoder) in
      encoder.putEnumValue(value: v)
    }
  }
