Skip to content

Commit 51fe32d

Browse files
committed
[Diagnostics] NFC: Remove unused last argument from requirement failure notes
1 parent b4976df commit 51fe32d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,16 +1988,16 @@ NOTE(wrapped_type_satisfies_requirement,none,
19881988
"wrapped type %0 satisfies this requirement; did you mean to unwrap?", (Type))
19891989
NOTE(candidate_types_conformance_requirement,none,
19901990
"candidate requires that %0 conform to %1 "
1991-
"(requirement specified as %2 : %3%4)",
1992-
(Type, Type, Type, Type, StringRef))
1991+
"(requirement specified as %2 : %3)",
1992+
(Type, Type, Type, Type))
19931993
NOTE(candidate_types_equal_requirement,none,
19941994
"candidate requires that the types %0 and %1 be equivalent "
1995-
"(requirement specified as %2 == %3%4)",
1996-
(Type, Type, Type, Type, StringRef))
1995+
"(requirement specified as %2 == %3)",
1996+
(Type, Type, Type, Type))
19971997
NOTE(candidate_types_inheritance_requirement,none,
19981998
"candidate requires that %1 inherit from %2 "
1999-
"(requirement specified as %2 : %3%4)",
2000-
(Type, Type, Type, Type, StringRef))
1999+
"(requirement specified as %2 : %3)",
2000+
(Type, Type, Type, Type))
20012001
NOTE(types_not_equal_requirement,none,
20022002
"requirement specified as %0 == %1%2", (Type, Type, StringRef))
20032003
ERROR(type_is_not_a_class,none,

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ bool RequirementFailure::diagnoseAsNote() {
400400
const auto *reqDC = getRequirementDC();
401401

402402
emitDiagnosticAt(reqDC->getAsDecl(), getDiagnosticAsNote(), getLHS(),
403-
getRHS(), req.getFirstType(), req.getSecondType(), "");
403+
getRHS(), req.getFirstType(), req.getSecondType());
404404
return true;
405405
}
406406

lib/Sema/CSDiagnostics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class RequirementFailure : public FailureDiagnostic {
235235
using PathEltKind = ConstraintLocator::PathElementKind;
236236
using DiagOnDecl = Diag<DescriptiveDeclKind, DeclName, Type, Type>;
237237
using DiagInReference = Diag<DescriptiveDeclKind, DeclName, Type, Type, Type>;
238-
using DiagAsNote = Diag<Type, Type, Type, Type, StringRef>;
238+
using DiagAsNote = Diag<Type, Type, Type, Type>;
239239

240240
/// If this failure associated with one of the conditional requirements,
241241
/// this field would represent conformance where requirement comes from.

0 commit comments

Comments
 (0)