@@ -327,18 +327,18 @@ pub struct InferenceBadError<'a> {
327327pub enum SourceKindSubdiag < ' a > {
328328 #[ suggestion(
329329 "{$kind ->
330- [with_pattern] consider giving `{$name}` an explicit type
331- [closure] consider giving this closure parameter an explicit type
332- *[other] consider giving this pattern a type
333- }{$x_kind ->
334- [has_name] , where the {$prefix_kind ->
335- *[type] type for {$prefix}
336- [const_with_param] value of const parameter
337- [const] value of the constant
338- } `{$arg_name}` is specified
339- [underscore] , where the placeholders `_` are specified
340- *[empty] {\" \" }
341- }" ,
330+ [with_pattern] consider giving `{$name}` an explicit type
331+ [closure] consider giving this closure parameter an explicit type
332+ *[other] consider giving this pattern a type
333+ }{$x_kind ->
334+ [has_name] , where the {$prefix_kind ->
335+ *[type] type for {$prefix}
336+ [const_with_param] value of const parameter
337+ [const] value of the constant
338+ } `{$arg_name}` is specified
339+ [underscore] , where the placeholders `_` are specified
340+ *[empty] {\" \" }
341+ }",
342342 style = "verbose" ,
343343 code = ": {type_name}" ,
344344 applicability = "has-placeholders"
@@ -356,15 +356,15 @@ pub enum SourceKindSubdiag<'a> {
356356 } ,
357357 #[ label(
358358 "cannot infer {$is_type ->
359- [true] type
360- *[false] the value
361- } of the {$is_type ->
362- [true] type
363- *[false] const
364- } {$parent_exists ->
365- [true] parameter `{$param_name}` declared on the {$parent_prefix} `{$parent_name}`
366- *[false] parameter {$param_name}
367- }"
359+ [true] type
360+ *[false] the value
361+ } of the {$is_type ->
362+ [true] type
363+ *[false] const
364+ } {$parent_exists ->
365+ [true] parameter `{$param_name}` declared on the {$parent_prefix} `{$parent_name}`
366+ *[false] parameter {$param_name}
367+ }"
368368 ) ]
369369 GenericLabel {
370370 #[ primary_span]
@@ -377,9 +377,9 @@ pub enum SourceKindSubdiag<'a> {
377377 } ,
378378 #[ suggestion(
379379 "consider specifying the generic {$arg_count ->
380- [one] argument
381- *[other] arguments
382- }" ,
380+ [one] argument
381+ *[other] arguments
382+ }",
383383 style = "verbose" ,
384384 code = "::<{args}>" ,
385385 applicability = "has-placeholders"
@@ -945,9 +945,9 @@ impl IntoDiagArg for TyOrSig<'_> {
945945#[ derive( Subdiagnostic ) ]
946946pub enum ActualImplExplNotes < ' tcx > {
947947 #[ note( "{$leading_ellipsis ->
948- [true] ...
949- *[false] {\" \" }
950- }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`..." ) ]
948+ [true] ...
949+ *[false] {\" \" }
950+ }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...") ]
951951 ExpectedSignatureTwo {
952952 leading_ellipsis : bool ,
953953 ty_or_sig : TyOrSig < ' tcx > ,
@@ -956,19 +956,19 @@ pub enum ActualImplExplNotes<'tcx> {
956956 lifetime_2 : usize ,
957957 } ,
958958 #[ note( "{$leading_ellipsis ->
959- [true] ...
960- *[false] {\" \" }
961- }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`..." ) ]
959+ [true] ...
960+ *[false] {\" \" }
961+ }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`...") ]
962962 ExpectedSignatureAny {
963963 leading_ellipsis : bool ,
964964 ty_or_sig : TyOrSig < ' tcx > ,
965965 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
966966 lifetime_1 : usize ,
967967 } ,
968968 #[ note( "{$leading_ellipsis ->
969- [true] ...
970- *[false] {\" \" }
971- }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`..." ) ]
969+ [true] ...
970+ *[false] {\" \" }
971+ }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`...") ]
972972 ExpectedSignatureSome {
973973 leading_ellipsis : bool ,
974974 ty_or_sig : TyOrSig < ' tcx > ,
@@ -977,19 +977,19 @@ pub enum ActualImplExplNotes<'tcx> {
977977 } ,
978978 #[ note(
979979 "{$leading_ellipsis ->
980- [true] ...
981- *[false] {\" \" }
982- }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`"
980+ [true] ...
981+ *[false] {\" \" }
982+ }closure with signature `{$ty_or_sig}` must implement `{$trait_path}`"
983983 ) ]
984984 ExpectedSignatureNothing {
985985 leading_ellipsis : bool ,
986986 ty_or_sig : TyOrSig < ' tcx > ,
987987 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
988988 } ,
989989 #[ note( "{$leading_ellipsis ->
990- [true] ...
991- *[false] {\" \" }
992- }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`..." ) ]
990+ [true] ...
991+ *[false] {\" \" }
992+ }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...") ]
993993 ExpectedPassiveTwo {
994994 leading_ellipsis : bool ,
995995 ty_or_sig : TyOrSig < ' tcx > ,
@@ -998,19 +998,19 @@ pub enum ActualImplExplNotes<'tcx> {
998998 lifetime_2 : usize ,
999999 } ,
10001000 #[ note( "{$leading_ellipsis ->
1001- [true] ...
1002- *[false] {\" \" }
1003- }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any lifetime `'{$lifetime_1}`..." ) ]
1001+ [true] ...
1002+ *[false] {\" \" }
1003+ }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any lifetime `'{$lifetime_1}`...") ]
10041004 ExpectedPassiveAny {
10051005 leading_ellipsis : bool ,
10061006 ty_or_sig : TyOrSig < ' tcx > ,
10071007 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
10081008 lifetime_1 : usize ,
10091009 } ,
10101010 #[ note( "{$leading_ellipsis ->
1011- [true] ...
1012- *[false] {\" \" }
1013- }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for some specific lifetime `'{$lifetime_1}`..." ) ]
1011+ [true] ...
1012+ *[false] {\" \" }
1013+ }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for some specific lifetime `'{$lifetime_1}`...") ]
10141014 ExpectedPassiveSome {
10151015 leading_ellipsis : bool ,
10161016 ty_or_sig : TyOrSig < ' tcx > ,
@@ -1019,19 +1019,19 @@ pub enum ActualImplExplNotes<'tcx> {
10191019 } ,
10201020 #[ note(
10211021 "{$leading_ellipsis ->
1022- [true] ...
1023- *[false] {\" \" }
1024- }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`"
1022+ [true] ...
1023+ *[false] {\" \" }
1024+ }`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`"
10251025 ) ]
10261026 ExpectedPassiveNothing {
10271027 leading_ellipsis : bool ,
10281028 ty_or_sig : TyOrSig < ' tcx > ,
10291029 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
10301030 } ,
10311031 #[ note( "{$leading_ellipsis ->
1032- [true] ...
1033- *[false] {\" \" }
1034- }`{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`..." ) ]
1032+ [true] ...
1033+ *[false] {\" \" }
1034+ }`{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...") ]
10351035 ExpectedOtherTwo {
10361036 leading_ellipsis : bool ,
10371037 ty_or_sig : TyOrSig < ' tcx > ,
@@ -1041,9 +1041,9 @@ pub enum ActualImplExplNotes<'tcx> {
10411041 } ,
10421042 #[ note(
10431043 "{$leading_ellipsis ->
1044- [true] ...
1045- *[false] {\" \" }
1046- }`{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`..."
1044+ [true] ...
1045+ *[false] {\" \" }
1046+ }`{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`..."
10471047 ) ]
10481048 ExpectedOtherAny {
10491049 leading_ellipsis : bool ,
@@ -1053,9 +1053,9 @@ pub enum ActualImplExplNotes<'tcx> {
10531053 } ,
10541054 #[ note(
10551055 "{$leading_ellipsis ->
1056- [true] ...
1057- *[false] {\" \" }
1058- }`{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`..."
1056+ [true] ...
1057+ *[false] {\" \" }
1058+ }`{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`..."
10591059 ) ]
10601060 ExpectedOtherSome {
10611061 leading_ellipsis : bool ,
@@ -1065,9 +1065,9 @@ pub enum ActualImplExplNotes<'tcx> {
10651065 } ,
10661066 #[ note(
10671067 "{$leading_ellipsis ->
1068- [true] ...
1069- *[false] {\" \" }
1070- }`{$ty_or_sig}` must implement `{$trait_path}`"
1068+ [true] ...
1069+ *[false] {\" \" }
1070+ }`{$ty_or_sig}` must implement `{$trait_path}`"
10711071 ) ]
10721072 ExpectedOtherNothing {
10731073 leading_ellipsis : bool ,
@@ -1076,9 +1076,9 @@ pub enum ActualImplExplNotes<'tcx> {
10761076 } ,
10771077 #[ note(
10781078 "...but it actually implements `{$trait_path}`{$has_lifetime ->
1079- [true] , for some specific lifetime `'{$lifetime}`
1080- *[false] {\" \" }
1081- }"
1079+ [true] , for some specific lifetime `'{$lifetime}`
1080+ *[false] {\" \" }
1081+ }"
10821082 ) ]
10831083 ButActuallyImplementsTrait {
10841084 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
@@ -1087,9 +1087,9 @@ pub enum ActualImplExplNotes<'tcx> {
10871087 } ,
10881088 #[ note(
10891089 "...but `{$trait_path}` is actually implemented for the type `{$ty}`{$has_lifetime ->
1090- [true] , for some specific lifetime `'{$lifetime}`
1091- *[false] {\" \" }
1092- }"
1090+ [true] , for some specific lifetime `'{$lifetime}`
1091+ *[false] {\" \" }
1092+ }"
10931093 ) ]
10941094 ButActuallyImplementedForTy {
10951095 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
@@ -1099,9 +1099,9 @@ pub enum ActualImplExplNotes<'tcx> {
10991099 } ,
11001100 #[ note(
11011101 "...but `{$ty}` actually implements `{$trait_path}`{$has_lifetime ->
1102- [true] , for some specific lifetime `'{$lifetime}`
1103- *[false] {\" \" }
1104- }"
1102+ [true] , for some specific lifetime `'{$lifetime}`
1103+ *[false] {\" \" }
1104+ }"
11051105 ) ]
11061106 ButActuallyTyImplements {
11071107 trait_path : Highlighted < ' tcx , TraitRefPrintOnlyTraitPath < ' tcx > > ,
@@ -1246,7 +1246,7 @@ pub struct TraitImplDiff {
12461246 pub trait_sp : Span ,
12471247 #[ note(
12481248 "expected signature `{$expected}`
1249- {\" \" }found signature `{$found}`"
1249+ {\" \" }found signature `{$found}`"
12501250 ) ]
12511251 pub note : ( ) ,
12521252 #[ subdiagnostic]
@@ -1940,10 +1940,12 @@ pub enum ObligationCauseFailureCode {
19401940 #[ primary_span]
19411941 span : Span ,
19421942 } ,
1943- #[ diag( "{$lang_item_name ->
1944- [panic_impl] `#[panic_handler]`
1945- *[lang_item_name] lang item `{$lang_item_name}`
1946- } function has wrong type" , code = E0308 ) ]
1943+ #[ diag(
1944+ "{$lang_item_name ->
1945+ [panic_impl] `#[panic_handler]`
1946+ *[lang_item_name] lang item `{$lang_item_name}`
1947+ } function has wrong type"
1948+ , code = E0308 ) ]
19471949 FnLangCorrectType {
19481950 #[ primary_span]
19491951 span : Span ,
0 commit comments