1use rustc_errors::codes::*;
2use rustc_errors::{
3 Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan, SingleLabelManySpans,
4 Subdiagnostic,
5};
6use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
7use rustc_span::{Ident, Span, Symbol};
8
9#[derive(const _: () =
{
impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for AvoidIntelSyntax
{
#[track_caller]
fn decorate_lint<'__b>(self,
diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
match self {
AvoidIntelSyntax => {
diag.primary_message(crate::fluent_generated::builtin_macros_avoid_intel_syntax);
;
diag
}
};
}
}
};LintDiagnostic)]
10#[diag(builtin_macros_avoid_intel_syntax)]
11pub(crate) struct AvoidIntelSyntax;
12
13#[derive(const _: () =
{
impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for AvoidAttSyntax {
#[track_caller]
fn decorate_lint<'__b>(self,
diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
match self {
AvoidAttSyntax => {
diag.primary_message(crate::fluent_generated::builtin_macros_avoid_att_syntax);
;
diag
}
};
}
}
};LintDiagnostic)]
14#[diag(builtin_macros_avoid_att_syntax)]
15pub(crate) struct AvoidAttSyntax;
16
17#[derive(const _: () =
{
impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for
IncompleteInclude {
#[track_caller]
fn decorate_lint<'__b>(self,
diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
match self {
IncompleteInclude => {
diag.primary_message(crate::fluent_generated::builtin_macros_incomplete_include);
;
diag
}
};
}
}
};LintDiagnostic)]
18#[diag(builtin_macros_incomplete_include)]
19pub(crate) struct IncompleteInclude;
20
21#[derive(const _: () =
{
impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for
UnnameableTestItems {
#[track_caller]
fn decorate_lint<'__b>(self,
diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
match self {
UnnameableTestItems => {
diag.primary_message(crate::fluent_generated::builtin_macros_unnameable_test_items);
;
diag
}
};
}
}
};LintDiagnostic)]
22#[diag(builtin_macros_unnameable_test_items)]
23pub(crate) struct UnnameableTestItems;
24
25#[derive(const _: () =
{
impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for
DuplicateMacroAttribute {
#[track_caller]
fn decorate_lint<'__b>(self,
diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
match self {
DuplicateMacroAttribute => {
diag.primary_message(crate::fluent_generated::builtin_macros_duplicate_macro_attribute);
;
diag
}
};
}
}
};LintDiagnostic)]
26#[diag(builtin_macros_duplicate_macro_attribute)]
27pub(crate) struct DuplicateMacroAttribute;
28
29#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
RequiresCfgPattern where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
RequiresCfgPattern { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_requires_cfg_pattern);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
30#[diag(builtin_macros_requires_cfg_pattern)]
31pub(crate) struct RequiresCfgPattern {
32 #[primary_span]
33 #[label]
34 pub(crate) span: Span,
35}
36
37#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for OneCfgPattern
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
OneCfgPattern { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_expected_one_cfg_pattern);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
38#[diag(builtin_macros_expected_one_cfg_pattern)]
39pub(crate) struct OneCfgPattern {
40 #[primary_span]
41 pub(crate) span: Span,
42}
43
44#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AllocErrorMustBeFn where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AllocErrorMustBeFn { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_alloc_error_must_be_fn);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
45#[diag(builtin_macros_alloc_error_must_be_fn)]
46pub(crate) struct AllocErrorMustBeFn {
47 #[primary_span]
48 pub(crate) span: Span,
49}
50
51#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AssertRequiresBoolean where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AssertRequiresBoolean { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_assert_requires_boolean);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
52#[diag(builtin_macros_assert_requires_boolean)]
53pub(crate) struct AssertRequiresBoolean {
54 #[primary_span]
55 #[label]
56 pub(crate) span: Span,
57}
58
59#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AssertRequiresExpression where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AssertRequiresExpression {
span: __binding_0, token: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_assert_requires_expression);
let __code_0 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
})].into_iter();
;
diag.span(__binding_0);
diag.span_suggestions_with_style(__binding_1,
crate::fluent_generated::_subdiag::suggestion, __code_0,
rustc_errors::Applicability::MaybeIncorrect,
rustc_errors::SuggestionStyle::ShowCode);
diag
}
}
}
}
};Diagnostic)]
60#[diag(builtin_macros_assert_requires_expression)]
61pub(crate) struct AssertRequiresExpression {
62 #[primary_span]
63 pub(crate) span: Span,
64 #[suggestion(code = "", applicability = "maybe-incorrect")]
65 pub(crate) token: Span,
66}
67
68#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AssertMissingComma where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AssertMissingComma { span: __binding_0, comma: __binding_1 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_assert_missing_comma);
let __code_1 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(", "))
})].into_iter();
;
diag.span(__binding_0);
diag.span_suggestions_with_style(__binding_1,
crate::fluent_generated::_subdiag::suggestion, __code_1,
rustc_errors::Applicability::MaybeIncorrect,
rustc_errors::SuggestionStyle::HideCodeInline);
diag
}
}
}
}
};Diagnostic)]
69#[diag(builtin_macros_assert_missing_comma)]
70pub(crate) struct AssertMissingComma {
71 #[primary_span]
72 pub(crate) span: Span,
73 #[suggestion(code = ", ", applicability = "maybe-incorrect", style = "short")]
74 pub(crate) comma: Span,
75}
76
77#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
CfgAccessibleInvalid where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
CfgAccessibleInvalid::UnspecifiedPath(__binding_0) => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_accessible_unspecified_path);
;
diag.span(__binding_0);
diag
}
CfgAccessibleInvalid::MultiplePaths(__binding_0) => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_accessible_multiple_paths);
;
diag.span(__binding_0);
diag
}
CfgAccessibleInvalid::LiteralPath(__binding_0) => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_accessible_literal_path);
;
diag.span(__binding_0);
diag
}
CfgAccessibleInvalid::HasArguments(__binding_0) => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_accessible_has_args);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
78pub(crate) enum CfgAccessibleInvalid {
79 #[diag(builtin_macros_cfg_accessible_unspecified_path)]
80 UnspecifiedPath(#[primary_span] Span),
81 #[diag(builtin_macros_cfg_accessible_multiple_paths)]
82 MultiplePaths(#[primary_span] Span),
83 #[diag(builtin_macros_cfg_accessible_literal_path)]
84 LiteralPath(#[primary_span] Span),
85 #[diag(builtin_macros_cfg_accessible_has_args)]
86 HasArguments(#[primary_span] Span),
87}
88
89#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
CfgAccessibleIndeterminate where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
CfgAccessibleIndeterminate { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_accessible_indeterminate);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
90#[diag(builtin_macros_cfg_accessible_indeterminate)]
91pub(crate) struct CfgAccessibleIndeterminate {
92 #[primary_span]
93 pub(crate) span: Span,
94}
95
96#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ConcatMissingLiteral where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatMissingLiteral { spans: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_missing_literal);
diag.note(crate::fluent_generated::_subdiag::note);
;
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
97#[diag(builtin_macros_concat_missing_literal)]
98#[note]
99pub(crate) struct ConcatMissingLiteral {
100 #[primary_span]
101 pub(crate) spans: Vec<Span>,
102}
103
104#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for ConcatBytestr
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytestr { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytestr);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
105#[diag(builtin_macros_concat_bytestr)]
106pub(crate) struct ConcatBytestr {
107 #[primary_span]
108 pub(crate) span: Span,
109}
110
111#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for ConcatCStrLit
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatCStrLit { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_c_str_lit);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
112#[diag(builtin_macros_concat_c_str_lit)]
113pub(crate) struct ConcatCStrLit {
114 #[primary_span]
115 pub(crate) span: Span,
116}
117
118#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ExportMacroRules where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ExportMacroRules { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_export_macro_rules);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
119#[diag(builtin_macros_export_macro_rules)]
120pub(crate) struct ExportMacroRules {
121 #[primary_span]
122 pub(crate) span: Span,
123}
124
125#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for ProcMacro
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ProcMacro { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_proc_macro);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
126#[diag(builtin_macros_proc_macro)]
127pub(crate) struct ProcMacro {
128 #[primary_span]
129 pub(crate) span: Span,
130}
131
132#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for TraceMacros
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TraceMacros { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_trace_macros);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
133#[diag(builtin_macros_trace_macros)]
134pub(crate) struct TraceMacros {
135 #[primary_span]
136 pub(crate) span: Span,
137}
138
139#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for BenchSig where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
BenchSig { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_bench_sig);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
140#[diag(builtin_macros_bench_sig)]
141pub(crate) struct BenchSig {
142 #[primary_span]
143 pub(crate) span: Span,
144}
145
146#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AllocMustStatics where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AllocMustStatics { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_alloc_must_statics);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
147#[diag(builtin_macros_alloc_must_statics)]
148pub(crate) struct AllocMustStatics {
149 #[primary_span]
150 pub(crate) span: Span,
151}
152
153pub(crate) use autodiff::*;
154
155mod autodiff {
156 use super::*;
157 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffMissingConfig where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffMissingConfig { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_missing_config);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
158 #[diag(builtin_macros_autodiff_missing_config)]
159 pub(crate) struct AutoDiffMissingConfig {
160 #[primary_span]
161 pub(crate) span: Span,
162 }
163 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffUnknownActivity where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffUnknownActivity {
span: __binding_0, act: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_unknown_activity);
;
diag.arg("act", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
164 #[diag(builtin_macros_autodiff_unknown_activity)]
165 pub(crate) struct AutoDiffUnknownActivity {
166 #[primary_span]
167 pub(crate) span: Span,
168 pub(crate) act: String,
169 }
170 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffInvalidTypeForActivity where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffInvalidTypeForActivity {
span: __binding_0, act: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_ty_activity);
;
diag.arg("act", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
171 #[diag(builtin_macros_autodiff_ty_activity)]
172 pub(crate) struct AutoDiffInvalidTypeForActivity {
173 #[primary_span]
174 pub(crate) span: Span,
175 pub(crate) act: String,
176 }
177 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffInvalidNumberActivities where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffInvalidNumberActivities {
span: __binding_0, expected: __binding_1, found: __binding_2
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_number_activities);
;
diag.arg("expected", __binding_1);
diag.arg("found", __binding_2);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
178 #[diag(builtin_macros_autodiff_number_activities)]
179 pub(crate) struct AutoDiffInvalidNumberActivities {
180 #[primary_span]
181 pub(crate) span: Span,
182 pub(crate) expected: usize,
183 pub(crate) found: usize,
184 }
185 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffInvalidApplicationModeAct where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffInvalidApplicationModeAct {
span: __binding_0, mode: __binding_1, act: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_mode_activity);
;
diag.arg("mode", __binding_1);
diag.arg("act", __binding_2);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
186 #[diag(builtin_macros_autodiff_mode_activity)]
187 pub(crate) struct AutoDiffInvalidApplicationModeAct {
188 #[primary_span]
189 pub(crate) span: Span,
190 pub(crate) mode: String,
191 pub(crate) act: String,
192 }
193
194 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffInvalidRetAct where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffInvalidRetAct {
span: __binding_0, mode: __binding_1, act: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_ret_activity);
;
diag.arg("mode", __binding_1);
diag.arg("act", __binding_2);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
195 #[diag(builtin_macros_autodiff_ret_activity)]
196 pub(crate) struct AutoDiffInvalidRetAct {
197 #[primary_span]
198 pub(crate) span: Span,
199 pub(crate) mode: String,
200 pub(crate) act: String,
201 }
202
203 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffInvalidWidth where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffInvalidWidth { span: __binding_0, width: __binding_1
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff_width);
;
diag.arg("width", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
204 #[diag(builtin_macros_autodiff_width)]
205 pub(crate) struct AutoDiffInvalidWidth {
206 #[primary_span]
207 pub(crate) span: Span,
208 pub(crate) width: u128,
209 }
210
211 #[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AutoDiffInvalidApplication where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AutoDiffInvalidApplication { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_autodiff);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
212 #[diag(builtin_macros_autodiff)]
213 pub(crate) struct AutoDiffInvalidApplication {
214 #[primary_span]
215 pub(crate) span: Span,
216 }
217}
218
219#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ConcatBytesInvalid where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytesInvalid {
span: __binding_0,
lit_kind: __binding_1,
sugg: __binding_2,
cs_note: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytes_invalid);
;
diag.arg("lit_kind", __binding_1);
diag.span(__binding_0);
if let Some(__binding_2) = __binding_2 {
diag.subdiagnostic(__binding_2);
}
if let Some(__binding_3) = __binding_3 {
diag.note(crate::fluent_generated::builtin_macros_c_str_note);
}
diag
}
}
}
}
};Diagnostic)]
220#[diag(builtin_macros_concat_bytes_invalid)]
221pub(crate) struct ConcatBytesInvalid {
222 #[primary_span]
223 pub(crate) span: Span,
224 pub(crate) lit_kind: &'static str,
225 #[subdiagnostic]
226 pub(crate) sugg: Option<ConcatBytesInvalidSuggestion>,
227 #[note(builtin_macros_c_str_note)]
228 pub(crate) cs_note: Option<()>,
229}
230
231#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for ConcatBytesInvalidSuggestion {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
ConcatBytesInvalidSuggestion::CharLit {
span: __binding_0, snippet: __binding_1 } => {
let __code_2 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("b{0}", __binding_1))
})].into_iter();
diag.store_args();
diag.arg("snippet", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_byte_char);
diag.span_suggestions_with_style(__binding_0, __message,
__code_2, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
ConcatBytesInvalidSuggestion::StrLit {
span: __binding_0, snippet: __binding_1 } => {
let __code_3 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("b{0}", __binding_1))
})].into_iter();
diag.store_args();
diag.arg("snippet", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_byte_str);
diag.span_suggestions_with_style(__binding_0, __message,
__code_3, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
ConcatBytesInvalidSuggestion::CStrLit {
span: __binding_0, as_bstr: __binding_1 } => {
let __code_4 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", __binding_1))
})].into_iter();
diag.store_args();
diag.arg("as_bstr", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_c_str_note);
diag.span_note(__binding_0, __message);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_c_str);
diag.span_suggestions_with_style(__binding_0, __message,
__code_4, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
ConcatBytesInvalidSuggestion::IntLit {
span: __binding_0, snippet: __binding_1 } => {
let __code_5 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("[{0}]", __binding_1))
})].into_iter();
diag.store_args();
diag.arg("snippet", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_number_array);
diag.span_suggestions_with_style(__binding_0, __message,
__code_5, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
232pub(crate) enum ConcatBytesInvalidSuggestion {
233 #[suggestion(
234 builtin_macros_byte_char,
235 code = "b{snippet}",
236 applicability = "machine-applicable"
237 )]
238 CharLit {
239 #[primary_span]
240 span: Span,
241 snippet: String,
242 },
243 #[suggestion(
244 builtin_macros_byte_str,
245 code = "b{snippet}",
246 applicability = "machine-applicable"
247 )]
248 StrLit {
249 #[primary_span]
250 span: Span,
251 snippet: String,
252 },
253 #[note(builtin_macros_c_str_note)]
254 #[suggestion(builtin_macros_c_str, code = "{as_bstr}", applicability = "machine-applicable")]
255 CStrLit {
256 #[primary_span]
257 span: Span,
258 as_bstr: String,
259 },
260 #[suggestion(
261 builtin_macros_number_array,
262 code = "[{snippet}]",
263 applicability = "machine-applicable"
264 )]
265 IntLit {
266 #[primary_span]
267 span: Span,
268 snippet: String,
269 },
270}
271
272#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for ConcatBytesOob
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytesOob { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytes_oob);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
273#[diag(builtin_macros_concat_bytes_oob)]
274pub(crate) struct ConcatBytesOob {
275 #[primary_span]
276 pub(crate) span: Span,
277}
278
279#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ConcatBytesNonU8 where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytesNonU8 { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytes_non_u8);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
280#[diag(builtin_macros_concat_bytes_non_u8)]
281pub(crate) struct ConcatBytesNonU8 {
282 #[primary_span]
283 pub(crate) span: Span,
284}
285
286#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ConcatBytesMissingLiteral where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytesMissingLiteral { spans: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytes_missing_literal);
diag.note(crate::fluent_generated::_subdiag::note);
;
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
287#[diag(builtin_macros_concat_bytes_missing_literal)]
288#[note]
289pub(crate) struct ConcatBytesMissingLiteral {
290 #[primary_span]
291 pub(crate) spans: Vec<Span>,
292}
293
294#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ConcatBytesArray where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytesArray { span: __binding_0, bytestr: __binding_1 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytes_array);
;
diag.span(__binding_0);
if __binding_1 {
diag.note(crate::fluent_generated::_subdiag::note);
}
if __binding_1 {
diag.help(crate::fluent_generated::_subdiag::help);
}
diag
}
}
}
}
};Diagnostic)]
295#[diag(builtin_macros_concat_bytes_array)]
296pub(crate) struct ConcatBytesArray {
297 #[primary_span]
298 pub(crate) span: Span,
299 #[note]
300 #[help]
301 pub(crate) bytestr: bool,
302}
303
304#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ConcatBytesBadRepeat where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ConcatBytesBadRepeat { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_concat_bytes_bad_repeat);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
305#[diag(builtin_macros_concat_bytes_bad_repeat)]
306pub(crate) struct ConcatBytesBadRepeat {
307 #[primary_span]
308 pub(crate) span: Span,
309}
310
311#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
BadDeriveTarget where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
BadDeriveTarget { span: __binding_0, item: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_bad_derive_target);
diag.code(E0774);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag.span_label(__binding_1,
crate::fluent_generated::builtin_macros_label2);
diag
}
}
}
}
};Diagnostic)]
312#[diag(builtin_macros_bad_derive_target, code = E0774)]
313pub(crate) struct BadDeriveTarget {
314 #[primary_span]
315 #[label]
316 pub(crate) span: Span,
317 #[label(builtin_macros_label2)]
318 pub(crate) item: Span,
319}
320
321#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
TestsNotSupport where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TestsNotSupport {} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_tests_not_support);
;
diag
}
}
}
}
};Diagnostic)]
322#[diag(builtin_macros_tests_not_support)]
323pub(crate) struct TestsNotSupport {}
324
325#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for BadDeriveLit
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
BadDeriveLit { span: __binding_0, help: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_unexpected_lit);
diag.code(E0777);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag.subdiagnostic(__binding_1);
diag
}
}
}
}
};Diagnostic)]
326#[diag(builtin_macros_unexpected_lit, code = E0777)]
327pub(crate) struct BadDeriveLit {
328 #[primary_span]
329 #[label]
330 pub(crate) span: Span,
331 #[subdiagnostic]
332 pub help: BadDeriveLitHelp,
333}
334
335#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for BadDeriveLitHelp {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
BadDeriveLitHelp::StrLit { sym: __binding_0 } => {
diag.store_args();
diag.arg("sym", __binding_0);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_str_lit);
diag.help(__message);
diag.restore_args();
}
BadDeriveLitHelp::Other => {
diag.store_args();
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_other);
diag.help(__message);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
336pub(crate) enum BadDeriveLitHelp {
337 #[help(builtin_macros_str_lit)]
338 StrLit { sym: Symbol },
339 #[help(builtin_macros_other)]
340 Other,
341}
342
343#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
DerivePathArgsList where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DerivePathArgsList { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_derive_path_args_list);
let __code_6 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
})].into_iter();
;
diag.span_suggestions_with_style(__binding_0,
crate::fluent_generated::_subdiag::suggestion, __code_6,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
344#[diag(builtin_macros_derive_path_args_list)]
345pub(crate) struct DerivePathArgsList {
346 #[suggestion(code = "", applicability = "machine-applicable")]
347 #[primary_span]
348 pub(crate) span: Span,
349}
350
351#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
DerivePathArgsValue where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DerivePathArgsValue { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_derive_path_args_value);
let __code_7 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
})].into_iter();
;
diag.span_suggestions_with_style(__binding_0,
crate::fluent_generated::_subdiag::suggestion, __code_7,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
352#[diag(builtin_macros_derive_path_args_value)]
353pub(crate) struct DerivePathArgsValue {
354 #[suggestion(code = "", applicability = "machine-applicable")]
355 #[primary_span]
356 pub(crate) span: Span,
357}
358
359#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
NoDefaultVariant where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
NoDefaultVariant {
span: __binding_0,
item_span: __binding_1,
suggs: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_no_default_variant);
diag.code(E0665);
;
diag.span(__binding_0);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
for __binding_2 in __binding_2 {
diag.subdiagnostic(__binding_2);
}
diag
}
}
}
}
};Diagnostic)]
360#[diag(builtin_macros_no_default_variant, code = E0665)]
361pub(crate) struct NoDefaultVariant {
362 #[primary_span]
363 pub(crate) span: Span,
364 #[label]
365 pub(crate) item_span: Span,
366 #[subdiagnostic]
367 pub(crate) suggs: Vec<NoDefaultVariantSugg>,
368}
369
370#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for NoDefaultVariantSugg {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
NoDefaultVariantSugg { span: __binding_0 } => {
let __code_8 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("#[default] "))
})].into_iter();
diag.store_args();
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_suggestion);
diag.span_suggestions_with_style(__binding_0, __message,
__code_8, rustc_errors::Applicability::MaybeIncorrect,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
371#[suggestion(builtin_macros_suggestion, code = "#[default] ", applicability = "maybe-incorrect")]
372pub(crate) struct NoDefaultVariantSugg {
373 #[primary_span]
374 pub(crate) span: Span,
375}
376
377#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
MultipleDefaults where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
MultipleDefaults {
span: __binding_0,
first: __binding_1,
additional: __binding_2,
suggs: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_multiple_defaults);
diag.note(crate::fluent_generated::_subdiag::note);
;
diag.span(__binding_0);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
for __binding_2 in __binding_2 {
diag.span_label(__binding_2,
crate::fluent_generated::builtin_macros_additional);
}
for __binding_3 in __binding_3 {
diag.subdiagnostic(__binding_3);
}
diag
}
}
}
}
};Diagnostic)]
378#[diag(builtin_macros_multiple_defaults)]
379#[note]
380pub(crate) struct MultipleDefaults {
381 #[primary_span]
382 pub(crate) span: Span,
383 #[label]
384 pub(crate) first: Span,
385 #[label(builtin_macros_additional)]
386 pub additional: Vec<Span>,
387 #[subdiagnostic]
388 pub suggs: Vec<MultipleDefaultsSugg>,
389}
390
391#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for MultipleDefaultsSugg {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
MultipleDefaultsSugg {
spans: __binding_0, ident: __binding_1 } => {
let mut suggestions = Vec::new();
let __code_9 =
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
});
for __binding_0 in __binding_0 {
suggestions.push((__binding_0, __code_9.clone()));
}
diag.store_args();
diag.arg("ident", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_suggestion);
diag.multipart_suggestion_with_style(__message, suggestions,
rustc_errors::Applicability::MaybeIncorrect,
rustc_errors::SuggestionStyle::CompletelyHidden);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
392#[multipart_suggestion(
393 builtin_macros_suggestion,
394 applicability = "maybe-incorrect",
395 style = "tool-only"
396)]
397pub(crate) struct MultipleDefaultsSugg {
398 #[suggestion_part(code = "")]
399 pub(crate) spans: Vec<Span>,
400 pub(crate) ident: Ident,
401}
402
403#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for NonUnitDefault
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
NonUnitDefault { span: __binding_0, post: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_non_unit_default);
diag.help(crate::fluent_generated::_subdiag::help);
;
diag.arg("post", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
404#[diag(builtin_macros_non_unit_default)]
405#[help]
406pub(crate) struct NonUnitDefault {
407 #[primary_span]
408 pub(crate) span: Span,
409 pub(crate) post: &'static str,
410}
411
412#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
NonExhaustiveDefault where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
NonExhaustiveDefault {
span: __binding_0, non_exhaustive: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_non_exhaustive_default);
diag.help(crate::fluent_generated::_subdiag::help);
;
diag.span(__binding_0);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
413#[diag(builtin_macros_non_exhaustive_default)]
414#[help]
415pub(crate) struct NonExhaustiveDefault {
416 #[primary_span]
417 pub(crate) span: Span,
418 #[label]
419 pub(crate) non_exhaustive: Span,
420}
421
422#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
MultipleDefaultAttrs where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
MultipleDefaultAttrs {
span: __binding_0,
first: __binding_1,
first_rest: __binding_2,
rest: __binding_3,
only_one: __binding_4,
sugg: __binding_5 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_multiple_default_attrs);
diag.note(crate::fluent_generated::_subdiag::note);
;
diag.arg("only_one", __binding_4);
diag.span(__binding_0);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
diag.span_label(__binding_2,
crate::fluent_generated::builtin_macros_label_again);
diag.span_help(__binding_3,
crate::fluent_generated::_subdiag::help);
diag.subdiagnostic(__binding_5);
diag
}
}
}
}
};Diagnostic)]
423#[diag(builtin_macros_multiple_default_attrs)]
424#[note]
425pub(crate) struct MultipleDefaultAttrs {
426 #[primary_span]
427 pub(crate) span: Span,
428 #[label]
429 pub(crate) first: Span,
430 #[label(builtin_macros_label_again)]
431 pub(crate) first_rest: Span,
432 #[help]
433 pub(crate) rest: MultiSpan,
434 pub(crate) only_one: bool,
435 #[subdiagnostic]
436 pub(crate) sugg: MultipleDefaultAttrsSugg,
437}
438
439#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for MultipleDefaultAttrsSugg {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
MultipleDefaultAttrsSugg { spans: __binding_0 } => {
let mut suggestions = Vec::new();
let __code_10 =
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
});
for __binding_0 in __binding_0 {
suggestions.push((__binding_0, __code_10.clone()));
}
diag.store_args();
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_help);
diag.multipart_suggestion_with_style(__message, suggestions,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::CompletelyHidden);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
440#[multipart_suggestion(
441 builtin_macros_help,
442 applicability = "machine-applicable",
443 style = "tool-only"
444)]
445pub(crate) struct MultipleDefaultAttrsSugg {
446 #[suggestion_part(code = "")]
447 pub(crate) spans: Vec<Span>,
448}
449
450#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for DefaultHasArg
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DefaultHasArg { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_default_arg);
let __code_11 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("#[default]"))
})].into_iter();
;
diag.span(__binding_0);
diag.span_suggestions_with_style(__binding_0,
crate::fluent_generated::_subdiag::suggestion, __code_11,
rustc_errors::Applicability::MaybeIncorrect,
rustc_errors::SuggestionStyle::HideCodeAlways);
diag
}
}
}
}
};Diagnostic)]
451#[diag(builtin_macros_default_arg)]
452pub(crate) struct DefaultHasArg {
453 #[primary_span]
454 #[suggestion(code = "#[default]", style = "hidden", applicability = "maybe-incorrect")]
455 pub(crate) span: Span,
456}
457
458#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
DeriveFromWrongTarget<'a> where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DeriveFromWrongTarget { span: __binding_0, kind: __binding_1
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_derive_from_wrong_target);
diag.note(crate::fluent_generated::builtin_macros_derive_from_usage_note);
;
diag.arg("kind", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
459#[diag(builtin_macros_derive_from_wrong_target)]
460#[note(builtin_macros_derive_from_usage_note)]
461pub(crate) struct DeriveFromWrongTarget<'a> {
462 #[primary_span]
463 pub(crate) span: MultiSpan,
464 pub(crate) kind: &'a str,
465}
466
467#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
DeriveFromWrongFieldCount where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DeriveFromWrongFieldCount {
span: __binding_0, multiple_fields: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_derive_from_wrong_field_count);
diag.note(crate::fluent_generated::builtin_macros_derive_from_usage_note);
;
diag.arg("multiple_fields", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
468#[diag(builtin_macros_derive_from_wrong_field_count)]
469#[note(builtin_macros_derive_from_usage_note)]
470pub(crate) struct DeriveFromWrongFieldCount {
471 #[primary_span]
472 pub(crate) span: MultiSpan,
473 pub(crate) multiple_fields: bool,
474}
475
476#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
DeriveMacroCall where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DeriveMacroCall { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_derive_macro_call);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
477#[diag(builtin_macros_derive_macro_call)]
478pub(crate) struct DeriveMacroCall {
479 #[primary_span]
480 pub(crate) span: Span,
481}
482
483#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for DeriveUnion
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
DeriveUnion { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cannot_derive_union);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
484#[diag(builtin_macros_cannot_derive_union)]
485pub(crate) struct DeriveUnion {
486 #[primary_span]
487 pub(crate) span: Span,
488}
489
490#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for EnvTakesArgs
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EnvTakesArgs { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_env_takes_args);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
491#[diag(builtin_macros_env_takes_args)]
492pub(crate) struct EnvTakesArgs {
493 #[primary_span]
494 pub(crate) span: Span,
495}
496
497pub(crate) struct EnvNotDefinedWithUserMessage {
498 pub(crate) span: Span,
499 pub(crate) msg_from_user: Symbol,
500}
501
502impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for EnvNotDefinedWithUserMessage {
504 #[track_caller]
505 fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
506 #[expect(
507 rustc::untranslatable_diagnostic,
508 reason = "cannot translate user-provided messages"
509 )]
510 let mut diag = Diag::new(dcx, level, self.msg_from_user.to_string());
511 diag.span(self.span);
512 diag
513 }
514}
515
516#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
EnvNotDefined<'a> where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EnvNotDefined::CargoEnvVar {
span: __binding_0, var: __binding_1, var_expr: __binding_2 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_env_not_defined);
diag.help(crate::fluent_generated::builtin_macros_cargo);
;
diag.arg("var", __binding_1);
diag.arg("var_expr", __binding_2);
diag.span(__binding_0);
diag
}
EnvNotDefined::CargoEnvVarTypo {
span: __binding_0,
var: __binding_1,
suggested_var: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_env_not_defined);
diag.help(crate::fluent_generated::builtin_macros_cargo_typo);
;
diag.arg("var", __binding_1);
diag.arg("suggested_var", __binding_2);
diag.span(__binding_0);
diag
}
EnvNotDefined::CustomEnvVar {
span: __binding_0, var: __binding_1, var_expr: __binding_2 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_env_not_defined);
diag.help(crate::fluent_generated::builtin_macros_custom);
;
diag.arg("var", __binding_1);
diag.arg("var_expr", __binding_2);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
517pub(crate) enum EnvNotDefined<'a> {
518 #[diag(builtin_macros_env_not_defined)]
519 #[help(builtin_macros_cargo)]
520 CargoEnvVar {
521 #[primary_span]
522 span: Span,
523 var: Symbol,
524 var_expr: &'a rustc_ast::Expr,
525 },
526 #[diag(builtin_macros_env_not_defined)]
527 #[help(builtin_macros_cargo_typo)]
528 CargoEnvVarTypo {
529 #[primary_span]
530 span: Span,
531 var: Symbol,
532 suggested_var: Symbol,
533 },
534 #[diag(builtin_macros_env_not_defined)]
535 #[help(builtin_macros_custom)]
536 CustomEnvVar {
537 #[primary_span]
538 span: Span,
539 var: Symbol,
540 var_expr: &'a rustc_ast::Expr,
541 },
542}
543
544#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for EnvNotUnicode
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EnvNotUnicode { span: __binding_0, var: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_env_not_unicode);
;
diag.arg("var", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
545#[diag(builtin_macros_env_not_unicode)]
546pub(crate) struct EnvNotUnicode {
547 #[primary_span]
548 pub(crate) span: Span,
549 pub(crate) var: Symbol,
550}
551
552#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatRequiresString where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatRequiresString { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_requires_string);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
553#[diag(builtin_macros_format_requires_string)]
554pub(crate) struct FormatRequiresString {
555 #[primary_span]
556 pub(crate) span: Span,
557}
558
559#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatDuplicateArg where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatDuplicateArg {
span: __binding_0,
prev: __binding_1,
duplicate: __binding_2,
ident: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_duplicate_arg);
;
diag.arg("ident", __binding_3);
diag.span(__binding_0);
diag.span_label(__binding_1,
crate::fluent_generated::builtin_macros_label1);
diag.span_label(__binding_2,
crate::fluent_generated::builtin_macros_label2);
diag
}
}
}
}
};Diagnostic)]
560#[diag(builtin_macros_format_duplicate_arg)]
561pub(crate) struct FormatDuplicateArg {
562 #[primary_span]
563 pub(crate) span: Span,
564 #[label(builtin_macros_label1)]
565 pub(crate) prev: Span,
566 #[label(builtin_macros_label2)]
567 pub(crate) duplicate: Span,
568 pub(crate) ident: Ident,
569}
570
571#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
PositionalAfterNamed where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
PositionalAfterNamed { span: __binding_0, args: __binding_1
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_positional_after_named);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
for __binding_1 in __binding_1 {
diag.span_label(__binding_1,
crate::fluent_generated::builtin_macros_named_args);
}
diag
}
}
}
}
};Diagnostic)]
572#[diag(builtin_macros_format_positional_after_named)]
573pub(crate) struct PositionalAfterNamed {
574 #[primary_span]
575 #[label]
576 pub(crate) span: Span,
577 #[label(builtin_macros_named_args)]
578 pub(crate) args: Vec<Span>,
579}
580
581#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
InvalidFormatString where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
InvalidFormatString {
span: __binding_0,
desc: __binding_1,
label1: __binding_2,
note_: __binding_3,
label_: __binding_4,
sugg_: __binding_5 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_string_invalid);
;
diag.arg("desc", __binding_1);
diag.arg("label1", __binding_2);
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
if let Some(__binding_3) = __binding_3 {
diag.subdiagnostic(__binding_3);
}
if let Some(__binding_4) = __binding_4 {
diag.subdiagnostic(__binding_4);
}
if let Some(__binding_5) = __binding_5 {
diag.subdiagnostic(__binding_5);
}
diag
}
}
}
}
};Diagnostic)]
582#[diag(builtin_macros_format_string_invalid)]
583pub(crate) struct InvalidFormatString {
584 #[primary_span]
585 #[label]
586 pub(crate) span: Span,
587 pub(crate) desc: String,
588 pub(crate) label1: String,
589 #[subdiagnostic]
590 pub(crate) note_: Option<InvalidFormatStringNote>,
591 #[subdiagnostic]
592 pub(crate) label_: Option<InvalidFormatStringLabel>,
593 #[subdiagnostic]
594 pub(crate) sugg_: Option<InvalidFormatStringSuggestion>,
595}
596
597#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for InvalidFormatStringNote {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
InvalidFormatStringNote { note: __binding_0 } => {
diag.store_args();
diag.arg("note", __binding_0);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_note);
diag.note(__message);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
598#[note(builtin_macros_note)]
599pub(crate) struct InvalidFormatStringNote {
600 pub(crate) note: String,
601}
602
603#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for InvalidFormatStringLabel {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
InvalidFormatStringLabel {
span: __binding_0, label: __binding_1 } => {
diag.store_args();
diag.arg("label", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_second_label);
diag.span_label(__binding_0, __message);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
604#[label(builtin_macros_second_label)]
605pub(crate) struct InvalidFormatStringLabel {
606 #[primary_span]
607 pub(crate) span: Span,
608 pub(crate) label: String,
609}
610
611#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for InvalidFormatStringSuggestion {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
InvalidFormatStringSuggestion::UsePositional {
captured: __binding_0,
len: __binding_1,
span: __binding_2,
arg: __binding_3 } => {
let mut suggestions = Vec::new();
let __code_12 =
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", __binding_1))
});
let __code_13 =
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(", {0}", __binding_3))
});
suggestions.push((__binding_0, __code_12));
suggestions.push((__binding_2, __code_13));
diag.store_args();
diag.arg("len", __binding_1);
diag.arg("arg", __binding_3);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_format_use_positional);
diag.multipart_suggestion_with_style(__message, suggestions,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowAlways);
diag.restore_args();
}
InvalidFormatStringSuggestion::RemoveRawIdent {
span: __binding_0 } => {
let __code_14 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
})].into_iter();
diag.store_args();
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_format_remove_raw_ident);
diag.span_suggestions_with_style(__binding_0, __message,
__code_14, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
InvalidFormatStringSuggestion::ReorderFormatParameter {
span: __binding_0, replacement: __binding_1 } => {
let __code_15 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", __binding_1))
})].into_iter();
diag.store_args();
diag.arg("replacement", __binding_1);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_format_reorder_format_parameter);
diag.span_suggestions_with_style(__binding_0, __message,
__code_15, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowAlways);
diag.restore_args();
}
InvalidFormatStringSuggestion::AddMissingColon {
span: __binding_0 } => {
let __code_16 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(":?"))
})].into_iter();
diag.store_args();
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_format_add_missing_colon);
diag.span_suggestions_with_style(__binding_0, __message,
__code_16, rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
612pub(crate) enum InvalidFormatStringSuggestion {
613 #[multipart_suggestion(
614 builtin_macros_format_use_positional,
615 style = "verbose",
616 applicability = "machine-applicable"
617 )]
618 UsePositional {
619 #[suggestion_part(code = "{len}")]
620 captured: Span,
621 len: String,
622 #[suggestion_part(code = ", {arg}")]
623 span: Span,
624 arg: String,
625 },
626 #[suggestion(
627 builtin_macros_format_remove_raw_ident,
628 code = "",
629 applicability = "machine-applicable"
630 )]
631 RemoveRawIdent {
632 #[primary_span]
633 span: Span,
634 },
635 #[suggestion(
636 builtin_macros_format_reorder_format_parameter,
637 code = "{replacement}",
638 style = "verbose",
639 applicability = "machine-applicable"
640 )]
641 ReorderFormatParameter {
642 #[primary_span]
643 span: Span,
644 replacement: String,
645 },
646 #[suggestion(
647 builtin_macros_format_add_missing_colon,
648 code = ":?",
649 applicability = "machine-applicable"
650 )]
651 AddMissingColon {
652 #[primary_span]
653 span: Span,
654 },
655}
656
657#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatNoArgNamed where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatNoArgNamed { span: __binding_0, name: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_no_arg_named);
diag.note(crate::fluent_generated::_subdiag::note);
diag.note(crate::fluent_generated::builtin_macros_note2);
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
658#[diag(builtin_macros_format_no_arg_named)]
659#[note]
660#[note(builtin_macros_note2)]
661pub(crate) struct FormatNoArgNamed {
662 #[primary_span]
663 pub(crate) span: Span,
664 pub(crate) name: Symbol,
665}
666
667#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
FormatUnknownTrait<'a> where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatUnknownTrait {
span: __binding_0, ty: __binding_1, suggs: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_unknown_trait);
diag.note(crate::fluent_generated::_subdiag::note);
;
diag.arg("ty", __binding_1);
diag.span(__binding_0);
for __binding_2 in __binding_2 {
diag.subdiagnostic(__binding_2);
}
diag
}
}
}
}
};Diagnostic)]
668#[diag(builtin_macros_format_unknown_trait)]
669#[note]
670pub(crate) struct FormatUnknownTrait<'a> {
671 #[primary_span]
672 pub(crate) span: Span,
673 pub(crate) ty: &'a str,
674 #[subdiagnostic]
675 pub(crate) suggs: Vec<FormatUnknownTraitSugg>,
676}
677
678#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for FormatUnknownTraitSugg {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
FormatUnknownTraitSugg {
span: __binding_0, fmt: __binding_1, trait_name: __binding_2
} => {
let __code_17 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", __binding_1))
})].into_iter();
diag.store_args();
diag.arg("fmt", __binding_1);
diag.arg("trait_name", __binding_2);
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_suggestion);
diag.span_suggestions_with_style(__binding_0, __message,
__code_17, rustc_errors::Applicability::MaybeIncorrect,
rustc_errors::SuggestionStyle::CompletelyHidden);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
679#[suggestion(
680 builtin_macros_suggestion,
681 code = "{fmt}",
682 style = "tool-only",
683 applicability = "maybe-incorrect"
684)]
685pub(crate) struct FormatUnknownTraitSugg {
686 #[primary_span]
687 pub span: Span,
688 pub fmt: &'static str,
689 pub trait_name: &'static str,
690}
691
692#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatUnusedArg where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatUnusedArg { span: __binding_0, named: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_unused_arg);
;
diag.arg("named", __binding_1);
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::builtin_macros_format_unused_arg);
diag
}
}
}
}
};Diagnostic)]
693#[diag(builtin_macros_format_unused_arg)]
694pub(crate) struct FormatUnusedArg {
695 #[primary_span]
696 #[label(builtin_macros_format_unused_arg)]
697 pub(crate) span: Span,
698 pub(crate) named: bool,
699}
700
701impl Subdiagnostic for FormatUnusedArg {
704 fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
705 diag.arg("named", self.named);
706 let msg = diag.eagerly_translate(crate::fluent_generated::builtin_macros_format_unused_arg);
707 diag.remove_arg("named");
708 diag.span_label(self.span, msg);
709 }
710}
711
712#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatUnusedArgs where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatUnusedArgs {
unused: __binding_0,
fmt: __binding_1,
unused_labels: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_unused_args);
;
diag.span(__binding_0.clone());
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
for __binding_2 in __binding_2 {
diag.subdiagnostic(__binding_2);
}
diag
}
}
}
}
};Diagnostic)]
713#[diag(builtin_macros_format_unused_args)]
714pub(crate) struct FormatUnusedArgs {
715 #[primary_span]
716 pub(crate) unused: Vec<Span>,
717 #[label]
718 pub(crate) fmt: Span,
719 #[subdiagnostic]
720 pub(crate) unused_labels: Vec<FormatUnusedArg>,
721}
722
723#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatPositionalMismatch where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatPositionalMismatch {
span: __binding_0,
n: __binding_1,
desc: __binding_2,
highlight: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_pos_mismatch);
;
diag.arg("n", __binding_1);
diag.arg("desc", __binding_2);
diag.span(__binding_0);
diag.subdiagnostic(__binding_3);
diag
}
}
}
}
};Diagnostic)]
724#[diag(builtin_macros_format_pos_mismatch)]
725pub(crate) struct FormatPositionalMismatch {
726 #[primary_span]
727 pub(crate) span: MultiSpan,
728 pub(crate) n: usize,
729 pub(crate) desc: String,
730 #[subdiagnostic]
731 pub(crate) highlight: SingleLabelManySpans,
732}
733
734#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
FormatRedundantArgs where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
FormatRedundantArgs {
span: __binding_0,
n: __binding_1,
note: __binding_2,
sugg: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_format_redundant_args);
;
diag.arg("n", __binding_1);
diag.span(__binding_0);
diag.span_note(__binding_2,
crate::fluent_generated::_subdiag::note);
if let Some(__binding_3) = __binding_3 {
diag.subdiagnostic(__binding_3);
}
diag
}
}
}
}
};Diagnostic)]
735#[diag(builtin_macros_format_redundant_args)]
736pub(crate) struct FormatRedundantArgs {
737 #[primary_span]
738 pub(crate) span: MultiSpan,
739 pub(crate) n: usize,
740
741 #[note]
742 pub(crate) note: MultiSpan,
743
744 #[subdiagnostic]
745 pub(crate) sugg: Option<FormatRedundantArgsSugg>,
746}
747
748#[derive(const _: () =
{
impl rustc_errors::Subdiagnostic for FormatRedundantArgsSugg {
fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
where __G: rustc_errors::EmissionGuarantee {
match self {
FormatRedundantArgsSugg { spans: __binding_0 } => {
let mut suggestions = Vec::new();
let __code_18 =
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
});
for __binding_0 in __binding_0 {
suggestions.push((__binding_0, __code_18.clone()));
}
diag.store_args();
let __message =
diag.eagerly_translate(crate::fluent_generated::builtin_macros_suggestion);
diag.multipart_suggestion_with_style(__message, suggestions,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::ShowCode);
diag.restore_args();
}
}
}
}
};Subdiagnostic)]
749#[multipart_suggestion(builtin_macros_suggestion, applicability = "machine-applicable")]
750pub(crate) struct FormatRedundantArgsSugg {
751 #[suggestion_part(code = "")]
752 pub(crate) spans: Vec<Span>,
753}
754
755#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
TestCaseNonItem where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TestCaseNonItem { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_test_case_non_item);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
756#[diag(builtin_macros_test_case_non_item)]
757pub(crate) struct TestCaseNonItem {
758 #[primary_span]
759 pub(crate) span: Span,
760}
761
762#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for TestBadFn
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TestBadFn {
span: __binding_0, cause: __binding_1, kind: __binding_2 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_test_bad_fn);
;
diag.arg("kind", __binding_2);
diag.span(__binding_0);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
763#[diag(builtin_macros_test_bad_fn)]
764pub(crate) struct TestBadFn {
765 #[primary_span]
766 pub(crate) span: Span,
767 #[label]
768 pub(crate) cause: Span,
769 pub(crate) kind: &'static str,
770}
771
772#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmExplicitRegisterName where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmExplicitRegisterName { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_explicit_register_name);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
773#[diag(builtin_macros_asm_explicit_register_name)]
774pub(crate) struct AsmExplicitRegisterName {
775 #[primary_span]
776 pub(crate) span: Span,
777}
778
779#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmMutuallyExclusive where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmMutuallyExclusive {
spans: __binding_0, opt1: __binding_1, opt2: __binding_2 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_mutually_exclusive);
;
diag.arg("opt1", __binding_1);
diag.arg("opt2", __binding_2);
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
780#[diag(builtin_macros_asm_mutually_exclusive)]
781pub(crate) struct AsmMutuallyExclusive {
782 #[primary_span]
783 pub(crate) spans: Vec<Span>,
784 pub(crate) opt1: &'static str,
785 pub(crate) opt2: &'static str,
786}
787
788#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for AsmPureCombine
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmPureCombine { spans: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_pure_combine);
;
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
789#[diag(builtin_macros_asm_pure_combine)]
790pub(crate) struct AsmPureCombine {
791 #[primary_span]
792 pub(crate) spans: Vec<Span>,
793}
794
795#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmPureNoOutput where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmPureNoOutput { spans: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_pure_no_output);
;
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
796#[diag(builtin_macros_asm_pure_no_output)]
797pub(crate) struct AsmPureNoOutput {
798 #[primary_span]
799 pub(crate) spans: Vec<Span>,
800}
801
802#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmModifierInvalid where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmModifierInvalid { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_modifier_invalid);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
803#[diag(builtin_macros_asm_modifier_invalid)]
804pub(crate) struct AsmModifierInvalid {
805 #[primary_span]
806 pub(crate) span: Span,
807}
808
809#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmAttributeNotSupported where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmAttributeNotSupported { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_attribute_not_supported);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
810#[diag(builtin_macros_asm_attribute_not_supported)]
811pub(crate) struct AsmAttributeNotSupported {
812 #[primary_span]
813 pub(crate) span: Span,
814}
815
816#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmDuplicateArg where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmDuplicateArg {
span: __binding_0, prev: __binding_1, name: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_duplicate_arg);
;
diag.arg("name", __binding_2);
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::builtin_macros_arg);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
817#[diag(builtin_macros_asm_duplicate_arg)]
818pub(crate) struct AsmDuplicateArg {
819 #[primary_span]
820 #[label(builtin_macros_arg)]
821 pub(crate) span: Span,
822 #[label]
823 pub(crate) prev: Span,
824 pub(crate) name: Symbol,
825}
826
827#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmPositionalAfter where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmPositionalAfter {
span: __binding_0, named: __binding_1, explicit: __binding_2
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_pos_after);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::builtin_macros_pos);
for __binding_1 in __binding_1 {
diag.span_label(__binding_1,
crate::fluent_generated::builtin_macros_named);
}
for __binding_2 in __binding_2 {
diag.span_label(__binding_2,
crate::fluent_generated::builtin_macros_explicit);
}
diag
}
}
}
}
};Diagnostic)]
828#[diag(builtin_macros_asm_pos_after)]
829pub(crate) struct AsmPositionalAfter {
830 #[primary_span]
831 #[label(builtin_macros_pos)]
832 pub(crate) span: Span,
833 #[label(builtin_macros_named)]
834 pub(crate) named: Vec<Span>,
835 #[label(builtin_macros_explicit)]
836 pub(crate) explicit: Vec<Span>,
837}
838
839#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for AsmNoReturn
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmNoReturn { outputs_sp: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_noreturn);
;
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
840#[diag(builtin_macros_asm_noreturn)]
841pub(crate) struct AsmNoReturn {
842 #[primary_span]
843 pub(crate) outputs_sp: Vec<Span>,
844}
845
846#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmNoMatchedArgumentName where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmNoMatchedArgumentName {
name: __binding_0, span: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_no_matched_argument_name);
;
diag.arg("name", __binding_0);
diag.span(__binding_1);
diag
}
}
}
}
};Diagnostic)]
847#[diag(builtin_macros_asm_no_matched_argument_name)]
848pub(crate) struct AsmNoMatchedArgumentName {
849 pub(crate) name: String,
850 #[primary_span]
851 pub(crate) span: Span,
852}
853
854#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for AsmMayUnwind
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmMayUnwind { labels_sp: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_mayunwind);
;
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
855#[diag(builtin_macros_asm_mayunwind)]
856pub(crate) struct AsmMayUnwind {
857 #[primary_span]
858 pub(crate) labels_sp: Vec<Span>,
859}
860
861pub(crate) struct AsmClobberNoReg {
862 pub(crate) spans: Vec<Span>,
863 pub(crate) clobbers: Vec<Span>,
864}
865
866impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AsmClobberNoReg {
867 fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
868 let lbl1 = dcx.eagerly_translate_to_string(
870 crate::fluent_generated::builtin_macros_asm_clobber_abi,
871 [].into_iter(),
872 );
873 let lbl2 = dcx.eagerly_translate_to_string(
874 crate::fluent_generated::builtin_macros_asm_clobber_outputs,
875 [].into_iter(),
876 );
877 Diag::new(dcx, level, crate::fluent_generated::builtin_macros_asm_clobber_no_reg)
878 .with_span(self.spans.clone())
879 .with_span_labels(self.clobbers, &lbl1)
880 .with_span_labels(self.spans, &lbl2)
881 }
882}
883
884#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmOptAlreadyprovided where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmOptAlreadyprovided {
span: __binding_0,
symbol: __binding_1,
span_with_comma: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_opt_already_provided);
let __code_19 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
})].into_iter();
;
diag.arg("symbol", __binding_1);
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag.span_suggestions_with_style(__binding_2,
crate::fluent_generated::_subdiag::suggestion, __code_19,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::CompletelyHidden);
diag
}
}
}
}
};Diagnostic)]
885#[diag(builtin_macros_asm_opt_already_provided)]
886pub(crate) struct AsmOptAlreadyprovided {
887 #[primary_span]
888 #[label]
889 pub(crate) span: Span,
890 pub(crate) symbol: Symbol,
891 #[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
892 pub(crate) span_with_comma: Span,
893}
894
895#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmUnsupportedOption where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmUnsupportedOption {
span: __binding_0,
symbol: __binding_1,
span_with_comma: __binding_2,
macro_name: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_unsupported_option);
let __code_20 =
[::alloc::__export::must_use({
::alloc::fmt::format(format_args!(""))
})].into_iter();
;
diag.arg("symbol", __binding_1);
diag.arg("macro_name", __binding_3);
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag.span_suggestions_with_style(__binding_2,
crate::fluent_generated::_subdiag::suggestion, __code_20,
rustc_errors::Applicability::MachineApplicable,
rustc_errors::SuggestionStyle::CompletelyHidden);
diag
}
}
}
}
};Diagnostic)]
896#[diag(builtin_macros_asm_unsupported_option)]
897pub(crate) struct AsmUnsupportedOption {
898 #[primary_span]
899 #[label]
900 pub(crate) span: Span,
901 pub(crate) symbol: Symbol,
902 #[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
903 pub(crate) span_with_comma: Span,
904 pub(crate) macro_name: &'static str,
905}
906
907#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmUnsupportedClobberAbi where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmUnsupportedClobberAbi {
spans: __binding_0, macro_name: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_asm_unsupported_clobber_abi);
;
diag.arg("macro_name", __binding_1);
diag.span(__binding_0.clone());
diag
}
}
}
}
};Diagnostic)]
908#[diag(builtin_macros_asm_unsupported_clobber_abi)]
909pub(crate) struct AsmUnsupportedClobberAbi {
910 #[primary_span]
911 pub(crate) spans: Vec<Span>,
912 pub(crate) macro_name: &'static str,
913}
914
915#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
TestRunnerInvalid where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TestRunnerInvalid { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_test_runner_invalid);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
916#[diag(builtin_macros_test_runner_invalid)]
917pub(crate) struct TestRunnerInvalid {
918 #[primary_span]
919 pub(crate) span: Span,
920}
921
922#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
TestRunnerNargs where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TestRunnerNargs { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_test_runner_nargs);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
923#[diag(builtin_macros_test_runner_nargs)]
924pub(crate) struct TestRunnerNargs {
925 #[primary_span]
926 pub(crate) span: Span,
927}
928
929#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
ExpectedCommaInList where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ExpectedCommaInList { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_expected_comma_in_list);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
930#[diag(builtin_macros_expected_comma_in_list)]
931pub(crate) struct ExpectedCommaInList {
932 #[primary_span]
933 pub span: Span,
934}
935
936#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
OnlyOneArgument<'a> where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
OnlyOneArgument { span: __binding_0, name: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_only_one_argument);
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
937#[diag(builtin_macros_only_one_argument)]
938pub(crate) struct OnlyOneArgument<'a> {
939 #[primary_span]
940 pub span: Span,
941 pub name: &'a str,
942}
943
944#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
TakesNoArguments<'a> where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
TakesNoArguments { span: __binding_0, name: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_takes_no_arguments);
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
945#[diag(builtin_macros_takes_no_arguments)]
946pub(crate) struct TakesNoArguments<'a> {
947 #[primary_span]
948 pub span: Span,
949 pub name: &'a str,
950}
951
952#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
AttributeOnlyUsableWithCrateType<'a> where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AttributeOnlyUsableWithCrateType {
span: __binding_0, path: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_proc_macro_attribute_only_usable_with_crate_type);
;
diag.arg("path", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
953#[diag(builtin_macros_proc_macro_attribute_only_usable_with_crate_type)]
954pub(crate) struct AttributeOnlyUsableWithCrateType<'a> {
955 #[primary_span]
956 pub span: Span,
957 pub path: &'a str,
958}
959
960#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
ExpectedItem<'a> where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
ExpectedItem { span: __binding_0, token: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_source_utils_expected_item);
;
diag.arg("token", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
961#[diag(builtin_macros_source_utils_expected_item)]
962pub(crate) struct ExpectedItem<'a> {
963 #[primary_span]
964 pub span: Span,
965 pub token: &'a str,
966}
967
968#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
NakedFunctionTestingAttribute where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
NakedFunctionTestingAttribute {
naked_span: __binding_0, testing_span: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_naked_functions_testing_attribute);
diag.code(E0736);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::builtin_macros_naked_attribute);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
969#[diag(builtin_macros_naked_functions_testing_attribute, code = E0736)]
970pub(crate) struct NakedFunctionTestingAttribute {
971 #[primary_span]
972 #[label(builtin_macros_naked_attribute)]
973 pub naked_span: Span,
974 #[label]
975 pub testing_span: Span,
976}
977
978#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
NonGenericPointee where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
NonGenericPointee { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_non_generic_pointee);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
979#[diag(builtin_macros_non_generic_pointee)]
980pub(crate) struct NonGenericPointee {
981 #[primary_span]
982 pub span: Span,
983}
984
985#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AsmExpectedOther where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
AsmExpectedOther {
span: __binding_0, is_inline_asm: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_expected_other);
;
diag.arg("is_inline_asm", __binding_1);
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::builtin_macros_expected_other);
diag
}
}
}
}
};Diagnostic)]
986#[diag(builtin_macros_expected_other)]
987pub(crate) struct AsmExpectedOther {
988 #[primary_span]
989 #[label(builtin_macros_expected_other)]
990 pub(crate) span: Span,
991 pub(crate) is_inline_asm: bool,
992}
993
994#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
CfgSelectNoMatches where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
CfgSelectNoMatches { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_select_no_matches);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
995#[diag(builtin_macros_cfg_select_no_matches)]
996pub(crate) struct CfgSelectNoMatches {
997 #[primary_span]
998 pub span: Span,
999}
1000
1001#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
CfgSelectUnreachable where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
CfgSelectUnreachable {
span: __binding_0, wildcard_span: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_cfg_select_unreachable);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::builtin_macros_label2);
diag.span_label(__binding_1,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
1002#[diag(builtin_macros_cfg_select_unreachable)]
1003pub(crate) struct CfgSelectUnreachable {
1004 #[primary_span]
1005 #[label(builtin_macros_label2)]
1006 pub span: Span,
1007
1008 #[label]
1009 pub wildcard_span: Span,
1010}
1011
1012#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
EiiExternTargetExpectedMacro where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiExternTargetExpectedMacro { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_declaration_expected_macro);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
1013#[diag(builtin_macros_eii_declaration_expected_macro)]
1014pub(crate) struct EiiExternTargetExpectedMacro {
1015 #[primary_span]
1016 pub span: Span,
1017}
1018
1019#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
EiiExternTargetExpectedList where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiExternTargetExpectedList { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_declaration_expected_list);
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
1020#[diag(builtin_macros_eii_declaration_expected_list)]
1021pub(crate) struct EiiExternTargetExpectedList {
1022 #[primary_span]
1023 pub span: Span,
1024}
1025
1026#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
EiiExternTargetExpectedUnsafe where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiExternTargetExpectedUnsafe { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_declaration_expected_unsafe);
;
diag.span(__binding_0);
diag.span_note(__binding_0,
crate::fluent_generated::_subdiag::note);
diag
}
}
}
}
};Diagnostic)]
1027#[diag(builtin_macros_eii_declaration_expected_unsafe)]
1028pub(crate) struct EiiExternTargetExpectedUnsafe {
1029 #[primary_span]
1030 #[note]
1031 pub span: Span,
1032}
1033
1034#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
EiiSharedMacroExpectedFunction where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiSharedMacroExpectedFunction {
span: __binding_0, name: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_shared_macro_expected_function);
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
1035#[diag(builtin_macros_eii_shared_macro_expected_function)]
1036pub(crate) struct EiiSharedMacroExpectedFunction {
1037 #[primary_span]
1038 pub span: Span,
1039 pub name: String,
1040}
1041
1042#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
EiiSharedMacroInStatementPosition where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiSharedMacroInStatementPosition {
span: __binding_0, name: __binding_1, item_span: __binding_2
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_shared_macro_in_statement_position);
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag.span_label(__binding_2,
crate::fluent_generated::_subdiag::label);
diag
}
}
}
}
};Diagnostic)]
1043#[diag(builtin_macros_eii_shared_macro_in_statement_position)]
1044pub(crate) struct EiiSharedMacroInStatementPosition {
1045 #[primary_span]
1046 pub span: Span,
1047 pub name: String,
1048 #[label]
1049 pub item_span: Span,
1050}
1051
1052#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for EiiOnlyOnce
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiOnlyOnce {
span: __binding_0,
first_span: __binding_1,
name: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_only_once);
;
diag.arg("name", __binding_2);
diag.span(__binding_0);
diag.span_note(__binding_1,
crate::fluent_generated::_subdiag::note);
diag
}
}
}
}
};Diagnostic)]
1053#[diag(builtin_macros_eii_only_once)]
1054pub(crate) struct EiiOnlyOnce {
1055 #[primary_span]
1056 pub span: Span,
1057 #[note]
1058 pub first_span: Span,
1059 pub name: String,
1060}
1061
1062#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
EiiMacroExpectedMaxOneArgument where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
EiiMacroExpectedMaxOneArgument {
span: __binding_0, name: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::builtin_macros_eii_shared_macro_expected_max_one_argument);
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
1063#[diag(builtin_macros_eii_shared_macro_expected_max_one_argument)]
1064pub(crate) struct EiiMacroExpectedMaxOneArgument {
1065 #[primary_span]
1066 pub span: Span,
1067 pub name: String,
1068}