Skip to content

Commit 1b07853

Browse files
authored
Merge pull request #29970 from owenv/remove-unused-diags-2
Remove some unused Sema diagnostic messages
2 parents c6587f1 + 2d1aa2d commit 1b07853

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ ERROR(expected_result_in_contextual_member,none,
120120
ERROR(unexpected_arguments_in_enum_case,none,
121121
"enum case %0 has no associated values", (DeclName))
122122

123-
ERROR(could_not_use_value_member,none,
124-
"member %1 cannot be used on value of type %0", (Type, DeclNameRef))
125-
ERROR(could_not_use_type_member,none,
126-
"member %1 cannot be used on type %0", (Type, DeclNameRef))
127-
128123
ERROR(could_not_use_type_member_on_instance,none,
129124
"static member %1 cannot be used on instance of type %0",
130125
(Type, DeclNameRef))
@@ -224,10 +219,6 @@ ERROR(cannot_apply_lvalue_binop_to_subelement,none,
224219
ERROR(cannot_apply_lvalue_binop_to_rvalue,none,
225220
"left side of mutating operator has immutable type %0", (Type))
226221

227-
ERROR(cannot_subscript_with_index,none,
228-
"cannot subscript a value of type %0 with an argument of type %1",
229-
(Type, Type))
230-
231222
ERROR(cannot_subscript_base,none,
232223
"cannot subscript a value of type %0",
233224
(Type))
@@ -255,10 +246,6 @@ ERROR(cannot_pass_rvalue_inout,none,
255246
ERROR(cannot_provide_default_value_inout,none,
256247
"cannot provide default value to inout parameter %0", (Identifier))
257248

258-
ERROR(cannot_call_with_no_params,none,
259-
"cannot invoke %select{|initializer for type }1'%0' with no arguments",
260-
(StringRef, bool))
261-
262249
ERROR(cannot_call_with_params, none,
263250
"cannot invoke %select{|initializer for type }2'%0' with an argument list"
264251
" of type '%1'", (StringRef, StringRef, bool))
@@ -270,14 +257,6 @@ ERROR(no_candidates_match_result_type,none,
270257
"no '%0' candidates produce the expected contextual result type %1",
271258
(StringRef, Type))
272259

273-
274-
ERROR(cannot_invoke_closure,none,
275-
"cannot invoke closure expression with an argument list of type '%0'",
276-
(StringRef))
277-
ERROR(cannot_invoke_closure_type,none,
278-
"cannot invoke closure of type %0 with an argument list of type '%1'",
279-
(Type, StringRef))
280-
281260
ERROR(cannot_infer_closure_type,none,
282261
"unable to infer closure type in the current context", ())
283262
ERROR(cannot_infer_closure_result_type,none,
@@ -291,13 +270,6 @@ ERROR(incorrect_explicit_closure_result,none,
291270
"declared closure result %0 is incompatible with contextual type %1",
292271
(Type, Type))
293272

294-
ERROR(cannot_call_function_value,none,
295-
"cannot invoke value of function type with argument list '%0'",
296-
(StringRef))
297-
ERROR(cannot_call_value_of_function_type,none,
298-
"cannot invoke value of type %0 with argument list '%1'",
299-
(Type, StringRef))
300-
301273
NOTE(suggest_expected_match,none,
302274
"%select{expected an argument list|produces result}0 of type '%1'",
303275
(bool, StringRef))
@@ -943,16 +915,6 @@ NOTE(circular_reference_through_precedence_group, none,
943915
//------------------------------------------------------------------------------
944916
// MARK: Expression Type Checking Errors
945917
//------------------------------------------------------------------------------
946-
ERROR(types_not_convertible,none,
947-
"%1 is not %select{convertible to|a subtype of}0 %2",
948-
(bool, Type, Type))
949-
NOTE(in_cast_expr_types,none,
950-
"in cast from type %0 to %1",
951-
(Type, Type))
952-
953-
ERROR(types_not_convertible_use_bool_value,none,
954-
"%0 is not convertible to %1; did you mean %0.boolValue?", (Type, Type))
955-
956918
ERROR(tuple_types_not_convertible_nelts,none,
957919
"%0 is not convertible to %1, "
958920
"tuples have a different number of elements", (Type, Type))
@@ -3226,18 +3188,12 @@ ERROR(unresolved_member_no_inference,none,
32263188
(DeclNameRef))
32273189
ERROR(cannot_infer_base_of_unresolved_member,none,
32283190
"cannot infer contextual base in reference to member %0", (DeclNameRef))
3229-
ERROR(unresolved_collection_literal,none,
3230-
"cannot infer type for empty collection literal without a "
3231-
"contextual type", ())
32323191
ERROR(unresolved_nil_literal,none,
32333192
"'nil' requires a contextual type", ())
32343193

32353194
ERROR(type_of_expression_is_ambiguous,none,
32363195
"type of expression is ambiguous without more context", ())
32373196

3238-
ERROR(specific_type_of_expression_is_ambiguous,none,
3239-
"expression type %0 is ambiguous without more context", (Type))
3240-
32413197
ERROR(failed_to_produce_diagnostic,Fatal,
32423198
"failed to produce diagnostic for expression; "
32433199
"please file a bug report", ())
@@ -3515,9 +3471,6 @@ ERROR(general_noescape_to_escaping,none,
35153471
ERROR(converting_noescape_to_type,none,
35163472
"converting non-escaping value to %0 may allow it to escape",
35173473
(Type))
3518-
ERROR(unknown_escaping_use_of_noescape,none,
3519-
"using non-escaping value in a context where it may escape",
3520-
())
35213474

35223475
ERROR(capture_across_type_decl,none,
35233476
"%0 declaration cannot close over value %1 defined in outer scope",
@@ -3746,8 +3699,6 @@ ERROR(single_tuple_parameter_mismatch_special,none,
37463699
ERROR(single_tuple_parameter_mismatch_normal,none,
37473700
"%0 %1 expects a single parameter of type %2%3",
37483701
(DescriptiveDeclKind, DeclBaseName, Type, StringRef))
3749-
ERROR(unknown_single_tuple_parameter_mismatch,none,
3750-
"single parameter of type %0 is expected in call", (Type))
37513702
ERROR(cannot_convert_single_tuple_into_multiple_arguments,none,
37523703
"%0 %select{%1 |}2expects %3 separate arguments"
37533704
"%select{|; remove extra parentheses to change tuple into separate arguments}4",

0 commit comments

Comments
 (0)