Skip to content

Commit 5265409

Browse files
committed
Fix LifetimeDependence diagnostic formatting
Remove incorrectly nested single quotes from the suggested fix. (cherry picked from commit 465d6a8)
1 parent e180d8b commit 5265409

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8260,18 +8260,18 @@ ERROR(lifetime_dependence_feature_required_return, none,
82608260
ERROR(lifetime_dependence_feature_required_mutating, none,
82618261
"%0 cannot have a ~Escapable 'self'", (StringRef))
82628262
ERROR(lifetime_dependence_feature_required_inout, none,
8263-
"%0 cannot have a ~Escapable 'inout' parameter %1",
8263+
"%0 cannot have a ~Escapable 'inout' parameter '%1'",
82648264
// this arg list must be compatible with
82658265
// lifetime_dependence_cannot_infer_inout
8266-
(StringRef, Identifier))
8266+
(StringRef, StringRef))
82678267

82688268
ERROR(lifetime_dependence_cannot_infer_return, none,
82698269
"%0 with a ~Escapable result requires '@_lifetime(...)'", (StringRef))
82708270
ERROR(lifetime_dependence_cannot_infer_mutating, none,
82718271
"%0 with a ~Escapable 'self' requires '@_lifetime(self: ...)'", (StringRef))
82728272
ERROR(lifetime_dependence_cannot_infer_inout, none,
82738273
"%0 with a ~Escapable 'inout' parameter requires '@_lifetime(%1: ...)'",
8274-
(StringRef, Identifier))
8274+
(StringRef, StringRef))
82758275

82768276
//------------------------------------------------------------------------------
82778277
// MARK: Lifetime Dependence Inference - refinements to the requirements above

lib/AST/LifetimeDependence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class LifetimeDependenceChecker {
554554
})) {
555555
ctx.Diags.diagnose(param->getLoc(), diagID,
556556
{StringRef(diagnosticQualifier()),
557-
param->getName()});
557+
param->getName().str()});
558558
}
559559
}
560560
}

0 commit comments

Comments
 (0)