rustc_hir_analysis/
errors.rs

1//! Errors emitted by `rustc_hir_analysis`.
2
3use rustc_abi::ExternAbi;
4use rustc_errors::codes::*;
5use rustc_errors::{
6    Applicability, Diag, DiagCtxtHandle, DiagSymbolList, Diagnostic, EmissionGuarantee, Level,
7    MultiSpan,
8};
9use rustc_hir::limit::Limit;
10use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
11use rustc_middle::ty::Ty;
12use rustc_span::{Ident, Span, Symbol};
13
14use crate::fluent_generated as fluent;
15pub(crate) mod wrong_number_of_generic_args;
16
17mod precise_captures;
18pub(crate) use precise_captures::*;
19
20#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            AmbiguousAssocItem<'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 {
                    AmbiguousAssocItem {
                        span: __binding_0,
                        assoc_kind: __binding_1,
                        assoc_ident: __binding_2,
                        qself: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_ambiguous_assoc_item);
                        ;
                        diag.arg("assoc_kind", __binding_1);
                        diag.arg("assoc_ident", __binding_2);
                        diag.arg("qself", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
21#[diag(hir_analysis_ambiguous_assoc_item)]
22pub(crate) struct AmbiguousAssocItem<'a> {
23    #[primary_span]
24    #[label]
25    pub span: Span,
26    pub assoc_kind: &'static str,
27    pub assoc_ident: Ident,
28    pub qself: &'a str,
29}
30
31#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AssocKindMismatch 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 {
                    AssocKindMismatch {
                        span: __binding_0,
                        expected: __binding_1,
                        got: __binding_2,
                        expected_because_label: __binding_3,
                        assoc_kind: __binding_4,
                        def_span: __binding_5,
                        bound_on_assoc_const_label: __binding_6,
                        wrap_in_braces_sugg: __binding_7 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_assoc_kind_mismatch);
                        ;
                        diag.arg("expected", __binding_1);
                        diag.arg("got", __binding_2);
                        diag.arg("assoc_kind", __binding_4);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if let Some(__binding_3) = __binding_3 {
                            diag.span_label(__binding_3,
                                crate::fluent_generated::hir_analysis_expected_because_label);
                        }
                        diag.span_note(__binding_5,
                            crate::fluent_generated::_subdiag::note);
                        if let Some(__binding_6) = __binding_6 {
                            diag.span_label(__binding_6,
                                crate::fluent_generated::hir_analysis_bound_on_assoc_const_label);
                        }
                        if let Some(__binding_7) = __binding_7 {
                            diag.subdiagnostic(__binding_7);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
32#[diag(hir_analysis_assoc_kind_mismatch)]
33pub(crate) struct AssocKindMismatch {
34    #[primary_span]
35    #[label]
36    pub span: Span,
37    pub expected: &'static str,
38    pub got: &'static str,
39    #[label(hir_analysis_expected_because_label)]
40    pub expected_because_label: Option<Span>,
41    pub assoc_kind: &'static str,
42    #[note]
43    pub def_span: Span,
44    #[label(hir_analysis_bound_on_assoc_const_label)]
45    pub bound_on_assoc_const_label: Option<Span>,
46    #[subdiagnostic]
47    pub wrap_in_braces_sugg: Option<AssocKindMismatchWrapInBracesSugg>,
48}
49
50#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for AssocKindMismatchWrapInBracesSugg
            {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    AssocKindMismatchWrapInBracesSugg {
                        lo: __binding_0, hi: __binding_1 } => {
                        let mut suggestions = Vec::new();
                        let __code_0 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("{{ "))
                                });
                        let __code_1 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!(" }}"))
                                });
                        suggestions.push((__binding_0, __code_0));
                        suggestions.push((__binding_1, __code_1));
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_kind_mismatch_wrap_in_braces_sugg);
                        diag.multipart_suggestion_with_style(__message, suggestions,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
51#[multipart_suggestion(
52    hir_analysis_assoc_kind_mismatch_wrap_in_braces_sugg,
53    applicability = "maybe-incorrect"
54)]
55pub(crate) struct AssocKindMismatchWrapInBracesSugg {
56    #[suggestion_part(code = "{{ ")]
57    pub lo: Span,
58    #[suggestion_part(code = " }}")]
59    pub hi: Span,
60}
61
62#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AssocItemIsPrivate 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 {
                    AssocItemIsPrivate {
                        span: __binding_0,
                        kind: __binding_1,
                        name: __binding_2,
                        defined_here_label: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_assoc_item_is_private);
                        diag.code(E0624);
                        ;
                        diag.arg("kind", __binding_1);
                        diag.arg("name", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_3,
                            crate::fluent_generated::hir_analysis_defined_here_label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
63#[diag(hir_analysis_assoc_item_is_private, code = E0624)]
64pub(crate) struct AssocItemIsPrivate {
65    #[primary_span]
66    #[label]
67    pub span: Span,
68    pub kind: &'static str,
69    pub name: Ident,
70    #[label(hir_analysis_defined_here_label)]
71    pub defined_here_label: Span,
72}
73
74#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            AssocItemNotFound<'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 {
                    AssocItemNotFound {
                        span: __binding_0,
                        assoc_ident: __binding_1,
                        assoc_kind: __binding_2,
                        qself: __binding_3,
                        label: __binding_4,
                        sugg: __binding_5,
                        within_macro_span: __binding_6 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_assoc_item_not_found);
                        diag.code(E0220);
                        ;
                        diag.arg("assoc_ident", __binding_1);
                        diag.arg("assoc_kind", __binding_2);
                        diag.arg("qself", __binding_3);
                        diag.span(__binding_0);
                        if let Some(__binding_4) = __binding_4 {
                            diag.subdiagnostic(__binding_4);
                        }
                        if let Some(__binding_5) = __binding_5 {
                            diag.subdiagnostic(__binding_5);
                        }
                        if let Some(__binding_6) = __binding_6 {
                            diag.span_label(__binding_6,
                                crate::fluent_generated::hir_analysis_within_macro);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
75#[diag(hir_analysis_assoc_item_not_found, code = E0220)]
76pub(crate) struct AssocItemNotFound<'a> {
77    #[primary_span]
78    pub span: Span,
79    pub assoc_ident: Ident,
80    pub assoc_kind: &'static str,
81    pub qself: &'a str,
82    #[subdiagnostic]
83    pub label: Option<AssocItemNotFoundLabel<'a>>,
84    #[subdiagnostic]
85    pub sugg: Option<AssocItemNotFoundSugg<'a>>,
86    #[label(hir_analysis_within_macro)]
87    pub within_macro_span: Option<Span>,
88}
89
90#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for AssocItemNotFoundLabel<'a> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    AssocItemNotFoundLabel::NotFound { span: __binding_0 } => {
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_item_not_found_label);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                    AssocItemNotFoundLabel::FoundInOtherTrait {
                        span: __binding_0,
                        assoc_kind: __binding_1,
                        trait_name: __binding_2,
                        suggested_name: __binding_3,
                        identically_named: __binding_4 } => {
                        diag.store_args();
                        diag.arg("assoc_kind", __binding_1);
                        diag.arg("trait_name", __binding_2);
                        diag.arg("suggested_name", __binding_3);
                        diag.arg("identically_named", __binding_4);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_item_not_found_found_in_other_trait_label);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
91pub(crate) enum AssocItemNotFoundLabel<'a> {
92    #[label(hir_analysis_assoc_item_not_found_label)]
93    NotFound {
94        #[primary_span]
95        span: Span,
96    },
97    #[label(hir_analysis_assoc_item_not_found_found_in_other_trait_label)]
98    FoundInOtherTrait {
99        #[primary_span]
100        span: Span,
101        assoc_kind: &'static str,
102        trait_name: &'a str,
103        suggested_name: Symbol,
104        identically_named: bool,
105    },
106}
107
108#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for AssocItemNotFoundSugg<'a> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    AssocItemNotFoundSugg::Similar {
                        span: __binding_0,
                        assoc_kind: __binding_1,
                        suggested_name: __binding_2 } => {
                        let __code_2 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_2))
                                            })].into_iter();
                        diag.store_args();
                        diag.arg("assoc_kind", __binding_1);
                        diag.arg("suggested_name", __binding_2);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_item_not_found_similar_sugg);
                        diag.span_suggestions_with_style(__binding_0, __message,
                            __code_2, rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.restore_args();
                    }
                    AssocItemNotFoundSugg::SimilarInOtherTrait {
                        span: __binding_0,
                        trait_name: __binding_1,
                        assoc_kind: __binding_2,
                        suggested_name: __binding_3 } => {
                        let __code_3 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_3))
                                            })].into_iter();
                        diag.store_args();
                        diag.arg("trait_name", __binding_1);
                        diag.arg("assoc_kind", __binding_2);
                        diag.arg("suggested_name", __binding_3);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_item_not_found_similar_in_other_trait_sugg);
                        diag.span_suggestions_with_style(__binding_0, __message,
                            __code_3, rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowAlways);
                        diag.restore_args();
                    }
                    AssocItemNotFoundSugg::SimilarInOtherTraitQPath {
                        lo: __binding_0,
                        mi: __binding_1,
                        hi: __binding_2,
                        trait_ref: __binding_3,
                        suggested_name: __binding_4,
                        identically_named: __binding_5,
                        applicability: __binding_6 } => {
                        let mut suggestions = Vec::new();
                        let __code_4 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("<"))
                                });
                        let __code_5 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!(" as {0}>", __binding_3))
                                });
                        let __code_6 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("{0}", __binding_4))
                                });
                        suggestions.push((__binding_0, __code_4));
                        suggestions.push((__binding_1, __code_5));
                        if let Some(__binding_2) = __binding_2 {
                            suggestions.push((__binding_2, __code_6));
                        }
                        diag.store_args();
                        diag.arg("trait_ref", __binding_3);
                        diag.arg("suggested_name", __binding_4);
                        diag.arg("identically_named", __binding_5);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_item_not_found_similar_in_other_trait_qpath_sugg);
                        diag.multipart_suggestion_with_style(__message, suggestions,
                            __binding_6, rustc_errors::SuggestionStyle::ShowAlways);
                        diag.restore_args();
                    }
                    AssocItemNotFoundSugg::Other {
                        span: __binding_0,
                        qself: __binding_1,
                        assoc_kind: __binding_2,
                        suggested_name: __binding_3 } => {
                        let __code_7 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_3))
                                            })].into_iter();
                        diag.store_args();
                        diag.arg("qself", __binding_1);
                        diag.arg("assoc_kind", __binding_2);
                        diag.arg("suggested_name", __binding_3);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_assoc_item_not_found_other_sugg);
                        diag.span_suggestions_with_style(__binding_0, __message,
                            __code_7, rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
109
110pub(crate) enum AssocItemNotFoundSugg<'a> {
111    #[suggestion(
112        hir_analysis_assoc_item_not_found_similar_sugg,
113        code = "{suggested_name}",
114        applicability = "maybe-incorrect"
115    )]
116    Similar {
117        #[primary_span]
118        span: Span,
119        assoc_kind: &'static str,
120        suggested_name: Symbol,
121    },
122    #[suggestion(
123        hir_analysis_assoc_item_not_found_similar_in_other_trait_sugg,
124        code = "{suggested_name}",
125        style = "verbose",
126        applicability = "maybe-incorrect"
127    )]
128    SimilarInOtherTrait {
129        #[primary_span]
130        span: Span,
131        trait_name: &'a str,
132        assoc_kind: &'static str,
133        suggested_name: Symbol,
134    },
135    #[multipart_suggestion(
136        hir_analysis_assoc_item_not_found_similar_in_other_trait_qpath_sugg,
137        style = "verbose"
138    )]
139    SimilarInOtherTraitQPath {
140        #[suggestion_part(code = "<")]
141        lo: Span,
142        #[suggestion_part(code = " as {trait_ref}>")]
143        mi: Span,
144        #[suggestion_part(code = "{suggested_name}")]
145        hi: Option<Span>,
146        trait_ref: String,
147        suggested_name: Symbol,
148        identically_named: bool,
149        #[applicability]
150        applicability: Applicability,
151    },
152    #[suggestion(
153        hir_analysis_assoc_item_not_found_other_sugg,
154        code = "{suggested_name}",
155        applicability = "maybe-incorrect"
156    )]
157    Other {
158        #[primary_span]
159        span: Span,
160        qself: &'a str,
161        assoc_kind: &'static str,
162        suggested_name: Symbol,
163    },
164}
165
166#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            WrongNumberOfGenericArgumentsToIntrinsic<'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 {
                    WrongNumberOfGenericArgumentsToIntrinsic {
                        span: __binding_0,
                        found: __binding_1,
                        expected: __binding_2,
                        descr: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_wrong_number_of_generic_arguments_to_intrinsic);
                        diag.code(E0094);
                        ;
                        diag.arg("found", __binding_1);
                        diag.arg("expected", __binding_2);
                        diag.arg("descr", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
167#[diag(hir_analysis_wrong_number_of_generic_arguments_to_intrinsic, code = E0094)]
168pub(crate) struct WrongNumberOfGenericArgumentsToIntrinsic<'a> {
169    #[primary_span]
170    #[label]
171    pub span: Span,
172    pub found: usize,
173    pub expected: usize,
174    pub descr: &'a str,
175}
176
177#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            UnrecognizedIntrinsicFunction 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 {
                    UnrecognizedIntrinsicFunction {
                        span: __binding_0, name: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_unrecognized_intrinsic_function);
                        diag.code(E0093);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.arg("name", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
178#[diag(hir_analysis_unrecognized_intrinsic_function, code = E0093)]
179#[help]
180pub(crate) struct UnrecognizedIntrinsicFunction {
181    #[primary_span]
182    #[label]
183    pub span: Span,
184    pub name: Symbol,
185}
186
187#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            LifetimesOrBoundsMismatchOnTrait 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 {
                    LifetimesOrBoundsMismatchOnTrait {
                        span: __binding_0,
                        generics_span: __binding_1,
                        where_span: __binding_2,
                        bounds_span: __binding_3,
                        item_kind: __binding_4,
                        ident: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_lifetimes_or_bounds_mismatch_on_trait);
                        diag.code(E0195);
                        ;
                        diag.arg("item_kind", __binding_4);
                        diag.arg("ident", __binding_5);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::hir_analysis_generics_label);
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_label(__binding_2,
                                crate::fluent_generated::hir_analysis_where_label);
                        }
                        for __binding_3 in __binding_3 {
                            diag.span_label(__binding_3,
                                crate::fluent_generated::hir_analysis_bounds_label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
188#[diag(hir_analysis_lifetimes_or_bounds_mismatch_on_trait, code = E0195)]
189pub(crate) struct LifetimesOrBoundsMismatchOnTrait {
190    #[primary_span]
191    #[label]
192    pub span: Span,
193    #[label(hir_analysis_generics_label)]
194    pub generics_span: Span,
195    #[label(hir_analysis_where_label)]
196    pub where_span: Option<Span>,
197    #[label(hir_analysis_bounds_label)]
198    pub bounds_span: Vec<Span>,
199    pub item_kind: &'static str,
200    pub ident: Ident,
201}
202
203#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            DropImplOnWrongItem 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 {
                    DropImplOnWrongItem { span: __binding_0, trait_: __binding_1
                        } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_drop_impl_on_wrong_item);
                        diag.code(E0120);
                        ;
                        diag.arg("trait_", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
204#[diag(hir_analysis_drop_impl_on_wrong_item, code = E0120)]
205pub(crate) struct DropImplOnWrongItem {
206    #[primary_span]
207    #[label]
208    pub span: Span,
209    pub trait_: Symbol,
210}
211
212#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            FieldAlreadyDeclared 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 {
                    FieldAlreadyDeclared::NotNested {
                        field_name: __binding_0,
                        span: __binding_1,
                        prev_span: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_field_already_declared);
                        diag.code(E0124);
                        ;
                        diag.arg("field_name", __binding_0);
                        diag.span(__binding_1);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_2,
                            crate::fluent_generated::hir_analysis_previous_decl_label);
                        diag
                    }
                    FieldAlreadyDeclared::CurrentNested {
                        field_name: __binding_0,
                        span: __binding_1,
                        nested_field_span: __binding_2,
                        help: __binding_3,
                        prev_span: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_field_already_declared_current_nested);
                        ;
                        diag.arg("field_name", __binding_0);
                        diag.span(__binding_1);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_note(__binding_2,
                            crate::fluent_generated::hir_analysis_nested_field_decl_note);
                        diag.subdiagnostic(__binding_3);
                        diag.span_label(__binding_4,
                            crate::fluent_generated::hir_analysis_previous_decl_label);
                        diag
                    }
                    FieldAlreadyDeclared::PreviousNested {
                        field_name: __binding_0,
                        span: __binding_1,
                        prev_span: __binding_2,
                        prev_nested_field_span: __binding_3,
                        prev_help: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_field_already_declared_previous_nested);
                        ;
                        diag.arg("field_name", __binding_0);
                        diag.span(__binding_1);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_2,
                            crate::fluent_generated::hir_analysis_previous_decl_label);
                        diag.span_note(__binding_3,
                            crate::fluent_generated::hir_analysis_previous_nested_field_decl_note);
                        diag.subdiagnostic(__binding_4);
                        diag
                    }
                    FieldAlreadyDeclared::BothNested {
                        field_name: __binding_0,
                        span: __binding_1,
                        nested_field_span: __binding_2,
                        help: __binding_3,
                        prev_span: __binding_4,
                        prev_nested_field_span: __binding_5,
                        prev_help: __binding_6 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_field_already_declared_both_nested);
                        ;
                        diag.arg("field_name", __binding_0);
                        diag.span(__binding_1);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_note(__binding_2,
                            crate::fluent_generated::hir_analysis_nested_field_decl_note);
                        diag.subdiagnostic(__binding_3);
                        diag.span_label(__binding_4,
                            crate::fluent_generated::hir_analysis_previous_decl_label);
                        diag.span_note(__binding_5,
                            crate::fluent_generated::hir_analysis_previous_nested_field_decl_note);
                        diag.subdiagnostic(__binding_6);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
213pub(crate) enum FieldAlreadyDeclared {
214    #[diag(hir_analysis_field_already_declared, code = E0124)]
215    NotNested {
216        field_name: Ident,
217        #[primary_span]
218        #[label]
219        span: Span,
220        #[label(hir_analysis_previous_decl_label)]
221        prev_span: Span,
222    },
223    #[diag(hir_analysis_field_already_declared_current_nested)]
224    CurrentNested {
225        field_name: Ident,
226        #[primary_span]
227        #[label]
228        span: Span,
229        #[note(hir_analysis_nested_field_decl_note)]
230        nested_field_span: Span,
231        #[subdiagnostic]
232        help: FieldAlreadyDeclaredNestedHelp,
233        #[label(hir_analysis_previous_decl_label)]
234        prev_span: Span,
235    },
236    #[diag(hir_analysis_field_already_declared_previous_nested)]
237    PreviousNested {
238        field_name: Ident,
239        #[primary_span]
240        #[label]
241        span: Span,
242        #[label(hir_analysis_previous_decl_label)]
243        prev_span: Span,
244        #[note(hir_analysis_previous_nested_field_decl_note)]
245        prev_nested_field_span: Span,
246        #[subdiagnostic]
247        prev_help: FieldAlreadyDeclaredNestedHelp,
248    },
249    #[diag(hir_analysis_field_already_declared_both_nested)]
250    BothNested {
251        field_name: Ident,
252        #[primary_span]
253        #[label]
254        span: Span,
255        #[note(hir_analysis_nested_field_decl_note)]
256        nested_field_span: Span,
257        #[subdiagnostic]
258        help: FieldAlreadyDeclaredNestedHelp,
259        #[label(hir_analysis_previous_decl_label)]
260        prev_span: Span,
261        #[note(hir_analysis_previous_nested_field_decl_note)]
262        prev_nested_field_span: Span,
263        #[subdiagnostic]
264        prev_help: FieldAlreadyDeclaredNestedHelp,
265    },
266}
267
268#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for FieldAlreadyDeclaredNestedHelp {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    FieldAlreadyDeclaredNestedHelp { span: __binding_0 } => {
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_field_already_declared_nested_help);
                        diag.span_help(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
269#[help(hir_analysis_field_already_declared_nested_help)]
270pub(crate) struct FieldAlreadyDeclaredNestedHelp {
271    #[primary_span]
272    pub span: Span,
273}
274
275#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CopyImplOnTypeWithDtor 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 {
                    CopyImplOnTypeWithDtor { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_copy_impl_on_type_with_dtor);
                        diag.code(E0184);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
276#[diag(hir_analysis_copy_impl_on_type_with_dtor, code = E0184)]
277pub(crate) struct CopyImplOnTypeWithDtor {
278    #[primary_span]
279    #[label]
280    pub span: Span,
281}
282
283#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CopyImplOnNonAdt 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 {
                    CopyImplOnNonAdt { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_copy_impl_on_non_adt);
                        diag.code(E0206);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
284#[diag(hir_analysis_copy_impl_on_non_adt, code = E0206)]
285pub(crate) struct CopyImplOnNonAdt {
286    #[primary_span]
287    #[label]
288    pub span: Span,
289}
290
291#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ConstParamTyImplOnUnsized 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 {
                    ConstParamTyImplOnUnsized { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_const_param_ty_impl_on_unsized);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
292#[diag(hir_analysis_const_param_ty_impl_on_unsized)]
293pub(crate) struct ConstParamTyImplOnUnsized {
294    #[primary_span]
295    #[label]
296    pub span: Span,
297}
298
299#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ConstParamTyImplOnNonAdt 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 {
                    ConstParamTyImplOnNonAdt { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_const_param_ty_impl_on_non_adt);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
300#[diag(hir_analysis_const_param_ty_impl_on_non_adt)]
301pub(crate) struct ConstParamTyImplOnNonAdt {
302    #[primary_span]
303    #[label]
304    pub span: Span,
305}
306
307#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            TraitObjectDeclaredWithNoTraits 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 {
                    TraitObjectDeclaredWithNoTraits {
                        span: __binding_0, trait_alias_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_trait_object_declared_with_no_traits);
                        diag.code(E0224);
                        ;
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_label(__binding_1,
                                crate::fluent_generated::hir_analysis_alias_span);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
308#[diag(hir_analysis_trait_object_declared_with_no_traits, code = E0224)]
309pub(crate) struct TraitObjectDeclaredWithNoTraits {
310    #[primary_span]
311    pub span: Span,
312    #[label(hir_analysis_alias_span)]
313    pub trait_alias_span: Option<Span>,
314}
315
316#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AmbiguousLifetimeBound 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 {
                    AmbiguousLifetimeBound { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_ambiguous_lifetime_bound);
                        diag.code(E0227);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
317#[diag(hir_analysis_ambiguous_lifetime_bound, code = E0227)]
318pub(crate) struct AmbiguousLifetimeBound {
319    #[primary_span]
320    pub span: Span,
321}
322
323#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AssocItemConstraintsNotAllowedHere 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 {
                    AssocItemConstraintsNotAllowedHere {
                        span: __binding_0, fn_trait_expansion: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_assoc_item_constraints_not_allowed_here);
                        diag.code(E0229);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if let Some(__binding_1) = __binding_1 {
                            diag.subdiagnostic(__binding_1);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
324#[diag(hir_analysis_assoc_item_constraints_not_allowed_here, code = E0229)]
325pub(crate) struct AssocItemConstraintsNotAllowedHere {
326    #[primary_span]
327    #[label]
328    pub span: Span,
329
330    #[subdiagnostic]
331    pub fn_trait_expansion: Option<ParenthesizedFnTraitExpansion>,
332}
333
334#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            ParamInTyOfAssocConstBinding<'tcx> 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 {
                    ParamInTyOfAssocConstBinding {
                        span: __binding_0,
                        assoc_const: __binding_1,
                        param_name: __binding_2,
                        param_def_kind: __binding_3,
                        param_category: __binding_4,
                        param_defined_here_label: __binding_5,
                        ty_note: __binding_6 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_param_in_ty_of_assoc_const_binding);
                        ;
                        diag.arg("assoc_const", __binding_1);
                        diag.arg("param_name", __binding_2);
                        diag.arg("param_def_kind", __binding_3);
                        diag.arg("param_category", __binding_4);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if let Some(__binding_5) = __binding_5 {
                            diag.span_label(__binding_5,
                                crate::fluent_generated::hir_analysis_param_defined_here_label);
                        }
                        if let Some(__binding_6) = __binding_6 {
                            diag.subdiagnostic(__binding_6);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
335#[diag(hir_analysis_param_in_ty_of_assoc_const_binding)]
336pub(crate) struct ParamInTyOfAssocConstBinding<'tcx> {
337    #[primary_span]
338    #[label]
339    pub span: Span,
340    pub assoc_const: Ident,
341    pub param_name: Symbol,
342    pub param_def_kind: &'static str,
343    pub param_category: &'static str,
344    #[label(hir_analysis_param_defined_here_label)]
345    pub param_defined_here_label: Option<Span>,
346    #[subdiagnostic]
347    pub ty_note: Option<TyOfAssocConstBindingNote<'tcx>>,
348}
349
350#[derive(const _: () =
    {
        impl<'tcx> rustc_errors::Subdiagnostic for
            TyOfAssocConstBindingNote<'tcx> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    TyOfAssocConstBindingNote {
                        assoc_const: __binding_0, ty: __binding_1 } => {
                        diag.store_args();
                        diag.arg("assoc_const", __binding_0);
                        diag.arg("ty", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_ty_of_assoc_const_binding_note);
                        diag.note(__message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic, #[automatically_derived]
impl<'tcx> ::core::clone::Clone for TyOfAssocConstBindingNote<'tcx> {
    #[inline]
    fn clone(&self) -> TyOfAssocConstBindingNote<'tcx> {
        let _: ::core::clone::AssertParamIsClone<Ident>;
        let _: ::core::clone::AssertParamIsClone<Ty<'tcx>>;
        *self
    }
}Clone, #[automatically_derived]
impl<'tcx> ::core::marker::Copy for TyOfAssocConstBindingNote<'tcx> { }Copy)]
351#[note(hir_analysis_ty_of_assoc_const_binding_note)]
352pub(crate) struct TyOfAssocConstBindingNote<'tcx> {
353    pub assoc_const: Ident,
354    pub ty: Ty<'tcx>,
355}
356
357#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            EscapingBoundVarInTyOfAssocConstBinding<'tcx> 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 {
                    EscapingBoundVarInTyOfAssocConstBinding {
                        span: __binding_0,
                        assoc_const: __binding_1,
                        var_name: __binding_2,
                        var_def_kind: __binding_3,
                        var_defined_here_label: __binding_4,
                        ty_note: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_escaping_bound_var_in_ty_of_assoc_const_binding);
                        ;
                        diag.arg("assoc_const", __binding_1);
                        diag.arg("var_name", __binding_2);
                        diag.arg("var_def_kind", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_4,
                            crate::fluent_generated::hir_analysis_var_defined_here_label);
                        if let Some(__binding_5) = __binding_5 {
                            diag.subdiagnostic(__binding_5);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
358#[diag(hir_analysis_escaping_bound_var_in_ty_of_assoc_const_binding)]
359pub(crate) struct EscapingBoundVarInTyOfAssocConstBinding<'tcx> {
360    #[primary_span]
361    #[label]
362    pub span: Span,
363    pub assoc_const: Ident,
364    pub var_name: Symbol,
365    pub var_def_kind: &'static str,
366    #[label(hir_analysis_var_defined_here_label)]
367    pub var_defined_here_label: Span,
368    #[subdiagnostic]
369    pub ty_note: Option<TyOfAssocConstBindingNote<'tcx>>,
370}
371
372#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for ParenthesizedFnTraitExpansion {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    ParenthesizedFnTraitExpansion {
                        span: __binding_0, expanded_type: __binding_1 } => {
                        diag.store_args();
                        diag.arg("expanded_type", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_parenthesized_fn_trait_expansion);
                        diag.span_help(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
373#[help(hir_analysis_parenthesized_fn_trait_expansion)]
374pub(crate) struct ParenthesizedFnTraitExpansion {
375    #[primary_span]
376    pub span: Span,
377
378    pub expanded_type: String,
379}
380
381#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ValueOfAssociatedStructAlreadySpecified 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 {
                    ValueOfAssociatedStructAlreadySpecified {
                        span: __binding_0,
                        prev_span: __binding_1,
                        item_name: __binding_2,
                        def_path: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_value_of_associated_struct_already_specified);
                        diag.code(E0719);
                        ;
                        diag.arg("item_name", __binding_2);
                        diag.arg("def_path", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::hir_analysis_previous_bound_label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
382#[diag(hir_analysis_value_of_associated_struct_already_specified, code = E0719)]
383pub(crate) struct ValueOfAssociatedStructAlreadySpecified {
384    #[primary_span]
385    #[label]
386    pub span: Span,
387    #[label(hir_analysis_previous_bound_label)]
388    pub prev_span: Span,
389    pub item_name: Ident,
390    pub def_path: String,
391}
392
393#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            UnconstrainedOpaqueType 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 {
                    UnconstrainedOpaqueType {
                        span: __binding_0, name: __binding_1, what: __binding_2 } =>
                        {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_unconstrained_opaque_type);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("name", __binding_1);
                        diag.arg("what", __binding_2);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
394#[diag(hir_analysis_unconstrained_opaque_type)]
395#[note]
396pub(crate) struct UnconstrainedOpaqueType {
397    #[primary_span]
398    pub span: Span,
399    pub name: Ident,
400    pub what: &'static str,
401}
402
403pub(crate) struct MissingTypeParams {
404    pub span: Span,
405    pub def_span: Span,
406    pub span_snippet: Option<String>,
407    pub missing_type_params: Vec<Symbol>,
408    pub empty_generic_args: bool,
409}
410
411// Manual implementation of `Diagnostic` to be able to call `span_to_snippet`.
412impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for MissingTypeParams {
413    #[track_caller]
414    fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
415        let mut err = Diag::new(dcx, level, fluent::hir_analysis_missing_type_params);
416        err.span(self.span);
417        err.code(E0393);
418        err.arg("parameterCount", self.missing_type_params.len());
419        err.arg(
420            "parameters",
421            self.missing_type_params
422                .iter()
423                .map(|n| ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("`{0}`", n))
    })format!("`{n}`"))
424                .collect::<Vec<_>>()
425                .join(", "),
426        );
427
428        err.span_label(self.def_span, fluent::hir_analysis_label);
429
430        let mut suggested = false;
431        // Don't suggest setting the type params if there are some already: the order is
432        // tricky to get right and the user will already know what the syntax is.
433        if let Some(snippet) = self.span_snippet
434            && self.empty_generic_args
435        {
436            if snippet.ends_with('>') {
437                // The user wrote `Trait<'a, T>` or similar. To provide an accurate suggestion
438                // we would have to preserve the right order. For now, as clearly the user is
439                // aware of the syntax, we do nothing.
440            } else {
441                // The user wrote `Iterator`, so we don't have a type we can suggest, but at
442                // least we can clue them to the correct syntax `Iterator<Type>`.
443                err.span_suggestion_verbose(
444                    self.span.shrink_to_hi(),
445                    fluent::hir_analysis_suggestion,
446                    ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("<{0}>",
                self.missing_type_params.iter().map(|n|
                                n.to_string()).collect::<Vec<_>>().join(", ")))
    })format!(
447                        "<{}>",
448                        self.missing_type_params
449                            .iter()
450                            .map(|n| n.to_string())
451                            .collect::<Vec<_>>()
452                            .join(", ")
453                    ),
454                    Applicability::HasPlaceholders,
455                );
456                suggested = true;
457            }
458        }
459        if !suggested {
460            err.span_label(self.span, fluent::hir_analysis_no_suggestion_label);
461        }
462
463        err.note(fluent::hir_analysis_note);
464        err
465    }
466}
467
468#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ManualImplementation 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 {
                    ManualImplementation {
                        span: __binding_0, trait_name: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_manual_implementation);
                        diag.code(E0183);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
469#[diag(hir_analysis_manual_implementation, code = E0183)]
470#[help]
471pub(crate) struct ManualImplementation {
472    #[primary_span]
473    #[label]
474    pub span: Span,
475    pub trait_name: String,
476}
477
478#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            GenericArgsOnOverriddenImpl 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 {
                    GenericArgsOnOverriddenImpl { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_generic_args_on_overridden_impl);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
479#[diag(hir_analysis_generic_args_on_overridden_impl)]
480pub(crate) struct GenericArgsOnOverriddenImpl {
481    #[primary_span]
482    pub span: Span,
483}
484
485#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ConstImplForNonConstTrait 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 {
                    ConstImplForNonConstTrait {
                        trait_ref_span: __binding_0,
                        trait_name: __binding_1,
                        suggestion: __binding_2,
                        suggestion_pre: __binding_3,
                        marking: __binding_4,
                        adding: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_const_impl_for_non_const_trait);
                        let __code_8 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("const "))
                                            })].into_iter();
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.arg("suggestion_pre", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_suggestions_with_style(__binding_2,
                                crate::fluent_generated::_subdiag::suggestion, __code_8,
                                rustc_errors::Applicability::MachineApplicable,
                                rustc_errors::SuggestionStyle::ShowAlways);
                        }
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag.note(crate::fluent_generated::hir_analysis_adding);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
486#[diag(hir_analysis_const_impl_for_non_const_trait)]
487pub(crate) struct ConstImplForNonConstTrait {
488    #[primary_span]
489    #[label]
490    pub trait_ref_span: Span,
491    pub trait_name: String,
492    #[suggestion(applicability = "machine-applicable", code = "const ", style = "verbose")]
493    pub suggestion: Option<Span>,
494    pub suggestion_pre: &'static str,
495    #[note]
496    pub marking: (),
497    #[note(hir_analysis_adding)]
498    pub adding: (),
499}
500
501#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ConstBoundForNonConstTrait 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 {
                    ConstBoundForNonConstTrait {
                        span: __binding_0,
                        modifier: __binding_1,
                        def_span: __binding_2,
                        suggestion: __binding_3,
                        suggestion_pre: __binding_4,
                        trait_name: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_const_bound_for_non_const_trait);
                        let __code_9 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("const "))
                                            })].into_iter();
                        ;
                        diag.arg("modifier", __binding_1);
                        diag.arg("suggestion_pre", __binding_4);
                        diag.arg("trait_name", __binding_5);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_note(__binding_2,
                                crate::fluent_generated::_subdiag::note);
                        }
                        if let Some(__binding_3) = __binding_3 {
                            diag.span_suggestions_with_style(__binding_3,
                                crate::fluent_generated::_subdiag::suggestion, __code_9,
                                rustc_errors::Applicability::MachineApplicable,
                                rustc_errors::SuggestionStyle::ShowAlways);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
502#[diag(hir_analysis_const_bound_for_non_const_trait)]
503pub(crate) struct ConstBoundForNonConstTrait {
504    #[primary_span]
505    #[label]
506    pub span: Span,
507    pub modifier: &'static str,
508    #[note]
509    pub def_span: Option<Span>,
510    #[suggestion(applicability = "machine-applicable", code = "const ", style = "verbose")]
511    pub suggestion: Option<Span>,
512    pub suggestion_pre: &'static str,
513    pub trait_name: String,
514}
515
516#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for SelfInImplSelf
            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 {
                    SelfInImplSelf { span: __binding_0, note: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_self_in_impl_self);
                        ;
                        diag.span(__binding_0);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
517#[diag(hir_analysis_self_in_impl_self)]
518pub(crate) struct SelfInImplSelf {
519    #[primary_span]
520    pub span: MultiSpan,
521    #[note]
522    pub note: (),
523}
524
525#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for LinkageType
            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 {
                    LinkageType { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_linkage_type);
                        diag.code(E0791);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
526#[diag(hir_analysis_linkage_type, code = E0791)]
527pub(crate) struct LinkageType {
528    #[primary_span]
529    pub span: Span,
530}
531
532#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            AutoDerefReachedRecursionLimit<'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 {
                    AutoDerefReachedRecursionLimit {
                        span: __binding_0,
                        ty: __binding_1,
                        suggested_limit: __binding_2,
                        crate_name: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_auto_deref_reached_recursion_limit);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        diag.code(E0055);
                        ;
                        diag.arg("ty", __binding_1);
                        diag.arg("suggested_limit", __binding_2);
                        diag.arg("crate_name", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
533#[help]
534#[diag(hir_analysis_auto_deref_reached_recursion_limit, code = E0055)]
535pub(crate) struct AutoDerefReachedRecursionLimit<'a> {
536    #[primary_span]
537    #[label]
538    pub span: Span,
539    pub ty: Ty<'a>,
540    pub suggested_limit: Limit,
541    pub crate_name: Symbol,
542}
543
544#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            WhereClauseOnMain 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 {
                    WhereClauseOnMain {
                        span: __binding_0, generics_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_where_clause_on_main);
                        diag.code(E0646);
                        ;
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_label(__binding_1,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
545#[diag(hir_analysis_where_clause_on_main, code = E0646)]
546pub(crate) struct WhereClauseOnMain {
547    #[primary_span]
548    pub span: Span,
549    #[label]
550    pub generics_span: Option<Span>,
551}
552
553#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            TrackCallerOnMain 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 {
                    TrackCallerOnMain {
                        span: __binding_0, annotated: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_track_caller_on_main);
                        let __code_10 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!(""))
                                            })].into_iter();
                        ;
                        diag.span(__binding_0);
                        diag.span_suggestions_with_style(__binding_0,
                            crate::fluent_generated::_subdiag::suggestion, __code_10,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::hir_analysis_track_caller_on_main);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
554#[diag(hir_analysis_track_caller_on_main)]
555pub(crate) struct TrackCallerOnMain {
556    #[primary_span]
557    #[suggestion(applicability = "maybe-incorrect", code = "")]
558    pub span: Span,
559    #[label(hir_analysis_track_caller_on_main)]
560    pub annotated: Span,
561}
562
563#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            TargetFeatureOnMain 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 {
                    TargetFeatureOnMain { main: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_target_feature_on_main);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::hir_analysis_target_feature_on_main);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
564#[diag(hir_analysis_target_feature_on_main)]
565pub(crate) struct TargetFeatureOnMain {
566    #[primary_span]
567    #[label(hir_analysis_target_feature_on_main)]
568    pub main: Span,
569}
570
571#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MainFunctionReturnTypeGeneric 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 {
                    MainFunctionReturnTypeGeneric { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_main_function_return_type_generic);
                        diag.code(E0131);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
572#[diag(hir_analysis_main_function_return_type_generic, code = E0131)]
573pub(crate) struct MainFunctionReturnTypeGeneric {
574    #[primary_span]
575    pub span: Span,
576}
577
578#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MainFunctionAsync 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 {
                    MainFunctionAsync {
                        span: __binding_0, asyncness: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_main_function_async);
                        diag.code(E0752);
                        ;
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_label(__binding_1,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
579#[diag(hir_analysis_main_function_async, code = E0752)]
580pub(crate) struct MainFunctionAsync {
581    #[primary_span]
582    pub span: Span,
583    #[label]
584    pub asyncness: Option<Span>,
585}
586
587#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MainFunctionGenericParameters 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 {
                    MainFunctionGenericParameters {
                        span: __binding_0, label_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_main_function_generic_parameters);
                        diag.code(E0131);
                        ;
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_label(__binding_1,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
588#[diag(hir_analysis_main_function_generic_parameters, code = E0131)]
589pub(crate) struct MainFunctionGenericParameters {
590    #[primary_span]
591    pub span: Span,
592    #[label]
593    pub label_span: Option<Span>,
594}
595
596#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            VariadicFunctionCompatibleConvention<'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 {
                    VariadicFunctionCompatibleConvention {
                        span: __binding_0, convention: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_variadic_function_compatible_convention);
                        diag.code(E0045);
                        ;
                        diag.arg("convention", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
597#[diag(hir_analysis_variadic_function_compatible_convention, code = E0045)]
598pub(crate) struct VariadicFunctionCompatibleConvention<'a> {
599    #[primary_span]
600    #[label]
601    pub span: Span,
602    pub convention: &'a str,
603}
604
605#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CannotCaptureLateBound 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 {
                    CannotCaptureLateBound::Type {
                        use_span: __binding_0,
                        def_span: __binding_1,
                        what: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cannot_capture_late_bound_ty);
                        ;
                        diag.arg("what", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                    CannotCaptureLateBound::Const {
                        use_span: __binding_0,
                        def_span: __binding_1,
                        what: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cannot_capture_late_bound_const);
                        ;
                        diag.arg("what", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                    CannotCaptureLateBound::Lifetime {
                        use_span: __binding_0,
                        def_span: __binding_1,
                        what: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cannot_capture_late_bound_lifetime);
                        ;
                        diag.arg("what", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
606pub(crate) enum CannotCaptureLateBound {
607    #[diag(hir_analysis_cannot_capture_late_bound_ty)]
608    Type {
609        #[primary_span]
610        use_span: Span,
611        #[label]
612        def_span: Span,
613        what: &'static str,
614    },
615    #[diag(hir_analysis_cannot_capture_late_bound_const)]
616    Const {
617        #[primary_span]
618        use_span: Span,
619        #[label]
620        def_span: Span,
621        what: &'static str,
622    },
623    #[diag(hir_analysis_cannot_capture_late_bound_lifetime)]
624    Lifetime {
625        #[primary_span]
626        use_span: Span,
627        #[label]
628        def_span: Span,
629        what: &'static str,
630    },
631}
632
633#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for VariancesOf
            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 {
                    VariancesOf { span: __binding_0, variances: __binding_1 } =>
                        {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_variances_of);
                        ;
                        diag.arg("variances", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
634#[diag(hir_analysis_variances_of)]
635pub(crate) struct VariancesOf {
636    #[primary_span]
637    pub span: Span,
638    pub variances: String,
639}
640
641#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            TypeOf<'tcx> 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 {
                    TypeOf { span: __binding_0, ty: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_type_of);
                        ;
                        diag.arg("ty", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
642#[diag(hir_analysis_type_of)]
643pub(crate) struct TypeOf<'tcx> {
644    #[primary_span]
645    pub span: Span,
646    pub ty: Ty<'tcx>,
647}
648
649#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            InvalidUnionField 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 {
                    InvalidUnionField {
                        field_span: __binding_0,
                        sugg: __binding_1,
                        note: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_invalid_union_field);
                        diag.code(E0740);
                        ;
                        diag.span(__binding_0);
                        diag.subdiagnostic(__binding_1);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
650#[diag(hir_analysis_invalid_union_field, code = E0740)]
651pub(crate) struct InvalidUnionField {
652    #[primary_span]
653    pub field_span: Span,
654    #[subdiagnostic]
655    pub sugg: InvalidUnionFieldSuggestion,
656    #[note]
657    pub note: (),
658}
659
660#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            ReturnTypeNotationOnNonRpitit<'tcx> 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 {
                    ReturnTypeNotationOnNonRpitit {
                        span: __binding_0,
                        ty: __binding_1,
                        fn_span: __binding_2,
                        note: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_return_type_notation_on_non_rpitit);
                        ;
                        diag.arg("ty", __binding_1);
                        diag.span(__binding_0);
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_label(__binding_2,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
661#[diag(hir_analysis_return_type_notation_on_non_rpitit)]
662pub(crate) struct ReturnTypeNotationOnNonRpitit<'tcx> {
663    #[primary_span]
664    pub span: Span,
665    pub ty: Ty<'tcx>,
666    #[label]
667    pub fn_span: Option<Span>,
668    #[note]
669    pub note: (),
670}
671
672#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for InvalidUnionFieldSuggestion {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    InvalidUnionFieldSuggestion {
                        lo: __binding_0, hi: __binding_1 } => {
                        let mut suggestions = Vec::new();
                        let __code_11 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("std::mem::ManuallyDrop<"))
                                });
                        let __code_12 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!(">"))
                                });
                        suggestions.push((__binding_0, __code_11));
                        suggestions.push((__binding_1, __code_12));
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_invalid_union_field_sugg);
                        diag.multipart_suggestion_with_style(__message, suggestions,
                            rustc_errors::Applicability::MachineApplicable,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
673#[multipart_suggestion(hir_analysis_invalid_union_field_sugg, applicability = "machine-applicable")]
674pub(crate) struct InvalidUnionFieldSuggestion {
675    #[suggestion_part(code = "std::mem::ManuallyDrop<")]
676    pub lo: Span,
677    #[suggestion_part(code = ">")]
678    pub hi: Span,
679}
680
681#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ReturnTypeNotationEqualityBound 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 {
                    ReturnTypeNotationEqualityBound { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_return_type_notation_equality_bound);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
682#[diag(hir_analysis_return_type_notation_equality_bound)]
683pub(crate) struct ReturnTypeNotationEqualityBound {
684    #[primary_span]
685    pub span: Span,
686}
687
688#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            PlaceholderNotAllowedItemSignatures 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 {
                    PlaceholderNotAllowedItemSignatures {
                        spans: __binding_0, kind: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_placeholder_not_allowed_item_signatures);
                        diag.code(E0121);
                        ;
                        diag.arg("kind", __binding_1);
                        diag.span(__binding_0.clone());
                        for __binding_0 in __binding_0 {
                            diag.span_label(__binding_0,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
689#[diag(hir_analysis_placeholder_not_allowed_item_signatures, code = E0121)]
690pub(crate) struct PlaceholderNotAllowedItemSignatures {
691    #[primary_span]
692    #[label]
693    pub spans: Vec<Span>,
694    pub kind: String,
695}
696
697#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AssociatedItemTraitUninferredGenericParams 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 {
                    AssociatedItemTraitUninferredGenericParams {
                        span: __binding_0,
                        inferred_sugg: __binding_1,
                        bound: __binding_2,
                        mpart_sugg: __binding_3,
                        what: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_associated_type_trait_uninferred_generic_params);
                        let __code_13 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_2))
                                            })].into_iter();
                        diag.code(E0212);
                        ;
                        diag.arg("bound", __binding_2);
                        diag.arg("what", __binding_4);
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_suggestions_with_style(__binding_1,
                                crate::fluent_generated::_subdiag::suggestion, __code_13,
                                rustc_errors::Applicability::MaybeIncorrect,
                                rustc_errors::SuggestionStyle::ShowAlways);
                        }
                        if let Some(__binding_3) = __binding_3 {
                            diag.subdiagnostic(__binding_3);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
698#[diag(hir_analysis_associated_type_trait_uninferred_generic_params, code = E0212)]
699pub(crate) struct AssociatedItemTraitUninferredGenericParams {
700    #[primary_span]
701    pub span: Span,
702    #[suggestion(style = "verbose", applicability = "maybe-incorrect", code = "{bound}")]
703    pub inferred_sugg: Option<Span>,
704    pub bound: String,
705    #[subdiagnostic]
706    pub mpart_sugg: Option<AssociatedItemTraitUninferredGenericParamsMultipartSuggestion>,
707    pub what: &'static str,
708}
709
710#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for
            AssociatedItemTraitUninferredGenericParamsMultipartSuggestion {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    AssociatedItemTraitUninferredGenericParamsMultipartSuggestion {
                        fspan: __binding_0,
                        first: __binding_1,
                        sspan: __binding_2,
                        second: __binding_3 } => {
                        let mut suggestions = Vec::new();
                        let __code_14 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("{0}", __binding_1))
                                });
                        let __code_15 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("{0}", __binding_3))
                                });
                        suggestions.push((__binding_0, __code_14));
                        suggestions.push((__binding_2, __code_15));
                        diag.store_args();
                        diag.arg("first", __binding_1);
                        diag.arg("second", __binding_3);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_associated_type_trait_uninferred_generic_params_multipart_suggestion);
                        diag.multipart_suggestion_with_style(__message, suggestions,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
711#[multipart_suggestion(
712    hir_analysis_associated_type_trait_uninferred_generic_params_multipart_suggestion,
713    applicability = "maybe-incorrect"
714)]
715pub(crate) struct AssociatedItemTraitUninferredGenericParamsMultipartSuggestion {
716    #[suggestion_part(code = "{first}")]
717    pub fspan: Span,
718    pub first: String,
719    #[suggestion_part(code = "{second}")]
720    pub sspan: Span,
721    pub second: String,
722}
723
724#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            EnumDiscriminantOverflowed 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 {
                    EnumDiscriminantOverflowed {
                        span: __binding_0,
                        discr: __binding_1,
                        item_name: __binding_2,
                        wrapped_discr: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_enum_discriminant_overflowed);
                        diag.code(E0370);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("discr", __binding_1);
                        diag.arg("item_name", __binding_2);
                        diag.arg("wrapped_discr", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
725#[diag(hir_analysis_enum_discriminant_overflowed, code = E0370)]
726#[note]
727pub(crate) struct EnumDiscriminantOverflowed {
728    #[primary_span]
729    #[label]
730    pub span: Span,
731    pub discr: String,
732    pub item_name: Ident,
733    pub wrapped_discr: String,
734}
735
736#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ParenSugarAttribute 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 {
                    ParenSugarAttribute { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_paren_sugar_attribute);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
737#[diag(hir_analysis_paren_sugar_attribute)]
738#[help]
739pub(crate) struct ParenSugarAttribute {
740    #[primary_span]
741    pub span: Span,
742}
743
744#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            SIMDFFIHighlyExperimental 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 {
                    SIMDFFIHighlyExperimental {
                        span: __binding_0, snip: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_simd_ffi_highly_experimental);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.arg("snip", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
745#[diag(hir_analysis_simd_ffi_highly_experimental)]
746#[help]
747pub(crate) struct SIMDFFIHighlyExperimental {
748    #[primary_span]
749    pub span: Span,
750    pub snip: String,
751}
752
753#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ImplNotMarkedDefault 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 {
                    ImplNotMarkedDefault::Ok {
                        span: __binding_0, ok_label: __binding_1, ident: __binding_2
                        } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_impl_not_marked_default);
                        diag.code(E0520);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("ident", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::hir_analysis_ok_label);
                        diag
                    }
                    ImplNotMarkedDefault::Err {
                        span: __binding_0, cname: __binding_1, ident: __binding_2 }
                        => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_impl_not_marked_default_err);
                        diag.code(E0520);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("cname", __binding_1);
                        diag.arg("ident", __binding_2);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
754pub(crate) enum ImplNotMarkedDefault {
755    #[diag(hir_analysis_impl_not_marked_default, code = E0520)]
756    #[note]
757    Ok {
758        #[primary_span]
759        #[label]
760        span: Span,
761        #[label(hir_analysis_ok_label)]
762        ok_label: Span,
763        ident: Ident,
764    },
765    #[diag(hir_analysis_impl_not_marked_default_err, code = E0520)]
766    #[note]
767    Err {
768        #[primary_span]
769        span: Span,
770        cname: Symbol,
771        ident: Ident,
772    },
773}
774
775#[derive(const _: () =
    {
        impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for UselessImplItem
            {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    UselessImplItem => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_useless_impl_item);
                        ;
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
776#[diag(hir_analysis_useless_impl_item)]
777pub(crate) struct UselessImplItem;
778
779#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MissingTraitItem 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 {
                    MissingTraitItem {
                        span: __binding_0,
                        missing_trait_item_label: __binding_1,
                        missing_trait_item: __binding_2,
                        missing_trait_item_none: __binding_3,
                        missing_items_msg: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_missing_trait_item);
                        diag.code(E0046);
                        ;
                        diag.arg("missing_items_msg", __binding_4);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        for __binding_1 in __binding_1 {
                            diag.subdiagnostic(__binding_1);
                        }
                        for __binding_2 in __binding_2 {
                            diag.subdiagnostic(__binding_2);
                        }
                        for __binding_3 in __binding_3 {
                            diag.subdiagnostic(__binding_3);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
780#[diag(hir_analysis_missing_trait_item, code = E0046)]
781pub(crate) struct MissingTraitItem {
782    #[primary_span]
783    #[label]
784    pub span: Span,
785    #[subdiagnostic]
786    pub missing_trait_item_label: Vec<MissingTraitItemLabel>,
787    #[subdiagnostic]
788    pub missing_trait_item: Vec<MissingTraitItemSuggestion>,
789    #[subdiagnostic]
790    pub missing_trait_item_none: Vec<MissingTraitItemSuggestionNone>,
791    pub missing_items_msg: String,
792}
793
794#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for MissingTraitItemLabel {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    MissingTraitItemLabel { span: __binding_0, item: __binding_1
                        } => {
                        diag.store_args();
                        diag.arg("item", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_missing_trait_item_label);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
795#[label(hir_analysis_missing_trait_item_label)]
796pub(crate) struct MissingTraitItemLabel {
797    #[primary_span]
798    pub span: Span,
799    pub item: Symbol,
800}
801
802#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for MissingTraitItemSuggestion {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    MissingTraitItemSuggestion {
                        span: __binding_0, code: __binding_1, snippet: __binding_2 }
                        => {
                        let __code_16 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_1))
                                            })].into_iter();
                        diag.store_args();
                        diag.arg("code", __binding_1);
                        diag.arg("snippet", __binding_2);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_missing_trait_item_suggestion);
                        diag.span_suggestions_with_style(__binding_0, __message,
                            __code_16, rustc_errors::Applicability::HasPlaceholders,
                            rustc_errors::SuggestionStyle::CompletelyHidden);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
803#[suggestion(
804    hir_analysis_missing_trait_item_suggestion,
805    style = "tool-only",
806    applicability = "has-placeholders",
807    code = "{code}"
808)]
809pub(crate) struct MissingTraitItemSuggestion {
810    #[primary_span]
811    pub span: Span,
812    pub code: String,
813    pub snippet: String,
814}
815
816#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for MissingTraitItemSuggestionNone {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    MissingTraitItemSuggestionNone {
                        span: __binding_0, code: __binding_1, snippet: __binding_2 }
                        => {
                        let __code_17 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_1))
                                            })].into_iter();
                        diag.store_args();
                        diag.arg("code", __binding_1);
                        diag.arg("snippet", __binding_2);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_missing_trait_item_suggestion);
                        diag.span_suggestions_with_style(__binding_0, __message,
                            __code_17, rustc_errors::Applicability::HasPlaceholders,
                            rustc_errors::SuggestionStyle::HideCodeAlways);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
817#[suggestion(
818    hir_analysis_missing_trait_item_suggestion,
819    style = "hidden",
820    applicability = "has-placeholders",
821    code = "{code}"
822)]
823pub(crate) struct MissingTraitItemSuggestionNone {
824    #[primary_span]
825    pub span: Span,
826    pub code: String,
827    pub snippet: String,
828}
829
830#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MissingOneOfTraitItem 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 {
                    MissingOneOfTraitItem {
                        span: __binding_0,
                        note: __binding_1,
                        missing_items_msg: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_missing_one_of_trait_item);
                        diag.code(E0046);
                        ;
                        diag.arg("missing_items_msg", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_note(__binding_1,
                                crate::fluent_generated::_subdiag::note);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
831#[diag(hir_analysis_missing_one_of_trait_item, code = E0046)]
832pub(crate) struct MissingOneOfTraitItem {
833    #[primary_span]
834    #[label]
835    pub span: Span,
836    #[note]
837    pub note: Option<Span>,
838    pub missing_items_msg: String,
839}
840
841#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MissingTraitItemUnstable 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 {
                    MissingTraitItemUnstable {
                        span: __binding_0,
                        some_note: __binding_1,
                        none_note: __binding_2,
                        missing_item_name: __binding_3,
                        feature: __binding_4,
                        reason: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_missing_trait_item_unstable);
                        diag.code(E0046);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("missing_item_name", __binding_3);
                        diag.arg("feature", __binding_4);
                        diag.arg("reason", __binding_5);
                        diag.span(__binding_0);
                        if __binding_1 {
                            diag.note(crate::fluent_generated::hir_analysis_some_note);
                        }
                        if __binding_2 {
                            diag.note(crate::fluent_generated::hir_analysis_none_note);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
842#[diag(hir_analysis_missing_trait_item_unstable, code = E0046)]
843#[note]
844pub(crate) struct MissingTraitItemUnstable {
845    #[primary_span]
846    pub span: Span,
847    #[note(hir_analysis_some_note)]
848    pub some_note: bool,
849    #[note(hir_analysis_none_note)]
850    pub none_note: bool,
851    pub missing_item_name: Ident,
852    pub feature: Symbol,
853    pub reason: String,
854}
855
856#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            TransparentEnumVariant 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 {
                    TransparentEnumVariant {
                        span: __binding_0,
                        spans: __binding_1,
                        many: __binding_2,
                        number: __binding_3,
                        path: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_transparent_enum_variant);
                        diag.code(E0731);
                        ;
                        diag.arg("number", __binding_3);
                        diag.arg("path", __binding_4);
                        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::hir_analysis_multi_label);
                        }
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_label(__binding_2,
                                crate::fluent_generated::hir_analysis_many_label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
857#[diag(hir_analysis_transparent_enum_variant, code = E0731)]
858pub(crate) struct TransparentEnumVariant {
859    #[primary_span]
860    #[label]
861    pub span: Span,
862    #[label(hir_analysis_multi_label)]
863    pub spans: Vec<Span>,
864    #[label(hir_analysis_many_label)]
865    pub many: Option<Span>,
866    pub number: usize,
867    pub path: String,
868}
869
870#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            TransparentNonZeroSizedEnum<'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 {
                    TransparentNonZeroSizedEnum {
                        span: __binding_0,
                        spans: __binding_1,
                        field_count: __binding_2,
                        desc: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_transparent_non_zero_sized_enum);
                        diag.code(E0690);
                        ;
                        diag.arg("field_count", __binding_2);
                        diag.arg("desc", __binding_3);
                        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::hir_analysis_labels);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
871#[diag(hir_analysis_transparent_non_zero_sized_enum, code = E0690)]
872pub(crate) struct TransparentNonZeroSizedEnum<'a> {
873    #[primary_span]
874    #[label]
875    pub span: Span,
876    #[label(hir_analysis_labels)]
877    pub spans: Vec<Span>,
878    pub field_count: usize,
879    pub desc: &'a str,
880}
881
882#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            TransparentNonZeroSized<'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 {
                    TransparentNonZeroSized {
                        span: __binding_0,
                        spans: __binding_1,
                        field_count: __binding_2,
                        desc: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_transparent_non_zero_sized);
                        diag.code(E0690);
                        ;
                        diag.arg("field_count", __binding_2);
                        diag.arg("desc", __binding_3);
                        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::hir_analysis_labels);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
883#[diag(hir_analysis_transparent_non_zero_sized, code = E0690)]
884pub(crate) struct TransparentNonZeroSized<'a> {
885    #[primary_span]
886    #[label]
887    pub span: Span,
888    #[label(hir_analysis_labels)]
889    pub spans: Vec<Span>,
890    pub field_count: usize,
891    pub desc: &'a str,
892}
893
894#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for TooLargeStatic
            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 {
                    TooLargeStatic { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_too_large_static);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
895#[diag(hir_analysis_too_large_static)]
896pub(crate) struct TooLargeStatic {
897    #[primary_span]
898    pub span: Span,
899}
900
901#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            SpecializationTrait 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 {
                    SpecializationTrait { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_specialization_trait);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
902#[diag(hir_analysis_specialization_trait)]
903#[help]
904pub(crate) struct SpecializationTrait {
905    #[primary_span]
906    pub span: Span,
907}
908
909#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ClosureImplicitHrtb 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 {
                    ClosureImplicitHrtb {
                        spans: __binding_0, for_sp: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_closure_implicit_hrtb);
                        ;
                        diag.span(__binding_0.clone());
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
910#[diag(hir_analysis_closure_implicit_hrtb)]
911pub(crate) struct ClosureImplicitHrtb {
912    #[primary_span]
913    pub spans: Vec<Span>,
914    #[label]
915    pub for_sp: Span,
916}
917
918#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            EmptySpecialization 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 {
                    EmptySpecialization {
                        span: __binding_0, base_impl_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_empty_specialization);
                        ;
                        diag.span(__binding_0);
                        diag.span_note(__binding_1,
                            crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
919#[diag(hir_analysis_empty_specialization)]
920pub(crate) struct EmptySpecialization {
921    #[primary_span]
922    pub span: Span,
923    #[note]
924    pub base_impl_span: Span,
925}
926
927#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            StaticSpecialize 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 {
                    StaticSpecialize { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_static_specialize);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
928#[diag(hir_analysis_static_specialize)]
929pub(crate) struct StaticSpecialize {
930    #[primary_span]
931    pub span: Span,
932}
933
934#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            DropImplPolarity 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 {
                    DropImplPolarity::Negative { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_drop_impl_negative);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                    DropImplPolarity::Reservation { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_drop_impl_reservation);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
935pub(crate) enum DropImplPolarity {
936    #[diag(hir_analysis_drop_impl_negative)]
937    Negative {
938        #[primary_span]
939        span: Span,
940    },
941    #[diag(hir_analysis_drop_impl_reservation)]
942    Reservation {
943        #[primary_span]
944        span: Span,
945    },
946}
947
948#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            ReturnTypeNotationIllegalParam 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 {
                    ReturnTypeNotationIllegalParam::Type {
                        span: __binding_0, param_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_return_type_notation_illegal_param_type);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                    ReturnTypeNotationIllegalParam::Const {
                        span: __binding_0, param_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_return_type_notation_illegal_param_const);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
949pub(crate) enum ReturnTypeNotationIllegalParam {
950    #[diag(hir_analysis_return_type_notation_illegal_param_type)]
951    Type {
952        #[primary_span]
953        span: Span,
954        #[label]
955        param_span: Span,
956    },
957    #[diag(hir_analysis_return_type_notation_illegal_param_const)]
958    Const {
959        #[primary_span]
960        span: Span,
961        #[label]
962        param_span: Span,
963    },
964}
965
966#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            LateBoundInApit 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 {
                    LateBoundInApit::Type {
                        span: __binding_0, param_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_late_bound_type_in_apit);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                    LateBoundInApit::Const {
                        span: __binding_0, param_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_late_bound_const_in_apit);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                    LateBoundInApit::Lifetime {
                        span: __binding_0, param_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_late_bound_lifetime_in_apit);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
967pub(crate) enum LateBoundInApit {
968    #[diag(hir_analysis_late_bound_type_in_apit)]
969    Type {
970        #[primary_span]
971        span: Span,
972        #[label]
973        param_span: Span,
974    },
975    #[diag(hir_analysis_late_bound_const_in_apit)]
976    Const {
977        #[primary_span]
978        span: Span,
979        #[label]
980        param_span: Span,
981    },
982    #[diag(hir_analysis_late_bound_lifetime_in_apit)]
983    Lifetime {
984        #[primary_span]
985        span: Span,
986        #[label]
987        param_span: Span,
988    },
989}
990
991#[derive(const _: () =
    {
        impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for
            UnusedAssociatedTypeBounds {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    UnusedAssociatedTypeBounds { span: __binding_0 } => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_unused_associated_type_bounds);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        let __code_18 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!(""))
                                            })].into_iter();
                        diag.span_suggestions_with_style(__binding_0,
                            crate::fluent_generated::_subdiag::suggestion, __code_18,
                            rustc_errors::Applicability::Unspecified,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
992#[diag(hir_analysis_unused_associated_type_bounds)]
993#[note]
994pub(crate) struct UnusedAssociatedTypeBounds {
995    #[suggestion(code = "")]
996    pub span: Span,
997}
998
999#[derive(const _: () =
    {
        impl<'__a, 'tcx> rustc_errors::LintDiagnostic<'__a, ()> for
            ReturnPositionImplTraitInTraitRefined<'tcx> {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    ReturnPositionImplTraitInTraitRefined {
                        impl_return_span: __binding_0,
                        trait_return_span: __binding_1,
                        unmatched_bound: __binding_2,
                        pre: __binding_3,
                        post: __binding_4,
                        return_ty: __binding_5 } => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_rpitit_refined);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag.note(crate::fluent_generated::hir_analysis_feedback_note);
                        ;
                        let __code_19 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{1}{2}{0}", __binding_4,
                                                        __binding_3, __binding_5))
                                            })].into_iter();
                        diag.arg("pre", __binding_3);
                        diag.arg("post", __binding_4);
                        diag.arg("return_ty", __binding_5);
                        diag.span_suggestions_with_style(__binding_0,
                            crate::fluent_generated::_subdiag::suggestion, __code_19,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_label(__binding_1,
                                crate::fluent_generated::_subdiag::label);
                        }
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_label(__binding_2,
                                crate::fluent_generated::hir_analysis_unmatched_bound_label);
                        }
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
1000#[diag(hir_analysis_rpitit_refined)]
1001#[note]
1002#[note(hir_analysis_feedback_note)]
1003pub(crate) struct ReturnPositionImplTraitInTraitRefined<'tcx> {
1004    #[suggestion(applicability = "maybe-incorrect", code = "{pre}{return_ty}{post}")]
1005    pub impl_return_span: Span,
1006    #[label]
1007    pub trait_return_span: Option<Span>,
1008    #[label(hir_analysis_unmatched_bound_label)]
1009    pub unmatched_bound: Option<Span>,
1010
1011    pub pre: &'static str,
1012    pub post: &'static str,
1013    pub return_ty: Ty<'tcx>,
1014}
1015
1016#[derive(const _: () =
    {
        impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for
            ReturnPositionImplTraitInTraitRefinedLifetimes {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    ReturnPositionImplTraitInTraitRefinedLifetimes {
                        suggestion_span: __binding_0, suggestion: __binding_1 } => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_rpitit_refined_lifetimes);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag.note(crate::fluent_generated::hir_analysis_feedback_note);
                        ;
                        let __code_20 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("{0}", __binding_1))
                                            })].into_iter();
                        diag.arg("suggestion", __binding_1);
                        diag.span_suggestions_with_style(__binding_0,
                            crate::fluent_generated::_subdiag::suggestion, __code_20,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
1017#[diag(hir_analysis_rpitit_refined_lifetimes)]
1018#[note]
1019#[note(hir_analysis_feedback_note)]
1020pub(crate) struct ReturnPositionImplTraitInTraitRefinedLifetimes {
1021    #[suggestion(applicability = "maybe-incorrect", code = "{suggestion}")]
1022    pub suggestion_span: Span,
1023    pub suggestion: String,
1024}
1025
1026#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            InherentTyOutside 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 {
                    InherentTyOutside { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_ty_outside);
                        diag.code(E0390);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        diag.span_help(__binding_0,
                            crate::fluent_generated::hir_analysis_span_help);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1027#[diag(hir_analysis_inherent_ty_outside, code = E0390)]
1028#[help]
1029pub(crate) struct InherentTyOutside {
1030    #[primary_span]
1031    #[help(hir_analysis_span_help)]
1032    pub span: Span,
1033}
1034
1035#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            DispatchFromDynRepr 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 {
                    DispatchFromDynRepr { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_dispatch_from_dyn_repr);
                        diag.code(E0378);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1036#[diag(hir_analysis_dispatch_from_dyn_repr, code = E0378)]
1037pub(crate) struct DispatchFromDynRepr {
1038    #[primary_span]
1039    pub span: Span,
1040}
1041
1042#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoercePointeeNotStruct 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 {
                    CoercePointeeNotStruct {
                        span: __binding_0, kind: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_pointee_not_struct);
                        diag.code(E0802);
                        ;
                        diag.arg("kind", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1043#[diag(hir_analysis_coerce_pointee_not_struct, code = E0802)]
1044pub(crate) struct CoercePointeeNotStruct {
1045    #[primary_span]
1046    pub span: Span,
1047    pub kind: String,
1048}
1049
1050#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoercePointeeNotConcreteType 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 {
                    CoercePointeeNotConcreteType { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_pointee_not_concrete_ty);
                        diag.code(E0802);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1051#[diag(hir_analysis_coerce_pointee_not_concrete_ty, code = E0802)]
1052pub(crate) struct CoercePointeeNotConcreteType {
1053    #[primary_span]
1054    pub span: Span,
1055}
1056
1057#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoercePointeeNoUserValidityAssertion 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 {
                    CoercePointeeNoUserValidityAssertion { span: __binding_0 }
                        => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_pointee_no_user_validity_assertion);
                        diag.code(E0802);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1058#[diag(hir_analysis_coerce_pointee_no_user_validity_assertion, code = E0802)]
1059pub(crate) struct CoercePointeeNoUserValidityAssertion {
1060    #[primary_span]
1061    pub span: Span,
1062}
1063
1064#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoercePointeeNotTransparent 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 {
                    CoercePointeeNotTransparent { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_pointee_not_transparent);
                        diag.code(E0802);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1065#[diag(hir_analysis_coerce_pointee_not_transparent, code = E0802)]
1066pub(crate) struct CoercePointeeNotTransparent {
1067    #[primary_span]
1068    pub span: Span,
1069}
1070
1071#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoercePointeeNoField 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 {
                    CoercePointeeNoField { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_pointee_no_field);
                        diag.code(E0802);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1072#[diag(hir_analysis_coerce_pointee_no_field, code = E0802)]
1073pub(crate) struct CoercePointeeNoField {
1074    #[primary_span]
1075    pub span: Span,
1076}
1077
1078#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            InherentTyOutsideRelevant 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 {
                    InherentTyOutsideRelevant {
                        span: __binding_0, help_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_ty_outside_relevant);
                        diag.code(E0390);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        diag.span_help(__binding_1,
                            crate::fluent_generated::hir_analysis_span_help);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1079#[diag(hir_analysis_inherent_ty_outside_relevant, code = E0390)]
1080#[help]
1081pub(crate) struct InherentTyOutsideRelevant {
1082    #[primary_span]
1083    pub span: Span,
1084    #[help(hir_analysis_span_help)]
1085    pub help_span: Span,
1086}
1087
1088#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            InherentTyOutsideNew 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 {
                    InherentTyOutsideNew { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_ty_outside_new);
                        diag.code(E0116);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1089#[diag(hir_analysis_inherent_ty_outside_new, code = E0116)]
1090#[note]
1091pub(crate) struct InherentTyOutsideNew {
1092    #[primary_span]
1093    #[label]
1094    pub span: Span,
1095}
1096
1097#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            InherentTyOutsidePrimitive 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 {
                    InherentTyOutsidePrimitive {
                        span: __binding_0, help_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_ty_outside_primitive);
                        diag.code(E0390);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        diag.span_help(__binding_1,
                            crate::fluent_generated::hir_analysis_span_help);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1098#[diag(hir_analysis_inherent_ty_outside_primitive, code = E0390)]
1099#[help]
1100pub(crate) struct InherentTyOutsidePrimitive {
1101    #[primary_span]
1102    pub span: Span,
1103    #[help(hir_analysis_span_help)]
1104    pub help_span: Span,
1105}
1106
1107#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            InherentPrimitiveTy<'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 {
                    InherentPrimitiveTy { span: __binding_0, note: __binding_1 }
                        => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_primitive_ty);
                        diag.code(E0390);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.subdiagnostic(__binding_1);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1108#[diag(hir_analysis_inherent_primitive_ty, code = E0390)]
1109#[help]
1110pub(crate) struct InherentPrimitiveTy<'a> {
1111    #[primary_span]
1112    pub span: Span,
1113    #[subdiagnostic]
1114    pub note: Option<InherentPrimitiveTyNote<'a>>,
1115}
1116
1117#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for InherentPrimitiveTyNote<'a> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    InherentPrimitiveTyNote { subty: __binding_0 } => {
                        diag.store_args();
                        diag.arg("subty", __binding_0);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_inherent_primitive_ty_note);
                        diag.note(__message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1118#[note(hir_analysis_inherent_primitive_ty_note)]
1119pub(crate) struct InherentPrimitiveTyNote<'a> {
1120    pub subty: Ty<'a>,
1121}
1122
1123#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for InherentDyn
            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 {
                    InherentDyn { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_dyn);
                        diag.code(E0785);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1124#[diag(hir_analysis_inherent_dyn, code = E0785)]
1125#[note]
1126pub(crate) struct InherentDyn {
1127    #[primary_span]
1128    #[label]
1129    pub span: Span,
1130}
1131
1132#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            InherentNominal 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 {
                    InherentNominal { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_inherent_nominal);
                        diag.code(E0118);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1133#[diag(hir_analysis_inherent_nominal, code = E0118)]
1134#[note]
1135pub(crate) struct InherentNominal {
1136    #[primary_span]
1137    #[label]
1138    pub span: Span,
1139}
1140
1141#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            DispatchFromDynZST<'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 {
                    DispatchFromDynZST {
                        span: __binding_0, name: __binding_1, ty: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_dispatch_from_dyn_zst);
                        diag.code(E0378);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("name", __binding_1);
                        diag.arg("ty", __binding_2);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1142#[diag(hir_analysis_dispatch_from_dyn_zst, code = E0378)]
1143#[note]
1144pub(crate) struct DispatchFromDynZST<'a> {
1145    #[primary_span]
1146    pub span: Span,
1147    pub name: Ident,
1148    pub ty: Ty<'a>,
1149}
1150
1151#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for CoerceNoField
            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 {
                    CoerceNoField {
                        span: __binding_0,
                        trait_name: __binding_1,
                        note: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_zero);
                        diag.code(E0374);
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.span(__binding_0);
                        if __binding_2 {
                            diag.note(crate::fluent_generated::hir_analysis_coercion_between_struct_single_note);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1152#[diag(hir_analysis_coerce_zero, code = E0374)]
1153pub(crate) struct CoerceNoField {
1154    #[primary_span]
1155    pub span: Span,
1156    pub trait_name: &'static str,
1157    #[note(hir_analysis_coercion_between_struct_single_note)]
1158    pub note: bool,
1159}
1160
1161#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for CoerceMulti
            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 {
                    CoerceMulti {
                        trait_name: __binding_0,
                        span: __binding_1,
                        number: __binding_2,
                        fields: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_multi);
                        diag.code(E0375);
                        ;
                        diag.arg("trait_name", __binding_0);
                        diag.arg("number", __binding_2);
                        diag.span(__binding_1);
                        diag.span_note(__binding_3,
                            crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1162#[diag(hir_analysis_coerce_multi, code = E0375)]
1163pub(crate) struct CoerceMulti {
1164    pub trait_name: &'static str,
1165    #[primary_span]
1166    pub span: Span,
1167    pub number: usize,
1168    #[note]
1169    pub fields: MultiSpan,
1170}
1171
1172#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoerceUnsizedNonStruct 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 {
                    CoerceUnsizedNonStruct {
                        span: __binding_0, trait_name: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_unsized_may);
                        diag.code(E0377);
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1173#[diag(hir_analysis_coerce_unsized_may, code = E0377)]
1174pub(crate) struct CoerceUnsizedNonStruct {
1175    #[primary_span]
1176    pub span: Span,
1177    pub trait_name: &'static str,
1178}
1179
1180#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoerceSamePatKind 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 {
                    CoerceSamePatKind {
                        span: __binding_0,
                        trait_name: __binding_1,
                        pat_a: __binding_2,
                        pat_b: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_same_pat_kind);
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.arg("pat_a", __binding_2);
                        diag.arg("pat_b", __binding_3);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1181#[diag(hir_analysis_coerce_same_pat_kind)]
1182pub(crate) struct CoerceSamePatKind {
1183    #[primary_span]
1184    pub span: Span,
1185    pub trait_name: &'static str,
1186    pub pat_a: String,
1187    pub pat_b: String,
1188}
1189
1190#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CoerceSameStruct 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 {
                    CoerceSameStruct {
                        span: __binding_0,
                        trait_name: __binding_1,
                        note: __binding_2,
                        source_path: __binding_3,
                        target_path: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_unsized_may);
                        diag.code(E0377);
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.arg("source_path", __binding_3);
                        diag.arg("target_path", __binding_4);
                        diag.span(__binding_0);
                        if __binding_2 {
                            diag.note(crate::fluent_generated::hir_analysis_coercion_between_struct_same_note);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1191#[diag(hir_analysis_coerce_unsized_may, code = E0377)]
1192pub(crate) struct CoerceSameStruct {
1193    #[primary_span]
1194    pub span: Span,
1195    pub trait_name: &'static str,
1196    #[note(hir_analysis_coercion_between_struct_same_note)]
1197    pub note: bool,
1198    pub source_path: String,
1199    pub target_path: String,
1200}
1201
1202#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            CoerceFieldValidity<'tcx> 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 {
                    CoerceFieldValidity {
                        span: __binding_0,
                        ty: __binding_1,
                        trait_name: __binding_2,
                        field_span: __binding_3,
                        field_ty: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_coerce_unsized_field_validity);
                        ;
                        diag.arg("ty", __binding_1);
                        diag.arg("trait_name", __binding_2);
                        diag.arg("field_ty", __binding_4);
                        diag.span(__binding_0);
                        diag.span_label(__binding_3,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1203#[diag(hir_analysis_coerce_unsized_field_validity)]
1204pub(crate) struct CoerceFieldValidity<'tcx> {
1205    #[primary_span]
1206    pub span: Span,
1207    pub ty: Ty<'tcx>,
1208    pub trait_name: &'static str,
1209    #[label]
1210    pub field_span: Span,
1211    pub field_ty: Ty<'tcx>,
1212}
1213
1214#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            TraitCannotImplForTy 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 {
                    TraitCannotImplForTy {
                        span: __binding_0,
                        trait_name: __binding_1,
                        label_spans: __binding_2,
                        notes: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_trait_cannot_impl_for_ty);
                        diag.code(E0204);
                        ;
                        diag.arg("trait_name", __binding_1);
                        diag.span(__binding_0);
                        for __binding_2 in __binding_2 {
                            diag.span_label(__binding_2,
                                crate::fluent_generated::_subdiag::label);
                        }
                        for __binding_3 in __binding_3 {
                            diag.subdiagnostic(__binding_3);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1215#[diag(hir_analysis_trait_cannot_impl_for_ty, code = E0204)]
1216pub(crate) struct TraitCannotImplForTy {
1217    #[primary_span]
1218    pub span: Span,
1219    pub trait_name: String,
1220    #[label]
1221    pub label_spans: Vec<Span>,
1222    #[subdiagnostic]
1223    pub notes: Vec<ImplForTyRequires>,
1224}
1225
1226#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for ImplForTyRequires {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    ImplForTyRequires {
                        span: __binding_0,
                        error_predicate: __binding_1,
                        trait_name: __binding_2,
                        ty: __binding_3 } => {
                        diag.store_args();
                        diag.arg("error_predicate", __binding_1);
                        diag.arg("trait_name", __binding_2);
                        diag.arg("ty", __binding_3);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_requires_note);
                        diag.span_note(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1227#[note(hir_analysis_requires_note)]
1228pub(crate) struct ImplForTyRequires {
1229    #[primary_span]
1230    pub span: MultiSpan,
1231    pub error_predicate: String,
1232    pub trait_name: String,
1233    pub ty: String,
1234}
1235
1236#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            TraitsWithDefaultImpl<'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 {
                    TraitsWithDefaultImpl {
                        span: __binding_0,
                        traits: __binding_1,
                        problematic_kind: __binding_2,
                        self_ty: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_traits_with_default_impl);
                        diag.code(E0321);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("traits", __binding_1);
                        diag.arg("problematic_kind", __binding_2);
                        diag.arg("self_ty", __binding_3);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1237#[diag(hir_analysis_traits_with_default_impl, code = E0321)]
1238#[note]
1239pub(crate) struct TraitsWithDefaultImpl<'a> {
1240    #[primary_span]
1241    pub span: Span,
1242    pub traits: String,
1243    pub problematic_kind: &'a str,
1244    pub self_ty: Ty<'a>,
1245}
1246
1247#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            CrossCrateTraits<'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 {
                    CrossCrateTraits {
                        span: __binding_0, traits: __binding_1, self_ty: __binding_2
                        } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cross_crate_traits);
                        diag.code(E0321);
                        ;
                        diag.arg("traits", __binding_1);
                        diag.arg("self_ty", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1248#[diag(hir_analysis_cross_crate_traits, code = E0321)]
1249pub(crate) struct CrossCrateTraits<'a> {
1250    #[primary_span]
1251    #[label]
1252    pub span: Span,
1253    pub traits: String,
1254    pub self_ty: Ty<'a>,
1255}
1256
1257#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CrossCrateTraitsDefined 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 {
                    CrossCrateTraitsDefined {
                        span: __binding_0, traits: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cross_crate_traits_defined);
                        diag.code(E0321);
                        ;
                        diag.arg("traits", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1258#[diag(hir_analysis_cross_crate_traits_defined, code = E0321)]
1259pub(crate) struct CrossCrateTraitsDefined {
1260    #[primary_span]
1261    #[label]
1262    pub span: Span,
1263    pub traits: String,
1264}
1265
1266#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            NoVariantNamed<'tcx> 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 {
                    NoVariantNamed {
                        span: __binding_0, ident: __binding_1, ty: __binding_2 } =>
                        {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_no_variant_named);
                        diag.code(E0599);
                        ;
                        diag.arg("ident", __binding_1);
                        diag.arg("ty", __binding_2);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1267#[diag(hir_analysis_no_variant_named, code = E0599)]
1268pub struct NoVariantNamed<'tcx> {
1269    #[primary_span]
1270    pub span: Span,
1271    pub ident: Ident,
1272    pub ty: Ty<'tcx>,
1273}
1274
1275// FIXME(fmease): Deduplicate:
1276
1277#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            TyParamFirstLocal<'tcx> 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 {
                    TyParamFirstLocal {
                        span: __binding_0,
                        note: __binding_1,
                        param: __binding_2,
                        local_type: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_ty_param_first_local);
                        diag.code(E0210);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("param", __binding_2);
                        diag.arg("local_type", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.note(crate::fluent_generated::hir_analysis_case_note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1278#[diag(hir_analysis_ty_param_first_local, code = E0210)]
1279#[note]
1280pub(crate) struct TyParamFirstLocal<'tcx> {
1281    #[primary_span]
1282    #[label]
1283    pub span: Span,
1284    #[note(hir_analysis_case_note)]
1285    pub note: (),
1286    pub param: Ident,
1287    pub local_type: Ty<'tcx>,
1288}
1289
1290#[derive(const _: () =
    {
        impl<'__a, 'tcx> rustc_errors::LintDiagnostic<'__a, ()> for
            TyParamFirstLocalLint<'tcx> {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    TyParamFirstLocalLint {
                        span: __binding_0,
                        note: __binding_1,
                        param: __binding_2,
                        local_type: __binding_3 } => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_ty_param_first_local);
                        diag.code(E0210);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("param", __binding_2);
                        diag.arg("local_type", __binding_3);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.note(crate::fluent_generated::hir_analysis_case_note);
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
1291#[diag(hir_analysis_ty_param_first_local, code = E0210)]
1292#[note]
1293pub(crate) struct TyParamFirstLocalLint<'tcx> {
1294    #[label]
1295    pub span: Span,
1296    #[note(hir_analysis_case_note)]
1297    pub note: (),
1298    pub param: Ident,
1299    pub local_type: Ty<'tcx>,
1300}
1301
1302#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for TyParamSome
            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 {
                    TyParamSome {
                        span: __binding_0, note: __binding_1, param: __binding_2 }
                        => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_ty_param_some);
                        diag.code(E0210);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("param", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.note(crate::fluent_generated::hir_analysis_only_note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1303#[diag(hir_analysis_ty_param_some, code = E0210)]
1304#[note]
1305pub(crate) struct TyParamSome {
1306    #[primary_span]
1307    #[label]
1308    pub span: Span,
1309    #[note(hir_analysis_only_note)]
1310    pub note: (),
1311    pub param: Ident,
1312}
1313
1314#[derive(const _: () =
    {
        impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for TyParamSomeLint
            {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    TyParamSomeLint {
                        span: __binding_0, note: __binding_1, param: __binding_2 }
                        => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_ty_param_some);
                        diag.code(E0210);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("param", __binding_2);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.note(crate::fluent_generated::hir_analysis_only_note);
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
1315#[diag(hir_analysis_ty_param_some, code = E0210)]
1316#[note]
1317pub(crate) struct TyParamSomeLint {
1318    #[label]
1319    pub span: Span,
1320    #[note(hir_analysis_only_note)]
1321    pub note: (),
1322    pub param: Ident,
1323}
1324
1325#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            OnlyCurrentTraits 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 {
                    OnlyCurrentTraits::Outside {
                        span: __binding_0, note: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_only_current_traits_outside);
                        diag.code(E0117);
                        ;
                        diag.span(__binding_0);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note_uncovered);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note_more_info);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note);
                        diag
                    }
                    OnlyCurrentTraits::Primitive {
                        span: __binding_0, note: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_only_current_traits_primitive);
                        diag.code(E0117);
                        ;
                        diag.span(__binding_0);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note_uncovered);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note_more_info);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note);
                        diag
                    }
                    OnlyCurrentTraits::Arbitrary {
                        span: __binding_0, note: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_only_current_traits_arbitrary);
                        diag.code(E0117);
                        ;
                        diag.span(__binding_0);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note_uncovered);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note_more_info);
                        diag.note(crate::fluent_generated::hir_analysis_only_current_traits_note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1326pub(crate) enum OnlyCurrentTraits {
1327    #[diag(hir_analysis_only_current_traits_outside, code = E0117)]
1328    Outside {
1329        #[primary_span]
1330        span: Span,
1331        #[note(hir_analysis_only_current_traits_note_uncovered)]
1332        #[note(hir_analysis_only_current_traits_note_more_info)]
1333        #[note(hir_analysis_only_current_traits_note)]
1334        note: (),
1335    },
1336    #[diag(hir_analysis_only_current_traits_primitive, code = E0117)]
1337    Primitive {
1338        #[primary_span]
1339        span: Span,
1340        #[note(hir_analysis_only_current_traits_note_uncovered)]
1341        #[note(hir_analysis_only_current_traits_note_more_info)]
1342        #[note(hir_analysis_only_current_traits_note)]
1343        note: (),
1344    },
1345    #[diag(hir_analysis_only_current_traits_arbitrary, code = E0117)]
1346    Arbitrary {
1347        #[primary_span]
1348        span: Span,
1349        #[note(hir_analysis_only_current_traits_note_uncovered)]
1350        #[note(hir_analysis_only_current_traits_note_more_info)]
1351        #[note(hir_analysis_only_current_traits_note)]
1352        note: (),
1353    },
1354}
1355
1356#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for OnlyCurrentTraitsOpaque {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsOpaque { span: __binding_0 } => {
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_opaque);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1357#[label(hir_analysis_only_current_traits_opaque)]
1358pub(crate) struct OnlyCurrentTraitsOpaque {
1359    #[primary_span]
1360    pub span: Span,
1361}
1362#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for OnlyCurrentTraitsForeign {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsForeign { span: __binding_0 } => {
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_foreign);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1363#[label(hir_analysis_only_current_traits_foreign)]
1364pub(crate) struct OnlyCurrentTraitsForeign {
1365    #[primary_span]
1366    pub span: Span,
1367}
1368
1369#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for OnlyCurrentTraitsName<'a> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsName { span: __binding_0, name: __binding_1
                        } => {
                        diag.store_args();
                        diag.arg("name", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_name);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1370#[label(hir_analysis_only_current_traits_name)]
1371pub(crate) struct OnlyCurrentTraitsName<'a> {
1372    #[primary_span]
1373    pub span: Span,
1374    pub name: &'a str,
1375}
1376
1377#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for OnlyCurrentTraitsPointer<'a>
            {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsPointer {
                        span: __binding_0, pointer: __binding_1 } => {
                        diag.store_args();
                        diag.arg("pointer", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_pointer);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1378#[label(hir_analysis_only_current_traits_pointer)]
1379pub(crate) struct OnlyCurrentTraitsPointer<'a> {
1380    #[primary_span]
1381    pub span: Span,
1382    pub pointer: Ty<'a>,
1383}
1384
1385#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for OnlyCurrentTraitsTy<'a> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsTy { span: __binding_0, ty: __binding_1 }
                        => {
                        diag.store_args();
                        diag.arg("ty", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_ty);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1386#[label(hir_analysis_only_current_traits_ty)]
1387pub(crate) struct OnlyCurrentTraitsTy<'a> {
1388    #[primary_span]
1389    pub span: Span,
1390    pub ty: Ty<'a>,
1391}
1392
1393#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for OnlyCurrentTraitsAdt {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsAdt { span: __binding_0, name: __binding_1
                        } => {
                        diag.store_args();
                        diag.arg("name", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_adt);
                        diag.span_label(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1394#[label(hir_analysis_only_current_traits_adt)]
1395pub(crate) struct OnlyCurrentTraitsAdt {
1396    #[primary_span]
1397    pub span: Span,
1398    pub name: String,
1399}
1400
1401#[derive(const _: () =
    {
        impl<'a> rustc_errors::Subdiagnostic for
            OnlyCurrentTraitsPointerSugg<'a> {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    OnlyCurrentTraitsPointerSugg {
                        wrapper_span: __binding_0,
                        struct_span: __binding_1,
                        mut_key: __binding_2,
                        ptr_ty: __binding_3 } => {
                        let mut suggestions = Vec::new();
                        let __code_21 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("WrapperType"))
                                });
                        let __code_22 =
                            ::alloc::__export::must_use({
                                    ::alloc::fmt::format(format_args!("struct WrapperType(*{0}{1});\n\n",
                                            __binding_2, __binding_3))
                                });
                        suggestions.push((__binding_0, __code_21));
                        suggestions.push((__binding_1, __code_22));
                        diag.store_args();
                        diag.arg("mut_key", __binding_2);
                        diag.arg("ptr_ty", __binding_3);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_only_current_traits_pointer_sugg);
                        diag.multipart_suggestion_with_style(__message, suggestions,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::ShowCode);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1402#[multipart_suggestion(
1403    hir_analysis_only_current_traits_pointer_sugg,
1404    applicability = "maybe-incorrect"
1405)]
1406pub(crate) struct OnlyCurrentTraitsPointerSugg<'a> {
1407    #[suggestion_part(code = "WrapperType")]
1408    pub wrapper_span: Span,
1409    #[suggestion_part(code = "struct WrapperType(*{mut_key}{ptr_ty});\n\n")]
1410    pub(crate) struct_span: Span,
1411    pub mut_key: &'a str,
1412    pub ptr_ty: Ty<'a>,
1413}
1414
1415#[derive(const _: () =
    {
        impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
            UnsupportedDelegation<'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 {
                    UnsupportedDelegation {
                        span: __binding_0,
                        descr: __binding_1,
                        callee_span: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_not_supported_delegation);
                        ;
                        diag.arg("descr", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_2,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1416#[diag(hir_analysis_not_supported_delegation)]
1417pub(crate) struct UnsupportedDelegation<'a> {
1418    #[primary_span]
1419    pub span: Span,
1420    pub descr: &'a str,
1421    #[label]
1422    pub callee_span: Span,
1423}
1424
1425#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            MethodShouldReturnFuture 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 {
                    MethodShouldReturnFuture {
                        span: __binding_0,
                        method_name: __binding_1,
                        trait_item_span: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_method_should_return_future);
                        ;
                        diag.arg("method_name", __binding_1);
                        diag.span(__binding_0);
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_note(__binding_2,
                                crate::fluent_generated::_subdiag::note);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1426#[diag(hir_analysis_method_should_return_future)]
1427pub(crate) struct MethodShouldReturnFuture {
1428    #[primary_span]
1429    pub span: Span,
1430    pub method_name: Ident,
1431    #[note]
1432    pub trait_item_span: Option<Span>,
1433}
1434
1435#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            UnusedGenericParameter 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 {
                    UnusedGenericParameter {
                        span: __binding_0,
                        param_name: __binding_1,
                        param_def_kind: __binding_2,
                        usage_spans: __binding_3,
                        help: __binding_4,
                        const_param_help: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_unused_generic_parameter);
                        ;
                        diag.arg("param_name", __binding_1);
                        diag.arg("param_def_kind", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        for __binding_3 in __binding_3 {
                            diag.span_label(__binding_3,
                                crate::fluent_generated::hir_analysis_usage_spans);
                        }
                        diag.subdiagnostic(__binding_4);
                        if __binding_5 {
                            diag.help(crate::fluent_generated::hir_analysis_const_param_help);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1436#[diag(hir_analysis_unused_generic_parameter)]
1437pub(crate) struct UnusedGenericParameter {
1438    #[primary_span]
1439    #[label]
1440    pub span: Span,
1441    pub param_name: Ident,
1442    pub param_def_kind: &'static str,
1443    #[label(hir_analysis_usage_spans)]
1444    pub usage_spans: Vec<Span>,
1445    #[subdiagnostic]
1446    pub help: UnusedGenericParameterHelp,
1447    #[help(hir_analysis_const_param_help)]
1448    pub const_param_help: bool,
1449}
1450
1451#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            RecursiveGenericParameter 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 {
                    RecursiveGenericParameter {
                        spans: __binding_0,
                        param_span: __binding_1,
                        param_name: __binding_2,
                        param_def_kind: __binding_3,
                        help: __binding_4,
                        note: __binding_5 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_recursive_generic_parameter);
                        ;
                        diag.arg("param_name", __binding_2);
                        diag.arg("param_def_kind", __binding_3);
                        diag.span(__binding_0.clone());
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag.subdiagnostic(__binding_4);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1452#[diag(hir_analysis_recursive_generic_parameter)]
1453pub(crate) struct RecursiveGenericParameter {
1454    #[primary_span]
1455    pub spans: Vec<Span>,
1456    #[label]
1457    pub param_span: Span,
1458    pub param_name: Ident,
1459    pub param_def_kind: &'static str,
1460    #[subdiagnostic]
1461    pub help: UnusedGenericParameterHelp,
1462    #[note]
1463    pub note: (),
1464}
1465
1466#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for UnusedGenericParameterHelp {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    UnusedGenericParameterHelp::Adt {
                        param_name: __binding_0, phantom_data: __binding_1 } => {
                        diag.store_args();
                        diag.arg("param_name", __binding_0);
                        diag.arg("phantom_data", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_unused_generic_parameter_adt_help);
                        diag.help(__message);
                        diag.restore_args();
                    }
                    UnusedGenericParameterHelp::AdtNoPhantomData {
                        param_name: __binding_0 } => {
                        diag.store_args();
                        diag.arg("param_name", __binding_0);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_unused_generic_parameter_adt_no_phantom_data_help);
                        diag.help(__message);
                        diag.restore_args();
                    }
                    UnusedGenericParameterHelp::TyAlias {
                        param_name: __binding_0 } => {
                        diag.store_args();
                        diag.arg("param_name", __binding_0);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_unused_generic_parameter_ty_alias_help);
                        diag.help(__message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1467pub(crate) enum UnusedGenericParameterHelp {
1468    #[help(hir_analysis_unused_generic_parameter_adt_help)]
1469    Adt { param_name: Ident, phantom_data: String },
1470    #[help(hir_analysis_unused_generic_parameter_adt_no_phantom_data_help)]
1471    AdtNoPhantomData { param_name: Ident },
1472    #[help(hir_analysis_unused_generic_parameter_ty_alias_help)]
1473    TyAlias { param_name: Ident },
1474}
1475
1476#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            UnconstrainedGenericParameter 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 {
                    UnconstrainedGenericParameter {
                        span: __binding_0,
                        param_name: __binding_1,
                        param_def_kind: __binding_2,
                        const_param_note: __binding_3,
                        const_param_note2: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_unconstrained_generic_parameter);
                        ;
                        diag.arg("param_name", __binding_1);
                        diag.arg("param_def_kind", __binding_2);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        if __binding_3 {
                            diag.note(crate::fluent_generated::hir_analysis_const_param_note);
                        }
                        if __binding_4 {
                            diag.note(crate::fluent_generated::hir_analysis_const_param_note2);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1477#[diag(hir_analysis_unconstrained_generic_parameter)]
1478pub(crate) struct UnconstrainedGenericParameter {
1479    #[primary_span]
1480    #[label]
1481    pub span: Span,
1482    pub param_name: Ident,
1483    pub param_def_kind: &'static str,
1484    #[note(hir_analysis_const_param_note)]
1485    pub const_param_note: bool,
1486    #[note(hir_analysis_const_param_note2)]
1487    pub const_param_note2: bool,
1488}
1489
1490#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            OpaqueCapturesHigherRankedLifetime 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 {
                    OpaqueCapturesHigherRankedLifetime {
                        span: __binding_0,
                        label: __binding_1,
                        decl_span: __binding_2,
                        bad_place: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_opaque_captures_higher_ranked_lifetime);
                        diag.code(E0657);
                        ;
                        diag.arg("bad_place", __binding_3);
                        diag.span(__binding_0);
                        if let Some(__binding_1) = __binding_1 {
                            diag.span_label(__binding_1,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag.span_note(__binding_2,
                            crate::fluent_generated::_subdiag::note);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1491#[diag(hir_analysis_opaque_captures_higher_ranked_lifetime, code = E0657)]
1492pub(crate) struct OpaqueCapturesHigherRankedLifetime {
1493    #[primary_span]
1494    pub span: MultiSpan,
1495    #[label]
1496    pub label: Option<Span>,
1497    #[note]
1498    pub decl_span: MultiSpan,
1499    pub bad_place: &'static str,
1500}
1501
1502#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for InvalidReceiverTyHint {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    InvalidReceiverTyHint::Weak => {
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_invalid_receiver_ty_help_weak_note);
                        diag.note(__message);
                        diag.restore_args();
                    }
                    InvalidReceiverTyHint::NonNull => {
                        diag.store_args();
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_invalid_receiver_ty_help_nonnull_note);
                        diag.note(__message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1503pub(crate) enum InvalidReceiverTyHint {
1504    #[note(hir_analysis_invalid_receiver_ty_help_weak_note)]
1505    Weak,
1506    #[note(hir_analysis_invalid_receiver_ty_help_nonnull_note)]
1507    NonNull,
1508}
1509
1510#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            InvalidReceiverTyNoArbitrarySelfTypes<'tcx> 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 {
                    InvalidReceiverTyNoArbitrarySelfTypes {
                        span: __binding_0, receiver_ty: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_invalid_receiver_ty_no_arbitrary_self_types);
                        diag.code(E0307);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag.help(crate::fluent_generated::hir_analysis_invalid_receiver_ty_help_no_arbitrary_self_types);
                        ;
                        diag.arg("receiver_ty", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1511#[diag(hir_analysis_invalid_receiver_ty_no_arbitrary_self_types, code = E0307)]
1512#[note]
1513#[help(hir_analysis_invalid_receiver_ty_help_no_arbitrary_self_types)]
1514pub(crate) struct InvalidReceiverTyNoArbitrarySelfTypes<'tcx> {
1515    #[primary_span]
1516    pub span: Span,
1517    pub receiver_ty: Ty<'tcx>,
1518}
1519
1520#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            InvalidReceiverTy<'tcx> 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 {
                    InvalidReceiverTy {
                        span: __binding_0,
                        receiver_ty: __binding_1,
                        hint: __binding_2 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_invalid_receiver_ty);
                        diag.code(E0307);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag.help(crate::fluent_generated::hir_analysis_invalid_receiver_ty_help);
                        ;
                        diag.arg("receiver_ty", __binding_1);
                        diag.span(__binding_0);
                        if let Some(__binding_2) = __binding_2 {
                            diag.subdiagnostic(__binding_2);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1521#[diag(hir_analysis_invalid_receiver_ty, code = E0307)]
1522#[note]
1523#[help(hir_analysis_invalid_receiver_ty_help)]
1524pub(crate) struct InvalidReceiverTy<'tcx> {
1525    #[primary_span]
1526    pub span: Span,
1527    pub receiver_ty: Ty<'tcx>,
1528    #[subdiagnostic]
1529    pub hint: Option<InvalidReceiverTyHint>,
1530}
1531
1532#[derive(const _: () =
    {
        impl<'_sess, 'tcx, G> rustc_errors::Diagnostic<'_sess, G> for
            InvalidGenericReceiverTy<'tcx> 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 {
                    InvalidGenericReceiverTy {
                        span: __binding_0, receiver_ty: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_invalid_generic_receiver_ty);
                        diag.code(E0801);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        diag.help(crate::fluent_generated::hir_analysis_invalid_generic_receiver_ty_help);
                        ;
                        diag.arg("receiver_ty", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1533#[diag(hir_analysis_invalid_generic_receiver_ty, code = E0801)]
1534#[note]
1535#[help(hir_analysis_invalid_generic_receiver_ty_help)]
1536pub(crate) struct InvalidGenericReceiverTy<'tcx> {
1537    #[primary_span]
1538    pub span: Span,
1539    pub receiver_ty: Ty<'tcx>,
1540}
1541
1542#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CmseInputsStackSpill 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 {
                    CmseInputsStackSpill { spans: __binding_0, abi: __binding_1
                        } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cmse_inputs_stack_spill);
                        diag.code(E0798);
                        diag.note(crate::fluent_generated::_subdiag::note);
                        ;
                        diag.arg("abi", __binding_1);
                        diag.span(__binding_0.clone());
                        for __binding_0 in __binding_0 {
                            diag.span_label(__binding_0,
                                crate::fluent_generated::_subdiag::label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1543#[diag(hir_analysis_cmse_inputs_stack_spill, code = E0798)]
1544#[note]
1545pub(crate) struct CmseInputsStackSpill {
1546    #[primary_span]
1547    #[label]
1548    pub spans: Vec<Span>,
1549    pub abi: ExternAbi,
1550}
1551
1552#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            CmseOutputStackSpill 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 {
                    CmseOutputStackSpill { span: __binding_0, abi: __binding_1 }
                        => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cmse_output_stack_spill);
                        diag.code(E0798);
                        diag.note(crate::fluent_generated::hir_analysis_note1);
                        diag.note(crate::fluent_generated::hir_analysis_note2);
                        ;
                        diag.arg("abi", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1553#[diag(hir_analysis_cmse_output_stack_spill, code = E0798)]
1554#[note(hir_analysis_note1)]
1555#[note(hir_analysis_note2)]
1556pub(crate) struct CmseOutputStackSpill {
1557    #[primary_span]
1558    #[label]
1559    pub span: Span,
1560    pub abi: ExternAbi,
1561}
1562
1563#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for CmseGeneric
            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 {
                    CmseGeneric { span: __binding_0, abi: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cmse_generic);
                        diag.code(E0798);
                        ;
                        diag.arg("abi", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1564#[diag(hir_analysis_cmse_generic, code = E0798)]
1565pub(crate) struct CmseGeneric {
1566    #[primary_span]
1567    pub span: Span,
1568    pub abi: ExternAbi,
1569}
1570
1571#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for CmseImplTrait
            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 {
                    CmseImplTrait { span: __binding_0, abi: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_cmse_impl_trait);
                        diag.code(E0798);
                        ;
                        diag.arg("abi", __binding_1);
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1572#[diag(hir_analysis_cmse_impl_trait, code = E0798)]
1573pub(crate) struct CmseImplTrait {
1574    #[primary_span]
1575    pub span: Span,
1576    pub abi: ExternAbi,
1577}
1578
1579#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            BadReturnTypeNotation 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 {
                    BadReturnTypeNotation { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_bad_return_type_notation_position);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1580#[diag(hir_analysis_bad_return_type_notation_position)]
1581pub(crate) struct BadReturnTypeNotation {
1582    #[primary_span]
1583    pub span: Span,
1584}
1585
1586#[derive(const _: () =
    {
        impl<'__a> rustc_errors::LintDiagnostic<'__a, ()> for
            SupertraitItemShadowing {
            #[track_caller]
            fn decorate_lint<'__b>(self,
                diag: &'__b mut rustc_errors::Diag<'__a, ()>) {
                match self {
                    SupertraitItemShadowing {
                        item: __binding_0,
                        subtrait: __binding_1,
                        shadowee: __binding_2 } => {
                        diag.primary_message(crate::fluent_generated::hir_analysis_supertrait_item_shadowing);
                        ;
                        diag.arg("item", __binding_0);
                        diag.arg("subtrait", __binding_1);
                        diag.subdiagnostic(__binding_2);
                        diag
                    }
                };
            }
        }
    };LintDiagnostic)]
1587#[diag(hir_analysis_supertrait_item_shadowing)]
1588pub(crate) struct SupertraitItemShadowing {
1589    pub item: Symbol,
1590    pub subtrait: Symbol,
1591    #[subdiagnostic]
1592    pub shadowee: SupertraitItemShadowee,
1593}
1594
1595#[derive(const _: () =
    {
        impl rustc_errors::Subdiagnostic for SupertraitItemShadowee {
            fn add_to_diag<__G>(self, diag: &mut rustc_errors::Diag<'_, __G>)
                where __G: rustc_errors::EmissionGuarantee {
                match self {
                    SupertraitItemShadowee::Labeled {
                        span: __binding_0, supertrait: __binding_1 } => {
                        diag.store_args();
                        diag.arg("supertrait", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_supertrait_item_shadowee);
                        diag.span_note(__binding_0, __message);
                        diag.restore_args();
                    }
                    SupertraitItemShadowee::Several {
                        spans: __binding_0, traits: __binding_1 } => {
                        diag.store_args();
                        diag.arg("traits", __binding_1);
                        let __message =
                            diag.eagerly_translate(crate::fluent_generated::hir_analysis_supertrait_item_multiple_shadowee);
                        diag.span_note(__binding_0, __message);
                        diag.restore_args();
                    }
                }
            }
        }
    };Subdiagnostic)]
1596pub(crate) enum SupertraitItemShadowee {
1597    #[note(hir_analysis_supertrait_item_shadowee)]
1598    Labeled {
1599        #[primary_span]
1600        span: Span,
1601        supertrait: Symbol,
1602    },
1603    #[note(hir_analysis_supertrait_item_multiple_shadowee)]
1604    Several {
1605        #[primary_span]
1606        spans: MultiSpan,
1607        traits: DiagSymbolList,
1608    },
1609}
1610
1611#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            SelfInTypeAlias 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 {
                    SelfInTypeAlias { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_self_in_type_alias);
                        diag.code(E0411);
                        ;
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1612#[diag(hir_analysis_self_in_type_alias, code = E0411)]
1613pub(crate) struct SelfInTypeAlias {
1614    #[primary_span]
1615    #[label]
1616    pub span: Span,
1617}
1618
1619#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AbiCustomClothedFunction 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 {
                    AbiCustomClothedFunction {
                        span: __binding_0, naked_span: __binding_1 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_abi_custom_clothed_function);
                        let __code_23 =
                            [::alloc::__export::must_use({
                                                ::alloc::fmt::format(format_args!("#[unsafe(naked)]\n"))
                                            })].into_iter();
                        ;
                        diag.span(__binding_0);
                        diag.span_suggestions_with_style(__binding_1,
                            crate::fluent_generated::hir_analysis_suggestion, __code_23,
                            rustc_errors::Applicability::MaybeIncorrect,
                            rustc_errors::SuggestionStyle::HideCodeInline);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1620#[diag(hir_analysis_abi_custom_clothed_function)]
1621pub(crate) struct AbiCustomClothedFunction {
1622    #[primary_span]
1623    pub span: Span,
1624    #[suggestion(
1625        hir_analysis_suggestion,
1626        applicability = "maybe-incorrect",
1627        code = "#[unsafe(naked)]\n",
1628        style = "short"
1629    )]
1630    pub naked_span: Span,
1631}
1632
1633#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            AsyncDropWithoutSyncDrop 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 {
                    AsyncDropWithoutSyncDrop { span: __binding_0 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_async_drop_without_sync_drop);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.span(__binding_0);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1634#[diag(hir_analysis_async_drop_without_sync_drop)]
1635#[help]
1636pub(crate) struct AsyncDropWithoutSyncDrop {
1637    #[primary_span]
1638    pub span: Span,
1639}
1640
1641#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            LifetimesOrBoundsMismatchOnEii 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 {
                    LifetimesOrBoundsMismatchOnEii {
                        span: __binding_0,
                        generics_span: __binding_1,
                        where_span: __binding_2,
                        bounds_span: __binding_3,
                        ident: __binding_4 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_lifetimes_or_bounds_mismatch_on_eii);
                        ;
                        diag.arg("ident", __binding_4);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::hir_analysis_generics_label);
                        if let Some(__binding_2) = __binding_2 {
                            diag.span_label(__binding_2,
                                crate::fluent_generated::hir_analysis_where_label);
                        }
                        for __binding_3 in __binding_3 {
                            diag.span_label(__binding_3,
                                crate::fluent_generated::hir_analysis_bounds_label);
                        }
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1642#[diag(hir_analysis_lifetimes_or_bounds_mismatch_on_eii)]
1643pub(crate) struct LifetimesOrBoundsMismatchOnEii {
1644    #[primary_span]
1645    #[label]
1646    pub span: Span,
1647    #[label(hir_analysis_generics_label)]
1648    pub generics_span: Span,
1649    #[label(hir_analysis_where_label)]
1650    pub where_span: Option<Span>,
1651    #[label(hir_analysis_bounds_label)]
1652    pub bounds_span: Vec<Span>,
1653    pub ident: Symbol,
1654}
1655
1656#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            EiiWithGenerics 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 {
                    EiiWithGenerics {
                        span: __binding_0,
                        attr: __binding_1,
                        eii_name: __binding_2,
                        impl_name: __binding_3 } => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_eii_with_generics);
                        diag.help(crate::fluent_generated::_subdiag::help);
                        ;
                        diag.arg("eii_name", __binding_2);
                        diag.arg("impl_name", __binding_3);
                        diag.span(__binding_0);
                        diag.span_label(__binding_1,
                            crate::fluent_generated::_subdiag::label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1657#[diag(hir_analysis_eii_with_generics)]
1658#[help]
1659pub(crate) struct EiiWithGenerics {
1660    #[primary_span]
1661    pub span: Span,
1662    #[label]
1663    pub attr: Span,
1664    pub eii_name: Symbol,
1665    pub impl_name: Symbol,
1666}