1use rustc_macros::Diagnostic;
2use rustc_span::Span;
3
4#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
OpaqueHiddenTypeDiag where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
OpaqueHiddenTypeDiag {
span: __binding_0,
opaque_type: __binding_1,
hidden_type: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
crate::fluent_generated::infer_opaque_hidden_type);
;
diag.span(__binding_0);
diag.span_label(__binding_0,
crate::fluent_generated::_subdiag::label);
diag.span_note(__binding_1,
crate::fluent_generated::infer_opaque_type);
diag.span_note(__binding_2,
crate::fluent_generated::infer_hidden_type);
diag
}
}
}
}
};Diagnostic)]
5#[diag(infer_opaque_hidden_type)]
6pub(crate) struct OpaqueHiddenTypeDiag {
7 #[primary_span]
8 #[label]
9 pub span: Span,
10 #[note(infer_opaque_type)]
11 pub opaque_type: Span,
12 #[note(infer_hidden_type)]
13 pub hidden_type: Span,
14}