}
#[derive(SessionDiagnostic)]
-#[error(const_eval::max_num_nodes_in_const)]
+#[diag(const_eval::max_num_nodes_in_const)]
pub(crate) struct MaxNumNodesInConstErr {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unallowed_fn_pointer_call)]
+#[diag(const_eval::unallowed_fn_pointer_call)]
pub(crate) struct UnallowedFnPointerCall {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unstable_const_fn)]
+#[diag(const_eval::unstable_const_fn)]
pub(crate) struct UnstableConstFn {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unallowed_mutable_refs, code = "E0764")]
+#[diag(const_eval::unallowed_mutable_refs, code = "E0764")]
pub(crate) struct UnallowedMutableRefs {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unallowed_mutable_refs_raw, code = "E0764")]
+#[diag(const_eval::unallowed_mutable_refs_raw, code = "E0764")]
pub(crate) struct UnallowedMutableRefsRaw {
#[primary_span]
pub span: Span,
pub teach: Option<()>,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::non_const_fmt_macro_call, code = "E0015")]
+#[diag(const_eval::non_const_fmt_macro_call, code = "E0015")]
pub(crate) struct NonConstFmtMacroCall {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::non_const_fn_call, code = "E0015")]
+#[diag(const_eval::non_const_fn_call, code = "E0015")]
pub(crate) struct NonConstFnCall {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unallowed_op_in_const_context)]
+#[diag(const_eval::unallowed_op_in_const_context)]
pub(crate) struct UnallowedOpInConstContext {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unallowed_heap_allocations, code = "E0010")]
+#[diag(const_eval::unallowed_heap_allocations, code = "E0010")]
pub(crate) struct UnallowedHeapAllocations {
#[primary_span]
#[label]
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::unallowed_inline_asm, code = "E0015")]
+#[diag(const_eval::unallowed_inline_asm, code = "E0015")]
pub(crate) struct UnallowedInlineAsm {
#[primary_span]
pub span: Span,
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::interior_mutable_data_refer, code = "E0492")]
+#[diag(const_eval::interior_mutable_data_refer, code = "E0492")]
pub(crate) struct InteriorMutableDataRefer {
#[primary_span]
#[label]
}
#[derive(SessionDiagnostic)]
-#[error(const_eval::interior_mutability_borrow)]
+#[diag(const_eval::interior_mutability_borrow)]
pub(crate) struct InteriorMutabilityBorrow {
#[primary_span]
pub span: Span,