@@ -127,12 +127,6 @@ struct VariadicsGenerator: ParsableCommand {
127
127
128
128
""" )
129
129
130
- print ( " Generating 'buildBlock(_:)' overloads... " , to: & standardError)
131
- for arity in 1 ..< maxArity {
132
- print ( " Capture arity: \( arity) " , to: & standardError)
133
- emitUnaryBuildBlock ( arity: arity)
134
- }
135
-
136
130
print ( " Generating concatenation overloads... " , to: & standardError)
137
131
for (leftArity, rightArity) in Permutations ( totalArity: maxArity) {
138
132
guard rightArity != 0 else {
@@ -195,21 +189,6 @@ struct VariadicsGenerator: ParsableCommand {
195
189
return " ( \( genericParameters ( ) ) ) "
196
190
}
197
191
198
- func emitUnaryBuildBlock( arity: Int ) {
199
- assert ( arity > 0 )
200
- let captureTypes = ( 0 ..< arity) . map { " C \( $0) " } . joined ( separator: " , " )
201
- output ( """
202
- extension RegexBuilder {
203
- public static func buildBlock<R: RegexProtocol, W, \( captureTypes) >(_ regex: R) -> R
204
- where R.Match == (W, \( captureTypes) )
205
- {
206
- regex
207
- }
208
- }
209
-
210
- """ )
211
- }
212
-
213
192
func emitConcatenation( leftArity: Int , rightArity: Int ) {
214
193
let genericParams : String = {
215
194
var result = " W0, W1 "
@@ -255,7 +234,6 @@ struct VariadicsGenerator: ParsableCommand {
255
234
// Emit concatenation builder.
256
235
output ( " extension \( patternBuilderTypeName) { \n " )
257
236
output ( """
258
- @_disfavoredOverload
259
237
public static func buildBlock< \( genericParams) >(
260
238
combining next: R1, into combined: R0
261
239
) -> \( regexTypeName) < \( matchType) > \( whereClause) {
@@ -270,7 +248,6 @@ struct VariadicsGenerator: ParsableCommand {
270
248
// T + () = T
271
249
output ( """
272
250
extension RegexBuilder {
273
- @_disfavoredOverload
274
251
public static func buildBlock<W0
275
252
""" )
276
253
outputForEach ( 0 ..< leftArity) {
0 commit comments