@@ -8195,6 +8195,9 @@ ERROR(pack_iteration_where_clause_not_supported, none,
81958195// MARK: Lifetime Dependence Syntax
81968196// ------------------------------------------------------------------------------
81978197
8198+ WARNING(use_lifetime_underscored, PointsToFirstBadToken,
8199+ " Unsupported use of @lifetime, use @_lifetime to specify lifetime dependencies" , ())
8200+
81988201ERROR(lifetime_dependence_invalid_param_name, none,
81998202 " invalid parameter name specified %0" , (Identifier))
82008203ERROR(lifetime_dependence_invalid_param_index, none,
@@ -8229,7 +8232,7 @@ ERROR(lifetime_dependence_immortal_alone, none,
82298232 " cannot specify any other dependence source along with immortal" , ())
82308233ERROR(lifetime_dependence_invalid_inherit_escapable_type, none,
82318234 " cannot copy the lifetime of an Escapable type, use "
8232- " '@lifetime (%1%0)' instead" ,
8235+ " '@_lifetime (%1%0)' instead" ,
82338236 (StringRef, StringRef))
82348237ERROR(lifetime_dependence_cannot_use_parsed_borrow_consuming, none,
82358238 " invalid use of %0 dependence with %1 ownership" ,
@@ -8260,11 +8263,11 @@ ERROR(lifetime_dependence_feature_required_inout, none,
82608263 (StringRef, Identifier))
82618264
82628265ERROR(lifetime_dependence_cannot_infer_return, none,
8263- " %0 with a ~Escapable result requires '@lifetime (...)'" , (StringRef))
8266+ " %0 with a ~Escapable result requires '@_lifetime (...)'" , (StringRef))
82648267ERROR(lifetime_dependence_cannot_infer_mutating, none,
8265- " %0 with a ~Escapable 'self' requires '@lifetime (self: ...)'" , (StringRef))
8268+ " %0 with a ~Escapable 'self' requires '@_lifetime (self: ...)'" , (StringRef))
82668269ERROR(lifetime_dependence_cannot_infer_inout, none,
8267- " %0 with a ~Escapable 'inout' parameter requires '@lifetime (%1: ...)'" ,
8270+ " %0 with a ~Escapable 'inout' parameter requires '@_lifetime (%1: ...)'" ,
82688271 (StringRef, Identifier))
82698272
82708273// ------------------------------------------------------------------------------
@@ -8275,15 +8278,15 @@ ERROR(lifetime_dependence_cannot_infer_return_no_param, none,
82758278 " %0 with a ~Escapable result needs a parameter to depend on" ,
82768279 (StringRef))
82778280NOTE(lifetime_dependence_cannot_infer_return_immortal, none,
8278- " '@lifetime (immortal)' can be used to indicate that values produced by "
8281+ " '@_lifetime (immortal)' can be used to indicate that values produced by "
82798282 " this initializer have no lifetime dependencies" , ())
82808283ERROR(lifetime_dependence_cannot_infer_bitwisecopyable, none,
82818284 " cannot infer lifetime dependence on %0 because '%1' is BitwiseCopyable, "
8282- " specify '@lifetime (borrow self)'" ,
8285+ " specify '@_lifetime (borrow self)'" ,
82838286 (StringRef, StringRef))
82848287ERROR(lifetime_dependence_cannot_infer_kind, none,
82858288 " cannot infer the lifetime dependence scope on %0 with a ~Escapable "
8286- " parameter, specify '@lifetime (borrow %1)' or '@lifetime (copy %1)'" ,
8289+ " parameter, specify '@_lifetime (borrow %1)' or '@_lifetime (copy %1)'" ,
82878290 (StringRef, StringRef))
82888291ERROR(lifetime_dependence_cannot_infer_scope_ownership, none,
82898292 " cannot borrow the lifetime of '%0', which has consuming ownership on %1" ,
0 commit comments