@@ -5352,83 +5352,83 @@ ERROR(property_wrapper_missing_arg_init, none, "missing argument for parameter "
5352
5352
" arguments in '@%1(...)'" , (Identifier, StringRef))
5353
5353
5354
5354
// ------------------------------------------------------------------------------
5355
- // MARK: function builder diagnostics
5355
+ // MARK: result builder diagnostics
5356
5356
// ------------------------------------------------------------------------------
5357
- ERROR(function_builder_decl , none,
5358
- " closure containing a declaration cannot be used with function "
5357
+ ERROR(result_builder_decl , none,
5358
+ " closure containing a declaration cannot be used with result "
5359
5359
" builder %0" , (DeclName))
5360
- NOTE(note_function_builder_decl , none,
5361
- " closure containing a declaration cannot be used with function "
5360
+ NOTE(note_result_builder_decl , none,
5361
+ " closure containing a declaration cannot be used with result "
5362
5362
" builder %0" , (DeclName))
5363
- ERROR(function_builder_control_flow , none,
5364
- " closure containing control flow statement cannot be used with function "
5363
+ ERROR(result_builder_control_flow , none,
5364
+ " closure containing control flow statement cannot be used with result "
5365
5365
" builder %0" , (DeclName))
5366
- NOTE(note_function_builder_control_flow , none,
5367
- " closure containing control flow statement cannot be used with function "
5366
+ NOTE(note_result_builder_control_flow , none,
5367
+ " closure containing control flow statement cannot be used with result "
5368
5368
" builder %0" , (DeclName))
5369
- ERROR(function_builder_attribute_not_allowed_here , none,
5370
- " function builder attribute %0 can only be applied to a parameter, "
5369
+ ERROR(result_builder_attribute_not_allowed_here , none,
5370
+ " result builder attribute %0 can only be applied to a parameter, "
5371
5371
" function, or computed property" , (Identifier))
5372
- ERROR(function_builder_attribute_on_storage_without_getter , none,
5373
- " function builder attribute %0 can only be applied to a "
5372
+ ERROR(result_builder_attribute_on_storage_without_getter , none,
5373
+ " result builder attribute %0 can only be applied to a "
5374
5374
" %select{subscript|property|constant|variable}1 if it defines a getter" ,
5375
5375
(DeclName, unsigned ))
5376
- ERROR(function_builder_parameter_not_of_function_type , none,
5377
- " function builder attribute %0 can only be applied to a parameter of "
5376
+ ERROR(result_builder_parameter_not_of_function_type , none,
5377
+ " result builder attribute %0 can only be applied to a parameter of "
5378
5378
" function type" ,
5379
5379
(Identifier))
5380
- ERROR(function_builder_parameter_autoclosure , none,
5381
- " function builder attribute %0 cannot be applied to an autoclosure "
5380
+ ERROR(result_builder_parameter_autoclosure , none,
5381
+ " result builder attribute %0 cannot be applied to an autoclosure "
5382
5382
" parameter" ,
5383
5383
(Identifier))
5384
- ERROR(function_builder_multiple , none,
5385
- " only one function builder attribute can be attached to a "
5384
+ ERROR(result_builder_multiple , none,
5385
+ " only one result builder attribute can be attached to a "
5386
5386
" %select{declaration|parameter}0" , (bool ))
5387
- NOTE(previous_function_builder_here , none,
5388
- " previous function builder specified here" , ())
5389
- ERROR(function_builder_arguments , none,
5390
- " function builder attributes cannot have arguments" , ())
5391
- WARNING(function_builder_disabled_by_return , none,
5392
- " application of function builder %0 disabled by explicit 'return' "
5387
+ NOTE(previous_result_builder_here , none,
5388
+ " previous result builder specified here" , ())
5389
+ ERROR(result_builder_arguments , none,
5390
+ " result builder attributes cannot have arguments" , ())
5391
+ WARNING(result_builder_disabled_by_return , none,
5392
+ " application of result builder %0 disabled by explicit 'return' "
5393
5393
" statement" , (Type))
5394
- NOTE(function_builder_remove_attr , none,
5395
- " remove the attribute to explicitly disable the function builder" , ())
5396
- NOTE(function_builder_remove_returns , none,
5397
- " remove 'return' statements to apply the function builder" , ())
5398
- ERROR(function_builder_infer_ambig , none,
5399
- " ambiguous function builder inferred for %0: %1 or %2" ,
5394
+ NOTE(result_builder_remove_attr , none,
5395
+ " remove the attribute to explicitly disable the result builder" , ())
5396
+ NOTE(result_builder_remove_returns , none,
5397
+ " remove 'return' statements to apply the result builder" , ())
5398
+ ERROR(result_builder_infer_ambig , none,
5399
+ " ambiguous result builder inferred for %0: %1 or %2" ,
5400
5400
(DeclName, Type, Type))
5401
- NOTE(function_builder_infer_add_return , none,
5402
- " add an explicit 'return' statement to not use a function builder" , ())
5403
- NOTE(function_builder_infer_pick_specific , none,
5404
- " apply function builder %0 (inferred from %select{protocol|dynamic replacement of}1 %2)" ,
5401
+ NOTE(result_builder_infer_add_return , none,
5402
+ " add an explicit 'return' statement to not use a result builder" , ())
5403
+ NOTE(result_builder_infer_pick_specific , none,
5404
+ " apply result builder %0 (inferred from %select{protocol|dynamic replacement of}1 %2)" ,
5405
5405
(Type, unsigned , DeclName))
5406
- WARNING(function_builder_missing_limited_availability , none,
5407
- " function builder %0 does not implement 'buildLimitedAvailability'; "
5406
+ WARNING(result_builder_missing_limited_availability , none,
5407
+ " result builder %0 does not implement 'buildLimitedAvailability'; "
5408
5408
" this code may crash on earlier versions of the OS" ,
5409
5409
(Type))
5410
- ERROR(function_builder_static_buildblock , none,
5411
- " function builder must provide at least one static 'buildBlock' "
5410
+ ERROR(result_builder_static_buildblock , none,
5411
+ " result builder must provide at least one static 'buildBlock' "
5412
5412
" method" , ())
5413
- NOTE(function_builder_non_static_buildblock , none,
5413
+ NOTE(result_builder_non_static_buildblock , none,
5414
5414
" did you mean to make instance method 'buildBlock' static?" , ())
5415
- NOTE(function_builder_buildblock_enum_case , none,
5416
- " enum case 'buildBlock' cannot be used to satisfy the function builder "
5415
+ NOTE(result_builder_buildblock_enum_case , none,
5416
+ " enum case 'buildBlock' cannot be used to satisfy the result builder "
5417
5417
" requirement" , ())
5418
- NOTE(function_builder_buildblock_not_static_method , none,
5418
+ NOTE(result_builder_buildblock_not_static_method , none,
5419
5419
" potential match 'buildBlock' is not a static method" , ())
5420
5420
5421
- NOTE(function_builder_missing_build_optional , none,
5422
- " add 'buildOptional(_:)' to the function builder %0 to add support for "
5421
+ NOTE(result_builder_missing_build_optional , none,
5422
+ " add 'buildOptional(_:)' to the result builder %0 to add support for "
5423
5423
" 'if' statements without an 'else'" , (Type))
5424
- NOTE(function_builder_missing_build_either , none,
5425
- " add 'buildEither(first:)' and 'buildEither(second:)' to the function "
5424
+ NOTE(result_builder_missing_build_either , none,
5425
+ " add 'buildEither(first:)' and 'buildEither(second:)' to the result "
5426
5426
" builder %0 to add support for 'if'-'else' and 'switch'" , (Type))
5427
- NOTE(function_builder_missing_build_array , none,
5428
- " add 'buildArray(_:)' to the function builder %0 to add support for "
5427
+ NOTE(result_builder_missing_build_array , none,
5428
+ " add 'buildArray(_:)' to the result builder %0 to add support for "
5429
5429
" 'for'..'in' loops" , (Type))
5430
- NOTE(function_builder_missing_build_limited_availability , none,
5431
- " add 'buildLimitedAvailability(_:)' to the function "
5430
+ NOTE(result_builder_missing_build_limited_availability , none,
5431
+ " add 'buildLimitedAvailability(_:)' to the result "
5432
5432
" builder %0 to erase type information for less-available types" , (Type))
5433
5433
5434
5434
// ------------------------------------------------------------------------------
0 commit comments