Skip to content

Commit 99c6009

Browse files
Reformat existing messages
1 parent 2d65a33 commit 99c6009

File tree

6 files changed

+122
-120
lines changed

6 files changed

+122
-120
lines changed

compiler/rustc_const_eval/src/errors.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ pub(crate) struct UnstableInStableExposed {
106106
pub is_function_call2: bool,
107107
#[suggestion(
108108
"if the {$is_function_call2 ->
109-
[true] caller
110-
*[false] function
111-
} is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`",
109+
[true] caller
110+
*[false] function
111+
} is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`",
112112
code = "#[rustc_const_unstable(feature = \"...\", issue = \"...\")]\n",
113113
applicability = "has-placeholders"
114114
)]
@@ -300,11 +300,11 @@ pub(crate) struct UnallowedHeapAllocations {
300300
#[primary_span]
301301
#[label(
302302
r#"allocation not allowed in {$kind ->
303-
[const] constant
304-
[static] static
305-
[const_fn] constant function
306-
*[other] {""}
307-
}s"#
303+
[const] constant
304+
[static] static
305+
[const_fn] constant function
306+
*[other] {""}
307+
}s"#
308308
)]
309309
pub span: Span,
310310
pub kind: ConstContext,
@@ -539,20 +539,20 @@ pub enum NonConstClosureNote {
539539
},
540540
#[note(
541541
r#"function pointers need an RFC before allowed to be called in {$kind ->
542-
[const] constant
543-
[static] static
544-
[const_fn] constant function
545-
*[other] {""}
546-
}s"#
542+
[const] constant
543+
[static] static
544+
[const_fn] constant function
545+
*[other] {""}
546+
}s"#
547547
)]
548548
FnPtr,
549549
#[note(
550550
r#"closures need an RFC before allowed to be called in {$kind ->
551-
[const] constant
552-
[static] static
553-
[const_fn] constant function
554-
*[other] {""}
555-
}s"#
551+
[const] constant
552+
[static] static
553+
[const_fn] constant function
554+
*[other] {""}
555+
}s"#
556556
)]
557557
Closure,
558558
}
@@ -608,11 +608,11 @@ pub struct LiveDrop<'tcx> {
608608
#[primary_span]
609609
#[label(
610610
r#"the destructor for this type cannot be evaluated in {$kind ->
611-
[const] constant
612-
[static] static
613-
[const_fn] constant function
614-
*[other] {""}
615-
}s"#
611+
[const] constant
612+
[static] static
613+
[const_fn] constant function
614+
*[other] {""}
615+
}s"#
616616
)]
617617
pub span: Span,
618618
pub kind: ConstContext,

compiler/rustc_mir_build/src/errors.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ pub(crate) struct UnsafeOpInUnsafeFnCallToFunctionWithRequiresUnsafe {
198198
pub(crate) missing_target_features: DiagArgValue,
199199
pub(crate) missing_target_features_count: usize,
200200
#[note("the {$build_target_features} target {$build_target_features_count ->
201-
[1] feature
202-
*[count] features
201+
[1] feature
202+
*[count] features
203203
} being enabled in the build configuration does not remove the requirement to list {$build_target_features_count ->
204-
[1] it
205-
*[count] them
206-
} in `#[target_feature]`")]
204+
[1] it
205+
*[count] them
206+
} in `#[target_feature]`")]
207207
pub(crate) note: bool,
208208
pub(crate) build_target_features: DiagArgValue,
209209
pub(crate) build_target_features_count: usize,
@@ -532,12 +532,12 @@ pub(crate) struct CallToFunctionWithRequiresUnsafe {
532532
pub(crate) missing_target_features: DiagArgValue,
533533
pub(crate) missing_target_features_count: usize,
534534
#[note("the {$build_target_features} target {$build_target_features_count ->
535-
[1] feature
536-
*[count] features
537-
} being enabled in the build configuration does not remove the requirement to list {$build_target_features_count ->
538-
[1] it
539-
*[count] them
540-
} in `#[target_feature]`")]
535+
[1] feature
536+
*[count] features
537+
} being enabled in the build configuration does not remove the requirement to list {$build_target_features_count ->
538+
[1] it
539+
*[count] them
540+
} in `#[target_feature]`")]
541541
pub(crate) note: bool,
542542
pub(crate) build_target_features: DiagArgValue,
543543
pub(crate) build_target_features_count: usize,
@@ -1264,9 +1264,9 @@ pub(crate) struct InterpretedAsConstSugg {
12641264
pub(crate) enum SuggestLet {
12651265
#[multipart_suggestion(
12661266
"you might want to use `if let` to ignore the {$count ->
1267-
[one] variant that isn't
1268-
*[other] variants that aren't
1269-
} matched",
1267+
[one] variant that isn't
1268+
*[other] variants that aren't
1269+
} matched",
12701270
applicability = "has-placeholders"
12711271
)]
12721272
If {
@@ -1278,9 +1278,9 @@ pub(crate) enum SuggestLet {
12781278
},
12791279
#[suggestion(
12801280
"you might want to use `let...else` to handle the {$count ->
1281-
[one] variant that isn't
1282-
*[other] variants that aren't
1283-
} matched",
1281+
[one] variant that isn't
1282+
*[other] variants that aren't
1283+
} matched",
12841284
code = " else {{ todo!() }}",
12851285
applicability = "has-placeholders"
12861286
)]

compiler/rustc_monomorphize/src/errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ pub(crate) struct AbiRequiredTargetFeature<'a> {
162162
#[primary_span]
163163
#[label(
164164
"function {$is_call ->
165-
[true] called
166-
*[false] defined
167-
} here"
165+
[true] called
166+
*[false] defined
167+
} here"
168168
)]
169169
pub span: Span,
170170
pub required_feature: &'a str,

compiler/rustc_parse/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ pub(crate) enum MatchArmBodyWithoutBracesSugg {
11511151
#[multipart_suggestion(
11521152
"surround the {$num_statements ->
11531153
[one] statement
1154-
*[other] statements
1154+
*[other] statements
11551155
} with a body",
11561156
applicability = "machine-applicable"
11571157
)]

compiler/rustc_passes/src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,8 +1417,8 @@ pub(crate) struct DuplicateEiiImpls {
14171417
pub second_crate: Symbol,
14181418

14191419
#[note("in addition to these two, { $num_additional_crates ->
1420-
[one] another implementation was found in crate {$additional_crate_names}
1421-
*[other] more implementations were also found in the following crates: {$additional_crate_names}
1420+
[one] another implementation was found in crate {$additional_crate_names}
1421+
*[other] more implementations were also found in the following crates: {$additional_crate_names}
14221422
}")]
14231423
pub additional_crates: Option<()>,
14241424

0 commit comments

Comments
 (0)