Skip to main content

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, listify,
8};
9use rustc_hir::limit::Limit;
10use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
11use rustc_middle::ty::{self, 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 MissingGenericParams {
404    pub span: Span,
405    pub def_span: Span,
406    pub span_snippet: Option<String>,
407    pub missing_generic_params: Vec<(Symbol, ty::GenericParamDefKind)>,
408    pub empty_generic_args: bool,
409}
410
411// FIXME: This doesn't need to be a manual impl!
412impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for MissingGenericParams {
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_generic_params);
416        err.span(self.span);
417        err.code(E0393);
418        err.span_label(self.def_span, fluent::hir_analysis_label);
419
420        enum Descr {
421            Generic,
422            Type,
423            Const,
424        }
425
426        let mut descr = None;
427        for (_, kind) in &self.missing_generic_params {
428            descr = match (&descr, kind) {
429                (None, ty::GenericParamDefKind::Type { .. }) => Some(Descr::Type),
430                (None, ty::GenericParamDefKind::Const { .. }) => Some(Descr::Const),
431                (Some(Descr::Type), ty::GenericParamDefKind::Const { .. })
432                | (Some(Descr::Const), ty::GenericParamDefKind::Type { .. }) => {
433                    Some(Descr::Generic)
434                }
435                _ => continue,
436            }
437        }
438
439        err.arg(
440            "descr",
441            match descr.unwrap() {
442                Descr::Generic => "generic",
443                Descr::Type => "type",
444                Descr::Const => "const",
445            },
446        );
447        err.arg("parameterCount", self.missing_generic_params.len());
448        err.arg(
449            "parameters",
450            listify(&self.missing_generic_params, |(n, _)| ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("`{0}`", n))
    })format!("`{n}`")).unwrap(),
451        );
452
453        let mut suggested = false;
454        // Don't suggest setting the generic params if there are some already: The order is
455        // tricky to get right and the user will already know what the syntax is.
456        if let Some(snippet) = self.span_snippet
457            && self.empty_generic_args
458        {
459            if snippet.ends_with('>') {
460                // The user wrote `Trait<'a, T>` or similar. To provide an accurate suggestion
461                // we would have to preserve the right order. For now, as clearly the user is
462                // aware of the syntax, we do nothing.
463            } else {
464                // The user wrote `Trait`, so we don't have a type we can suggest, but at
465                // least we can clue them to the correct syntax `Trait</* Term */>`.
466                err.span_suggestion_verbose(
467                    self.span.shrink_to_hi(),
468                    fluent::hir_analysis_suggestion,
469                    ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("<{0}>",
                self.missing_generic_params.iter().map(|(n, _)|
                                ::alloc::__export::must_use({
                                        ::alloc::fmt::format(format_args!("/* {0} */", n))
                                    })).collect::<Vec<_>>().join(", ")))
    })format!(
470                        "<{}>",
471                        self.missing_generic_params
472                            .iter()
473                            .map(|(n, _)| format!("/* {n} */"))
474                            .collect::<Vec<_>>()
475                            .join(", ")
476                    ),
477                    Applicability::HasPlaceholders,
478                );
479                suggested = true;
480            }
481        }
482        if !suggested {
483            err.span_label(self.span, fluent::hir_analysis_no_suggestion_label);
484        }
485
486        err.note(fluent::hir_analysis_note);
487        err
488    }
489}
490
491#[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)]
492#[diag(hir_analysis_manual_implementation, code = E0183)]
493#[help]
494pub(crate) struct ManualImplementation {
495    #[primary_span]
496    #[label]
497    pub span: Span,
498    pub trait_name: String,
499}
500
501#[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)]
502#[diag(hir_analysis_generic_args_on_overridden_impl)]
503pub(crate) struct GenericArgsOnOverriddenImpl {
504    #[primary_span]
505    pub span: Span,
506}
507
508#[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)]
509#[diag(hir_analysis_const_impl_for_non_const_trait)]
510pub(crate) struct ConstImplForNonConstTrait {
511    #[primary_span]
512    #[label]
513    pub trait_ref_span: Span,
514    pub trait_name: String,
515    #[suggestion(applicability = "machine-applicable", code = "const ", style = "verbose")]
516    pub suggestion: Option<Span>,
517    pub suggestion_pre: &'static str,
518    #[note]
519    pub marking: (),
520    #[note(hir_analysis_adding)]
521    pub adding: (),
522}
523
524#[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)]
525#[diag(hir_analysis_const_bound_for_non_const_trait)]
526pub(crate) struct ConstBoundForNonConstTrait {
527    #[primary_span]
528    #[label]
529    pub span: Span,
530    pub modifier: &'static str,
531    #[note]
532    pub def_span: Option<Span>,
533    #[suggestion(applicability = "machine-applicable", code = "const ", style = "verbose")]
534    pub suggestion: Option<Span>,
535    pub suggestion_pre: &'static str,
536    pub trait_name: String,
537}
538
539#[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)]
540#[diag(hir_analysis_self_in_impl_self)]
541pub(crate) struct SelfInImplSelf {
542    #[primary_span]
543    pub span: MultiSpan,
544    #[note]
545    pub note: (),
546}
547
548#[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)]
549#[diag(hir_analysis_linkage_type, code = E0791)]
550pub(crate) struct LinkageType {
551    #[primary_span]
552    pub span: Span,
553}
554
555#[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)]
556#[help]
557#[diag(hir_analysis_auto_deref_reached_recursion_limit, code = E0055)]
558pub(crate) struct AutoDerefReachedRecursionLimit<'a> {
559    #[primary_span]
560    #[label]
561    pub span: Span,
562    pub ty: Ty<'a>,
563    pub suggested_limit: Limit,
564    pub crate_name: Symbol,
565}
566
567#[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)]
568#[diag(hir_analysis_where_clause_on_main, code = E0646)]
569pub(crate) struct WhereClauseOnMain {
570    #[primary_span]
571    pub span: Span,
572    #[label]
573    pub generics_span: Option<Span>,
574}
575
576#[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)]
577#[diag(hir_analysis_track_caller_on_main)]
578pub(crate) struct TrackCallerOnMain {
579    #[primary_span]
580    #[suggestion(applicability = "maybe-incorrect", code = "")]
581    pub span: Span,
582    #[label(hir_analysis_track_caller_on_main)]
583    pub annotated: Span,
584}
585
586#[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)]
587#[diag(hir_analysis_target_feature_on_main)]
588pub(crate) struct TargetFeatureOnMain {
589    #[primary_span]
590    #[label(hir_analysis_target_feature_on_main)]
591    pub main: Span,
592}
593
594#[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)]
595#[diag(hir_analysis_main_function_return_type_generic, code = E0131)]
596pub(crate) struct MainFunctionReturnTypeGeneric {
597    #[primary_span]
598    pub span: Span,
599}
600
601#[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)]
602#[diag(hir_analysis_main_function_async, code = E0752)]
603pub(crate) struct MainFunctionAsync {
604    #[primary_span]
605    pub span: Span,
606    #[label]
607    pub asyncness: Option<Span>,
608}
609
610#[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)]
611#[diag(hir_analysis_main_function_generic_parameters, code = E0131)]
612pub(crate) struct MainFunctionGenericParameters {
613    #[primary_span]
614    pub span: Span,
615    #[label]
616    pub label_span: Option<Span>,
617}
618
619#[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)]
620#[diag(hir_analysis_variadic_function_compatible_convention, code = E0045)]
621pub(crate) struct VariadicFunctionCompatibleConvention<'a> {
622    #[primary_span]
623    #[label]
624    pub span: Span,
625    pub convention: &'a str,
626}
627
628#[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)]
629pub(crate) enum CannotCaptureLateBound {
630    #[diag(hir_analysis_cannot_capture_late_bound_ty)]
631    Type {
632        #[primary_span]
633        use_span: Span,
634        #[label]
635        def_span: Span,
636        what: &'static str,
637    },
638    #[diag(hir_analysis_cannot_capture_late_bound_const)]
639    Const {
640        #[primary_span]
641        use_span: Span,
642        #[label]
643        def_span: Span,
644        what: &'static str,
645    },
646    #[diag(hir_analysis_cannot_capture_late_bound_lifetime)]
647    Lifetime {
648        #[primary_span]
649        use_span: Span,
650        #[label]
651        def_span: Span,
652        what: &'static str,
653    },
654}
655
656#[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)]
657#[diag(hir_analysis_variances_of)]
658pub(crate) struct VariancesOf {
659    #[primary_span]
660    pub span: Span,
661    pub variances: String,
662}
663
664#[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)]
665#[diag(hir_analysis_type_of)]
666pub(crate) struct TypeOf<'tcx> {
667    #[primary_span]
668    pub span: Span,
669    pub ty: Ty<'tcx>,
670}
671
672#[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)]
673#[diag(hir_analysis_invalid_union_field, code = E0740)]
674pub(crate) struct InvalidUnionField {
675    #[primary_span]
676    pub field_span: Span,
677    #[subdiagnostic]
678    pub sugg: InvalidUnionFieldSuggestion,
679    #[note]
680    pub note: (),
681}
682
683#[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)]
684#[diag(hir_analysis_return_type_notation_on_non_rpitit)]
685pub(crate) struct ReturnTypeNotationOnNonRpitit<'tcx> {
686    #[primary_span]
687    pub span: Span,
688    pub ty: Ty<'tcx>,
689    #[label]
690    pub fn_span: Option<Span>,
691    #[note]
692    pub note: (),
693}
694
695#[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)]
696#[multipart_suggestion(hir_analysis_invalid_union_field_sugg, applicability = "machine-applicable")]
697pub(crate) struct InvalidUnionFieldSuggestion {
698    #[suggestion_part(code = "std::mem::ManuallyDrop<")]
699    pub lo: Span,
700    #[suggestion_part(code = ">")]
701    pub hi: Span,
702}
703
704#[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)]
705#[diag(hir_analysis_return_type_notation_equality_bound)]
706pub(crate) struct ReturnTypeNotationEqualityBound {
707    #[primary_span]
708    pub span: Span,
709}
710
711#[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)]
712#[diag(hir_analysis_placeholder_not_allowed_item_signatures, code = E0121)]
713pub(crate) struct PlaceholderNotAllowedItemSignatures {
714    #[primary_span]
715    #[label]
716    pub spans: Vec<Span>,
717    pub kind: String,
718}
719
720#[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)]
721#[diag(hir_analysis_associated_type_trait_uninferred_generic_params, code = E0212)]
722pub(crate) struct AssociatedItemTraitUninferredGenericParams {
723    #[primary_span]
724    pub span: Span,
725    #[suggestion(style = "verbose", applicability = "maybe-incorrect", code = "{bound}")]
726    pub inferred_sugg: Option<Span>,
727    pub bound: String,
728    #[subdiagnostic]
729    pub mpart_sugg: Option<AssociatedItemTraitUninferredGenericParamsMultipartSuggestion>,
730    pub what: &'static str,
731}
732
733#[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)]
734#[multipart_suggestion(
735    hir_analysis_associated_type_trait_uninferred_generic_params_multipart_suggestion,
736    applicability = "maybe-incorrect"
737)]
738pub(crate) struct AssociatedItemTraitUninferredGenericParamsMultipartSuggestion {
739    #[suggestion_part(code = "{first}")]
740    pub fspan: Span,
741    pub first: String,
742    #[suggestion_part(code = "{second}")]
743    pub sspan: Span,
744    pub second: String,
745}
746
747#[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)]
748#[diag(hir_analysis_enum_discriminant_overflowed, code = E0370)]
749#[note]
750pub(crate) struct EnumDiscriminantOverflowed {
751    #[primary_span]
752    #[label]
753    pub span: Span,
754    pub discr: String,
755    pub item_name: Ident,
756    pub wrapped_discr: String,
757}
758
759#[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)]
760#[diag(hir_analysis_paren_sugar_attribute)]
761#[help]
762pub(crate) struct ParenSugarAttribute {
763    #[primary_span]
764    pub span: Span,
765}
766
767#[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)]
768#[diag(hir_analysis_simd_ffi_highly_experimental)]
769#[help]
770pub(crate) struct SIMDFFIHighlyExperimental {
771    #[primary_span]
772    pub span: Span,
773    pub snip: String,
774}
775
776#[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)]
777pub(crate) enum ImplNotMarkedDefault {
778    #[diag(hir_analysis_impl_not_marked_default, code = E0520)]
779    #[note]
780    Ok {
781        #[primary_span]
782        #[label]
783        span: Span,
784        #[label(hir_analysis_ok_label)]
785        ok_label: Span,
786        ident: Ident,
787    },
788    #[diag(hir_analysis_impl_not_marked_default_err, code = E0520)]
789    #[note]
790    Err {
791        #[primary_span]
792        span: Span,
793        cname: Symbol,
794        ident: Ident,
795    },
796}
797
798#[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)]
799#[diag(hir_analysis_useless_impl_item)]
800pub(crate) struct UselessImplItem;
801
802#[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)]
803#[diag(hir_analysis_missing_trait_item, code = E0046)]
804pub(crate) struct MissingTraitItem {
805    #[primary_span]
806    #[label]
807    pub span: Span,
808    #[subdiagnostic]
809    pub missing_trait_item_label: Vec<MissingTraitItemLabel>,
810    #[subdiagnostic]
811    pub missing_trait_item: Vec<MissingTraitItemSuggestion>,
812    #[subdiagnostic]
813    pub missing_trait_item_none: Vec<MissingTraitItemSuggestionNone>,
814    pub missing_items_msg: String,
815}
816
817#[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)]
818#[label(hir_analysis_missing_trait_item_label)]
819pub(crate) struct MissingTraitItemLabel {
820    #[primary_span]
821    pub span: Span,
822    pub item: Symbol,
823}
824
825#[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)]
826#[suggestion(
827    hir_analysis_missing_trait_item_suggestion,
828    style = "tool-only",
829    applicability = "has-placeholders",
830    code = "{code}"
831)]
832pub(crate) struct MissingTraitItemSuggestion {
833    #[primary_span]
834    pub span: Span,
835    pub code: String,
836    pub snippet: String,
837}
838
839#[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)]
840#[suggestion(
841    hir_analysis_missing_trait_item_suggestion,
842    style = "hidden",
843    applicability = "has-placeholders",
844    code = "{code}"
845)]
846pub(crate) struct MissingTraitItemSuggestionNone {
847    #[primary_span]
848    pub span: Span,
849    pub code: String,
850    pub snippet: String,
851}
852
853#[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)]
854#[diag(hir_analysis_missing_one_of_trait_item, code = E0046)]
855pub(crate) struct MissingOneOfTraitItem {
856    #[primary_span]
857    #[label]
858    pub span: Span,
859    #[note]
860    pub note: Option<Span>,
861    pub missing_items_msg: String,
862}
863
864#[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)]
865#[diag(hir_analysis_missing_trait_item_unstable, code = E0046)]
866#[note]
867pub(crate) struct MissingTraitItemUnstable {
868    #[primary_span]
869    pub span: Span,
870    #[note(hir_analysis_some_note)]
871    pub some_note: bool,
872    #[note(hir_analysis_none_note)]
873    pub none_note: bool,
874    pub missing_item_name: Ident,
875    pub feature: Symbol,
876    pub reason: String,
877}
878
879#[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)]
880#[diag(hir_analysis_transparent_enum_variant, code = E0731)]
881pub(crate) struct TransparentEnumVariant {
882    #[primary_span]
883    #[label]
884    pub span: Span,
885    #[label(hir_analysis_multi_label)]
886    pub spans: Vec<Span>,
887    #[label(hir_analysis_many_label)]
888    pub many: Option<Span>,
889    pub number: usize,
890    pub path: String,
891}
892
893#[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)]
894#[diag(hir_analysis_transparent_non_zero_sized_enum, code = E0690)]
895pub(crate) struct TransparentNonZeroSizedEnum<'a> {
896    #[primary_span]
897    #[label]
898    pub span: Span,
899    #[label(hir_analysis_labels)]
900    pub spans: Vec<Span>,
901    pub field_count: usize,
902    pub desc: &'a str,
903}
904
905#[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)]
906#[diag(hir_analysis_transparent_non_zero_sized, code = E0690)]
907pub(crate) struct TransparentNonZeroSized<'a> {
908    #[primary_span]
909    #[label]
910    pub span: Span,
911    #[label(hir_analysis_labels)]
912    pub spans: Vec<Span>,
913    pub field_count: usize,
914    pub desc: &'a str,
915}
916
917#[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)]
918#[diag(hir_analysis_too_large_static)]
919pub(crate) struct TooLargeStatic {
920    #[primary_span]
921    pub span: Span,
922}
923
924#[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)]
925#[diag(hir_analysis_specialization_trait)]
926#[help]
927pub(crate) struct SpecializationTrait {
928    #[primary_span]
929    pub span: Span,
930}
931
932#[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)]
933#[diag(hir_analysis_closure_implicit_hrtb)]
934pub(crate) struct ClosureImplicitHrtb {
935    #[primary_span]
936    pub spans: Vec<Span>,
937    #[label]
938    pub for_sp: Span,
939}
940
941#[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)]
942#[diag(hir_analysis_empty_specialization)]
943pub(crate) struct EmptySpecialization {
944    #[primary_span]
945    pub span: Span,
946    #[note]
947    pub base_impl_span: Span,
948}
949
950#[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)]
951#[diag(hir_analysis_static_specialize)]
952pub(crate) struct StaticSpecialize {
953    #[primary_span]
954    pub span: Span,
955}
956
957#[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)]
958pub(crate) enum DropImplPolarity {
959    #[diag(hir_analysis_drop_impl_negative)]
960    Negative {
961        #[primary_span]
962        span: Span,
963    },
964    #[diag(hir_analysis_drop_impl_reservation)]
965    Reservation {
966        #[primary_span]
967        span: Span,
968    },
969}
970
971#[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)]
972pub(crate) enum ReturnTypeNotationIllegalParam {
973    #[diag(hir_analysis_return_type_notation_illegal_param_type)]
974    Type {
975        #[primary_span]
976        span: Span,
977        #[label]
978        param_span: Span,
979    },
980    #[diag(hir_analysis_return_type_notation_illegal_param_const)]
981    Const {
982        #[primary_span]
983        span: Span,
984        #[label]
985        param_span: Span,
986    },
987}
988
989#[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)]
990pub(crate) enum LateBoundInApit {
991    #[diag(hir_analysis_late_bound_type_in_apit)]
992    Type {
993        #[primary_span]
994        span: Span,
995        #[label]
996        param_span: Span,
997    },
998    #[diag(hir_analysis_late_bound_const_in_apit)]
999    Const {
1000        #[primary_span]
1001        span: Span,
1002        #[label]
1003        param_span: Span,
1004    },
1005    #[diag(hir_analysis_late_bound_lifetime_in_apit)]
1006    Lifetime {
1007        #[primary_span]
1008        span: Span,
1009        #[label]
1010        param_span: Span,
1011    },
1012}
1013
1014#[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)]
1015#[diag(hir_analysis_unused_associated_type_bounds)]
1016#[note]
1017pub(crate) struct UnusedAssociatedTypeBounds {
1018    #[suggestion(code = "")]
1019    pub span: Span,
1020}
1021
1022#[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)]
1023#[diag(hir_analysis_rpitit_refined)]
1024#[note]
1025#[note(hir_analysis_feedback_note)]
1026pub(crate) struct ReturnPositionImplTraitInTraitRefined<'tcx> {
1027    #[suggestion(applicability = "maybe-incorrect", code = "{pre}{return_ty}{post}")]
1028    pub impl_return_span: Span,
1029    #[label]
1030    pub trait_return_span: Option<Span>,
1031    #[label(hir_analysis_unmatched_bound_label)]
1032    pub unmatched_bound: Option<Span>,
1033
1034    pub pre: &'static str,
1035    pub post: &'static str,
1036    pub return_ty: Ty<'tcx>,
1037}
1038
1039#[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)]
1040#[diag(hir_analysis_rpitit_refined_lifetimes)]
1041#[note]
1042#[note(hir_analysis_feedback_note)]
1043pub(crate) struct ReturnPositionImplTraitInTraitRefinedLifetimes {
1044    #[suggestion(applicability = "maybe-incorrect", code = "{suggestion}")]
1045    pub suggestion_span: Span,
1046    pub suggestion: String,
1047}
1048
1049#[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)]
1050#[diag(hir_analysis_inherent_ty_outside, code = E0390)]
1051#[help]
1052pub(crate) struct InherentTyOutside {
1053    #[primary_span]
1054    #[help(hir_analysis_span_help)]
1055    pub span: Span,
1056}
1057
1058#[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)]
1059#[diag(hir_analysis_dispatch_from_dyn_repr, code = E0378)]
1060pub(crate) struct DispatchFromDynRepr {
1061    #[primary_span]
1062    pub span: Span,
1063}
1064
1065#[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)]
1066#[diag(hir_analysis_coerce_pointee_not_struct, code = E0802)]
1067pub(crate) struct CoercePointeeNotStruct {
1068    #[primary_span]
1069    pub span: Span,
1070    pub kind: String,
1071}
1072
1073#[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)]
1074#[diag(hir_analysis_coerce_pointee_not_concrete_ty, code = E0802)]
1075pub(crate) struct CoercePointeeNotConcreteType {
1076    #[primary_span]
1077    pub span: Span,
1078}
1079
1080#[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)]
1081#[diag(hir_analysis_coerce_pointee_no_user_validity_assertion, code = E0802)]
1082pub(crate) struct CoercePointeeNoUserValidityAssertion {
1083    #[primary_span]
1084    pub span: Span,
1085}
1086
1087#[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)]
1088#[diag(hir_analysis_coerce_pointee_not_transparent, code = E0802)]
1089pub(crate) struct CoercePointeeNotTransparent {
1090    #[primary_span]
1091    pub span: Span,
1092}
1093
1094#[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)]
1095#[diag(hir_analysis_coerce_pointee_no_field, code = E0802)]
1096pub(crate) struct CoercePointeeNoField {
1097    #[primary_span]
1098    pub span: Span,
1099}
1100
1101#[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)]
1102#[diag(hir_analysis_inherent_ty_outside_relevant, code = E0390)]
1103#[help]
1104pub(crate) struct InherentTyOutsideRelevant {
1105    #[primary_span]
1106    pub span: Span,
1107    #[help(hir_analysis_span_help)]
1108    pub help_span: Span,
1109}
1110
1111#[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)]
1112#[diag(hir_analysis_inherent_ty_outside_new, code = E0116)]
1113#[note]
1114pub(crate) struct InherentTyOutsideNew {
1115    #[primary_span]
1116    #[label]
1117    pub span: Span,
1118}
1119
1120#[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)]
1121#[diag(hir_analysis_inherent_ty_outside_primitive, code = E0390)]
1122#[help]
1123pub(crate) struct InherentTyOutsidePrimitive {
1124    #[primary_span]
1125    pub span: Span,
1126    #[help(hir_analysis_span_help)]
1127    pub help_span: Span,
1128}
1129
1130#[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)]
1131#[diag(hir_analysis_inherent_primitive_ty, code = E0390)]
1132#[help]
1133pub(crate) struct InherentPrimitiveTy<'a> {
1134    #[primary_span]
1135    pub span: Span,
1136    #[subdiagnostic]
1137    pub note: Option<InherentPrimitiveTyNote<'a>>,
1138}
1139
1140#[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)]
1141#[note(hir_analysis_inherent_primitive_ty_note)]
1142pub(crate) struct InherentPrimitiveTyNote<'a> {
1143    pub subty: Ty<'a>,
1144}
1145
1146#[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)]
1147#[diag(hir_analysis_inherent_dyn, code = E0785)]
1148#[note]
1149pub(crate) struct InherentDyn {
1150    #[primary_span]
1151    #[label]
1152    pub span: Span,
1153}
1154
1155#[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)]
1156#[diag(hir_analysis_inherent_nominal, code = E0118)]
1157#[note]
1158pub(crate) struct InherentNominal {
1159    #[primary_span]
1160    #[label]
1161    pub span: Span,
1162}
1163
1164#[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)]
1165#[diag(hir_analysis_dispatch_from_dyn_zst, code = E0378)]
1166#[note]
1167pub(crate) struct DispatchFromDynZST<'a> {
1168    #[primary_span]
1169    pub span: Span,
1170    pub name: Ident,
1171    pub ty: Ty<'a>,
1172}
1173
1174#[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)]
1175#[diag(hir_analysis_coerce_zero, code = E0374)]
1176pub(crate) struct CoerceNoField {
1177    #[primary_span]
1178    pub span: Span,
1179    pub trait_name: &'static str,
1180    #[note(hir_analysis_coercion_between_struct_single_note)]
1181    pub note: bool,
1182}
1183
1184#[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)]
1185#[diag(hir_analysis_coerce_multi, code = E0375)]
1186pub(crate) struct CoerceMulti {
1187    pub trait_name: &'static str,
1188    #[primary_span]
1189    pub span: Span,
1190    pub number: usize,
1191    #[note]
1192    pub fields: MultiSpan,
1193}
1194
1195#[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)]
1196#[diag(hir_analysis_coerce_unsized_may, code = E0377)]
1197pub(crate) struct CoerceUnsizedNonStruct {
1198    #[primary_span]
1199    pub span: Span,
1200    pub trait_name: &'static str,
1201}
1202
1203#[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)]
1204#[diag(hir_analysis_coerce_same_pat_kind)]
1205pub(crate) struct CoerceSamePatKind {
1206    #[primary_span]
1207    pub span: Span,
1208    pub trait_name: &'static str,
1209    pub pat_a: String,
1210    pub pat_b: String,
1211}
1212
1213#[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)]
1214#[diag(hir_analysis_coerce_unsized_may, code = E0377)]
1215pub(crate) struct CoerceSameStruct {
1216    #[primary_span]
1217    pub span: Span,
1218    pub trait_name: &'static str,
1219    #[note(hir_analysis_coercion_between_struct_same_note)]
1220    pub note: bool,
1221    pub source_path: String,
1222    pub target_path: String,
1223}
1224
1225#[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)]
1226#[diag(hir_analysis_coerce_unsized_field_validity)]
1227pub(crate) struct CoerceFieldValidity<'tcx> {
1228    #[primary_span]
1229    pub span: Span,
1230    pub ty: Ty<'tcx>,
1231    pub trait_name: &'static str,
1232    #[label]
1233    pub field_span: Span,
1234    pub field_ty: Ty<'tcx>,
1235}
1236
1237#[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)]
1238#[diag(hir_analysis_trait_cannot_impl_for_ty, code = E0204)]
1239pub(crate) struct TraitCannotImplForTy {
1240    #[primary_span]
1241    pub span: Span,
1242    pub trait_name: String,
1243    #[label]
1244    pub label_spans: Vec<Span>,
1245    #[subdiagnostic]
1246    pub notes: Vec<ImplForTyRequires>,
1247}
1248
1249#[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)]
1250#[note(hir_analysis_requires_note)]
1251pub(crate) struct ImplForTyRequires {
1252    #[primary_span]
1253    pub span: MultiSpan,
1254    pub error_predicate: String,
1255    pub trait_name: String,
1256    pub ty: String,
1257}
1258
1259#[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)]
1260#[diag(hir_analysis_traits_with_default_impl, code = E0321)]
1261#[note]
1262pub(crate) struct TraitsWithDefaultImpl<'a> {
1263    #[primary_span]
1264    pub span: Span,
1265    pub traits: String,
1266    pub problematic_kind: &'a str,
1267    pub self_ty: Ty<'a>,
1268}
1269
1270#[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)]
1271#[diag(hir_analysis_cross_crate_traits, code = E0321)]
1272pub(crate) struct CrossCrateTraits<'a> {
1273    #[primary_span]
1274    #[label]
1275    pub span: Span,
1276    pub traits: String,
1277    pub self_ty: Ty<'a>,
1278}
1279
1280#[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)]
1281#[diag(hir_analysis_cross_crate_traits_defined, code = E0321)]
1282pub(crate) struct CrossCrateTraitsDefined {
1283    #[primary_span]
1284    #[label]
1285    pub span: Span,
1286    pub traits: String,
1287}
1288
1289#[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)]
1290#[diag(hir_analysis_no_variant_named, code = E0599)]
1291pub struct NoVariantNamed<'tcx> {
1292    #[primary_span]
1293    pub span: Span,
1294    pub ident: Ident,
1295    pub ty: Ty<'tcx>,
1296}
1297
1298// FIXME(fmease): Deduplicate:
1299
1300#[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)]
1301#[diag(hir_analysis_ty_param_first_local, code = E0210)]
1302#[note]
1303pub(crate) struct TyParamFirstLocal<'tcx> {
1304    #[primary_span]
1305    #[label]
1306    pub span: Span,
1307    #[note(hir_analysis_case_note)]
1308    pub note: (),
1309    pub param: Ident,
1310    pub local_type: Ty<'tcx>,
1311}
1312
1313#[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)]
1314#[diag(hir_analysis_ty_param_first_local, code = E0210)]
1315#[note]
1316pub(crate) struct TyParamFirstLocalLint<'tcx> {
1317    #[label]
1318    pub span: Span,
1319    #[note(hir_analysis_case_note)]
1320    pub note: (),
1321    pub param: Ident,
1322    pub local_type: Ty<'tcx>,
1323}
1324
1325#[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)]
1326#[diag(hir_analysis_ty_param_some, code = E0210)]
1327#[note]
1328pub(crate) struct TyParamSome {
1329    #[primary_span]
1330    #[label]
1331    pub span: Span,
1332    #[note(hir_analysis_only_note)]
1333    pub note: (),
1334    pub param: Ident,
1335}
1336
1337#[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)]
1338#[diag(hir_analysis_ty_param_some, code = E0210)]
1339#[note]
1340pub(crate) struct TyParamSomeLint {
1341    #[label]
1342    pub span: Span,
1343    #[note(hir_analysis_only_note)]
1344    pub note: (),
1345    pub param: Ident,
1346}
1347
1348#[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)]
1349pub(crate) enum OnlyCurrentTraits {
1350    #[diag(hir_analysis_only_current_traits_outside, code = E0117)]
1351    Outside {
1352        #[primary_span]
1353        span: Span,
1354        #[note(hir_analysis_only_current_traits_note_uncovered)]
1355        #[note(hir_analysis_only_current_traits_note_more_info)]
1356        #[note(hir_analysis_only_current_traits_note)]
1357        note: (),
1358    },
1359    #[diag(hir_analysis_only_current_traits_primitive, code = E0117)]
1360    Primitive {
1361        #[primary_span]
1362        span: Span,
1363        #[note(hir_analysis_only_current_traits_note_uncovered)]
1364        #[note(hir_analysis_only_current_traits_note_more_info)]
1365        #[note(hir_analysis_only_current_traits_note)]
1366        note: (),
1367    },
1368    #[diag(hir_analysis_only_current_traits_arbitrary, code = E0117)]
1369    Arbitrary {
1370        #[primary_span]
1371        span: Span,
1372        #[note(hir_analysis_only_current_traits_note_uncovered)]
1373        #[note(hir_analysis_only_current_traits_note_more_info)]
1374        #[note(hir_analysis_only_current_traits_note)]
1375        note: (),
1376    },
1377}
1378
1379#[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)]
1380#[label(hir_analysis_only_current_traits_opaque)]
1381pub(crate) struct OnlyCurrentTraitsOpaque {
1382    #[primary_span]
1383    pub span: Span,
1384}
1385#[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)]
1386#[label(hir_analysis_only_current_traits_foreign)]
1387pub(crate) struct OnlyCurrentTraitsForeign {
1388    #[primary_span]
1389    pub span: Span,
1390}
1391
1392#[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)]
1393#[label(hir_analysis_only_current_traits_name)]
1394pub(crate) struct OnlyCurrentTraitsName<'a> {
1395    #[primary_span]
1396    pub span: Span,
1397    pub name: &'a str,
1398}
1399
1400#[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)]
1401#[label(hir_analysis_only_current_traits_pointer)]
1402pub(crate) struct OnlyCurrentTraitsPointer<'a> {
1403    #[primary_span]
1404    pub span: Span,
1405    pub pointer: Ty<'a>,
1406}
1407
1408#[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)]
1409#[label(hir_analysis_only_current_traits_ty)]
1410pub(crate) struct OnlyCurrentTraitsTy<'a> {
1411    #[primary_span]
1412    pub span: Span,
1413    pub ty: Ty<'a>,
1414}
1415
1416#[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)]
1417#[label(hir_analysis_only_current_traits_adt)]
1418pub(crate) struct OnlyCurrentTraitsAdt {
1419    #[primary_span]
1420    pub span: Span,
1421    pub name: String,
1422}
1423
1424#[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)]
1425#[multipart_suggestion(
1426    hir_analysis_only_current_traits_pointer_sugg,
1427    applicability = "maybe-incorrect"
1428)]
1429pub(crate) struct OnlyCurrentTraitsPointerSugg<'a> {
1430    #[suggestion_part(code = "WrapperType")]
1431    pub wrapper_span: Span,
1432    #[suggestion_part(code = "struct WrapperType(*{mut_key}{ptr_ty});\n\n")]
1433    pub(crate) struct_span: Span,
1434    pub mut_key: &'a str,
1435    pub ptr_ty: Ty<'a>,
1436}
1437
1438#[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)]
1439#[diag(hir_analysis_not_supported_delegation)]
1440pub(crate) struct UnsupportedDelegation<'a> {
1441    #[primary_span]
1442    pub span: Span,
1443    pub descr: &'a str,
1444    #[label]
1445    pub callee_span: Span,
1446}
1447
1448#[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)]
1449#[diag(hir_analysis_method_should_return_future)]
1450pub(crate) struct MethodShouldReturnFuture {
1451    #[primary_span]
1452    pub span: Span,
1453    pub method_name: Ident,
1454    #[note]
1455    pub trait_item_span: Option<Span>,
1456}
1457
1458#[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)]
1459#[diag(hir_analysis_unused_generic_parameter)]
1460pub(crate) struct UnusedGenericParameter {
1461    #[primary_span]
1462    #[label]
1463    pub span: Span,
1464    pub param_name: Ident,
1465    pub param_def_kind: &'static str,
1466    #[label(hir_analysis_usage_spans)]
1467    pub usage_spans: Vec<Span>,
1468    #[subdiagnostic]
1469    pub help: UnusedGenericParameterHelp,
1470    #[help(hir_analysis_const_param_help)]
1471    pub const_param_help: bool,
1472}
1473
1474#[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)]
1475#[diag(hir_analysis_recursive_generic_parameter)]
1476pub(crate) struct RecursiveGenericParameter {
1477    #[primary_span]
1478    pub spans: Vec<Span>,
1479    #[label]
1480    pub param_span: Span,
1481    pub param_name: Ident,
1482    pub param_def_kind: &'static str,
1483    #[subdiagnostic]
1484    pub help: UnusedGenericParameterHelp,
1485    #[note]
1486    pub note: (),
1487}
1488
1489#[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)]
1490pub(crate) enum UnusedGenericParameterHelp {
1491    #[help(hir_analysis_unused_generic_parameter_adt_help)]
1492    Adt { param_name: Ident, phantom_data: String },
1493    #[help(hir_analysis_unused_generic_parameter_adt_no_phantom_data_help)]
1494    AdtNoPhantomData { param_name: Ident },
1495    #[help(hir_analysis_unused_generic_parameter_ty_alias_help)]
1496    TyAlias { param_name: Ident },
1497}
1498
1499#[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)]
1500#[diag(hir_analysis_unconstrained_generic_parameter)]
1501pub(crate) struct UnconstrainedGenericParameter {
1502    #[primary_span]
1503    #[label]
1504    pub span: Span,
1505    pub param_name: Ident,
1506    pub param_def_kind: &'static str,
1507    #[note(hir_analysis_const_param_note)]
1508    pub const_param_note: bool,
1509    #[note(hir_analysis_const_param_note2)]
1510    pub const_param_note2: bool,
1511}
1512
1513#[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)]
1514#[diag(hir_analysis_opaque_captures_higher_ranked_lifetime, code = E0657)]
1515pub(crate) struct OpaqueCapturesHigherRankedLifetime {
1516    #[primary_span]
1517    pub span: MultiSpan,
1518    #[label]
1519    pub label: Option<Span>,
1520    #[note]
1521    pub decl_span: MultiSpan,
1522    pub bad_place: &'static str,
1523}
1524
1525#[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)]
1526pub(crate) enum InvalidReceiverTyHint {
1527    #[note(hir_analysis_invalid_receiver_ty_help_weak_note)]
1528    Weak,
1529    #[note(hir_analysis_invalid_receiver_ty_help_nonnull_note)]
1530    NonNull,
1531}
1532
1533#[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)]
1534#[diag(hir_analysis_invalid_receiver_ty_no_arbitrary_self_types, code = E0307)]
1535#[note]
1536#[help(hir_analysis_invalid_receiver_ty_help_no_arbitrary_self_types)]
1537pub(crate) struct InvalidReceiverTyNoArbitrarySelfTypes<'tcx> {
1538    #[primary_span]
1539    pub span: Span,
1540    pub receiver_ty: Ty<'tcx>,
1541}
1542
1543#[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)]
1544#[diag(hir_analysis_invalid_receiver_ty, code = E0307)]
1545#[note]
1546#[help(hir_analysis_invalid_receiver_ty_help)]
1547pub(crate) struct InvalidReceiverTy<'tcx> {
1548    #[primary_span]
1549    pub span: Span,
1550    pub receiver_ty: Ty<'tcx>,
1551    #[subdiagnostic]
1552    pub hint: Option<InvalidReceiverTyHint>,
1553}
1554
1555#[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)]
1556#[diag(hir_analysis_invalid_generic_receiver_ty, code = E0801)]
1557#[note]
1558#[help(hir_analysis_invalid_generic_receiver_ty_help)]
1559pub(crate) struct InvalidGenericReceiverTy<'tcx> {
1560    #[primary_span]
1561    pub span: Span,
1562    pub receiver_ty: Ty<'tcx>,
1563}
1564
1565#[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)]
1566#[diag(hir_analysis_cmse_inputs_stack_spill, code = E0798)]
1567#[note]
1568pub(crate) struct CmseInputsStackSpill {
1569    #[primary_span]
1570    #[label]
1571    pub spans: Vec<Span>,
1572    pub abi: ExternAbi,
1573}
1574
1575#[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)]
1576#[diag(hir_analysis_cmse_output_stack_spill, code = E0798)]
1577#[note(hir_analysis_note1)]
1578#[note(hir_analysis_note2)]
1579pub(crate) struct CmseOutputStackSpill {
1580    #[primary_span]
1581    #[label]
1582    pub span: Span,
1583    pub abi: ExternAbi,
1584}
1585
1586#[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)]
1587#[diag(hir_analysis_cmse_generic, code = E0798)]
1588pub(crate) struct CmseGeneric {
1589    #[primary_span]
1590    pub span: Span,
1591    pub abi: ExternAbi,
1592}
1593
1594#[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)]
1595#[diag(hir_analysis_cmse_impl_trait, code = E0798)]
1596pub(crate) struct CmseImplTrait {
1597    #[primary_span]
1598    pub span: Span,
1599    pub abi: ExternAbi,
1600}
1601
1602#[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)]
1603#[diag(hir_analysis_bad_return_type_notation_position)]
1604pub(crate) struct BadReturnTypeNotation {
1605    #[primary_span]
1606    pub span: Span,
1607}
1608
1609#[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)]
1610#[diag(hir_analysis_supertrait_item_shadowing)]
1611pub(crate) struct SupertraitItemShadowing {
1612    pub item: Symbol,
1613    pub subtrait: Symbol,
1614    #[subdiagnostic]
1615    pub shadowee: SupertraitItemShadowee,
1616}
1617
1618#[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)]
1619pub(crate) enum SupertraitItemShadowee {
1620    #[note(hir_analysis_supertrait_item_shadowee)]
1621    Labeled {
1622        #[primary_span]
1623        span: Span,
1624        supertrait: Symbol,
1625    },
1626    #[note(hir_analysis_supertrait_item_multiple_shadowee)]
1627    Several {
1628        #[primary_span]
1629        spans: MultiSpan,
1630        traits: DiagSymbolList,
1631    },
1632}
1633
1634#[derive(const _: () =
    {
        impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
            DynTraitAssocItemBindingMentionsSelf 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 {
                    DynTraitAssocItemBindingMentionsSelf {
                        span: __binding_0, kind: __binding_1, binding: __binding_2 }
                        => {
                        let mut diag =
                            rustc_errors::Diag::new(dcx, level,
                                crate::fluent_generated::hir_analysis_dyn_trait_assoc_item_binding_mentions_self);
                        ;
                        diag.arg("kind", __binding_1);
                        diag.span(__binding_0);
                        diag.span_label(__binding_0,
                            crate::fluent_generated::_subdiag::label);
                        diag.span_label(__binding_2,
                            crate::fluent_generated::hir_analysis_binding_label);
                        diag
                    }
                }
            }
        }
    };Diagnostic)]
1635#[diag(hir_analysis_dyn_trait_assoc_item_binding_mentions_self)]
1636pub(crate) struct DynTraitAssocItemBindingMentionsSelf {
1637    #[primary_span]
1638    #[label]
1639    pub span: Span,
1640    pub kind: &'static str,
1641    #[label(hir_analysis_binding_label)]
1642    pub binding: Span,
1643}
1644
1645#[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)]
1646#[diag(hir_analysis_abi_custom_clothed_function)]
1647pub(crate) struct AbiCustomClothedFunction {
1648    #[primary_span]
1649    pub span: Span,
1650    #[suggestion(
1651        hir_analysis_suggestion,
1652        applicability = "maybe-incorrect",
1653        code = "#[unsafe(naked)]\n",
1654        style = "short"
1655    )]
1656    pub naked_span: Span,
1657}
1658
1659#[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)]
1660#[diag(hir_analysis_async_drop_without_sync_drop)]
1661#[help]
1662pub(crate) struct AsyncDropWithoutSyncDrop {
1663    #[primary_span]
1664    pub span: Span,
1665}
1666
1667#[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)]
1668#[diag(hir_analysis_lifetimes_or_bounds_mismatch_on_eii)]
1669pub(crate) struct LifetimesOrBoundsMismatchOnEii {
1670    #[primary_span]
1671    #[label]
1672    pub span: Span,
1673    #[label(hir_analysis_generics_label)]
1674    pub generics_span: Span,
1675    #[label(hir_analysis_where_label)]
1676    pub where_span: Option<Span>,
1677    #[label(hir_analysis_bounds_label)]
1678    pub bounds_span: Vec<Span>,
1679    pub ident: Symbol,
1680}
1681
1682#[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)]
1683#[diag(hir_analysis_eii_with_generics)]
1684#[help]
1685pub(crate) struct EiiWithGenerics {
1686    #[primary_span]
1687    pub span: Span,
1688    #[label]
1689    pub attr: Span,
1690    pub eii_name: Symbol,
1691    pub impl_name: Symbol,
1692}