@@ -5352,83 +5352,83 @@ ERROR(property_wrapper_missing_arg_init, none, "missing argument for parameter "
53525352 " arguments in '@%1(...)'" , (Identifier, StringRef))
53535353
53545354// ------------------------------------------------------------------------------
5355- // MARK: function builder diagnostics
5355+ // MARK: result builder diagnostics
53565356// ------------------------------------------------------------------------------
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 "
53595359 " 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 "
53625362 " 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 "
53655365 " 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 "
53685368 " 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, "
53715371 " 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 "
53745374 " %select{subscript|property|constant|variable}1 if it defines a getter" ,
53755375 (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 "
53785378 " function type" ,
53795379 (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 "
53825382 " parameter" ,
53835383 (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 "
53865386 " %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' "
53935393 " 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" ,
54005400 (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)" ,
54055405 (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'; "
54085408 " this code may crash on earlier versions of the OS" ,
54095409 (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' "
54125412 " method" , ())
5413- NOTE(function_builder_non_static_buildblock , none,
5413+ NOTE(result_builder_non_static_buildblock , none,
54145414 " 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 "
54175417 " requirement" , ())
5418- NOTE(function_builder_buildblock_not_static_method , none,
5418+ NOTE(result_builder_buildblock_not_static_method , none,
54195419 " potential match 'buildBlock' is not a static method" , ())
54205420
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 "
54235423 " '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 "
54265426 " 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 "
54295429 " '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 "
54325432 " builder %0 to erase type information for less-available types" , (Type))
54335433
54345434// ------------------------------------------------------------------------------
0 commit comments