Skip to content

Commit 5113a1a

Browse files
authored
Merge pull request #7912 from practicalswift/remove-quite-a-few-unused-diagnostics
[gardening] Remove 16 unused diagnostics
2 parents 4e5b49a + 8cf0a14 commit 5113a1a

File tree

3 files changed

+1
-39
lines changed

3 files changed

+1
-39
lines changed

include/swift/AST/DiagnosticsCommon.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ NOTE(brace_stmt_suggest_do,none,
5858
// Generic disambiguation
5959
NOTE(while_parsing_as_left_angle_bracket,none,
6060
"while parsing this '<' as a type parameter bracket", ())
61-
NOTE(while_parsing_as_less_operator,none,
62-
"while parsing this '<' as an operator", ())
6361

6462

6563
// FIXME: This is used both as a parse error (a literal "super" outside a

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,6 @@ ERROR(no_default_arg_subscript,none,
755755
"default arguments are not allowed in subscripts", ())
756756
ERROR(no_default_arg_curried,none,
757757
"default arguments are not allowed in curried parameter lists", ())
758-
WARNING(let_on_param_is_redundant, none,
759-
"'let' keyword is unnecessary; function parameters are immutable by default", (unsigned))
760758
ERROR(var_pattern_in_var,none,
761759
"'%select{var|let}0' cannot appear nested inside another 'var' or "
762760
"'let' pattern", (unsigned))

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ NOTE(decl_declared_here,none,
4545
NOTE(extended_type_declared_here,none,
4646
"extended type declared here", ())
4747

48-
NOTE(while_converting_default_tuple_value,none,
49-
"while converting default tuple value to element type %0", (Type))
50-
NOTE(while_converting_subscript_index,none,
51-
"while converting subscript index to expected type %0", (Type))
52-
5348
//------------------------------------------------------------------------------
5449
// Constraint solver diagnostics
5550
//------------------------------------------------------------------------------
@@ -915,8 +910,6 @@ ERROR(c_function_pointer_from_function_with_context,none,
915910
"%select{local function|closure}0 that captures "
916911
"%select{context|generic parameters|dynamic Self type}1",
917912
(bool, unsigned))
918-
NOTE(c_function_pointer_captures_here,none,
919-
"%0 captured here", (Identifier))
920913

921914
//------------------------------------------------------------------------------
922915
// Type Check Declarations
@@ -1508,18 +1501,13 @@ NOTE(declared_protocol_conformance_here,none,
15081501

15091502
ERROR(redundant_conformance,none,
15101503
"redundant conformance of %0 to protocol %1", (Type, DeclName))
1511-
NOTE(protocol_conformance_implied_here,none,
1512-
"implied protocol conformance %0 here can be made explicit", (Identifier))
15131504

15141505
// "Near matches"
15151506
WARNING(optional_req_near_match,none,
15161507
"%0 %1 nearly matches optional requirement %2 of protocol %3",
15171508
(DescriptiveDeclKind, DeclName, DeclName, DeclName))
15181509
NOTE(optional_req_nonobjc_near_match_add_objc,none,
15191510
"add '@objc' to provide an Objective-C entrypoint", ())
1520-
NOTE(optional_req_nonobjc_to_objc,none,
1521-
"rename to %0 to satisfy this requirement",
1522-
(DeclName))
15231511
NOTE(optional_req_near_match_move,none,
15241512
"move %0 to %select{an|another}1 extension to silence this warning",
15251513
(DeclName, unsigned))
@@ -1775,8 +1763,6 @@ ERROR(decl_already_final,none,
17751763
"static declarations are already final", ())
17761764
ERROR(open_decl_cannot_be_final,none,
17771765
"%0 cannot be declared both 'final' and 'open'", (DescriptiveDeclKind))
1778-
NOTE(decl_init_here,none,
1779-
"initial value is here", ())
17801766

17811767

17821768
// Inheritance
@@ -2069,9 +2055,6 @@ ERROR(nscopying_doesnt_conform,none,
20692055
#define SELECT_APPLICATION_MAIN "select{'UIApplicationMain'|'NSApplicationMain'}"
20702056
#define SELECT_APPLICATION_DELEGATE "select{'UIApplicationDelegate'|'NSApplicationDelegate'}"
20712057

2072-
ERROR(attr_ApplicationMain_not_class,none,
2073-
"%" SELECT_APPLICATION_MAIN "0 attribute may only be used on classes",
2074-
(unsigned))
20752058
ERROR(attr_ApplicationMain_not_ApplicationDelegate,none,
20762059
"%" SELECT_APPLICATION_MAIN "0 class must conform to the %" SELECT_APPLICATION_DELEGATE "0 protocol",
20772060
(unsigned))
@@ -2125,17 +2108,7 @@ NOTE(found_candidate,none,
21252108
"found this candidate", ())
21262109
NOTE(found_candidate_type,none,
21272110
"found candidate with type %0", (Type))
2128-
NOTE(first_declaration,none,
2129-
"first declaration", ())
2130-
NOTE(second_declaration,none,
2131-
"second declaration", ())
2132-
2133-
ERROR(no_IntegerLiteralType_found,none,
2134-
"standard library error: IntegerLiteralType not defined", ())
2135-
ERROR(no_FloatLiteralType_found,none,
2136-
"standard library error: FloatLiteralType not defined", ())
2137-
ERROR(no_StringLiteralType_found,none,
2138-
"standard library error: StringLiteralType not defined", ())
2111+
21392112
ERROR(no_MaxBuiltinIntegerType_found,none,
21402113
"standard library error: _MaxBuiltinIntegerType is not properly defined", ())
21412114
ERROR(no_MaxBuiltinFloatType_found,none,
@@ -2241,9 +2214,6 @@ ERROR(try_assign_rhs_noncovering,none,
22412214
"'" TRY_KIND_SELECT(0) "' following assignment operator does not cover "
22422215
"everything to its right", (unsigned))
22432216

2244-
NOTE(subscript_decl_here,none,
2245-
"subscript operator declared here", ())
2246-
22472217
ERROR(broken_bool,none, "type 'Bool' is broken", ())
22482218

22492219
WARNING(inject_forced_downcast,none,
@@ -3465,10 +3435,6 @@ WARNING(variable_never_read, none,
34653435
"%select{variable|parameter}1 %0 was written to, but never read",
34663436
(Identifier, unsigned))
34673437

3468-
WARNING(extraneous_default_args_in_call, none,
3469-
"call to %0 has extraneous arguments that could use defaults",
3470-
(DeclName))
3471-
34723438
//------------------------------------------------------------------------------
34733439
// Circular reference diagnostics
34743440
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)