diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:12:43 +0000 |
commit | cf94bdc0742c13e2a0cac864c478b8626b266e1b (patch) | |
tree | 044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /compiler/rustc_const_eval/src/errors.rs | |
parent | Adding debian version 1.65.0+dfsg1-2. (diff) | |
download | rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
-rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index c3547cb3a..4b0550767 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -1,146 +1,146 @@ use rustc_hir::ConstContext; -use rustc_macros::SessionDiagnostic; +use rustc_macros::Diagnostic; use rustc_span::Span; -#[derive(SessionDiagnostic)] -#[diag(const_eval::unstable_in_stable)] +#[derive(Diagnostic)] +#[diag(const_eval_unstable_in_stable)] pub(crate) struct UnstableInStable { pub gate: String, #[primary_span] pub span: Span, #[suggestion( - const_eval::unstable_sugg, + unstable_sugg, code = "#[rustc_const_unstable(feature = \"...\", issue = \"...\")]\n", applicability = "has-placeholders" )] #[suggestion( - const_eval::bypass_sugg, + bypass_sugg, code = "#[rustc_allow_const_fn_unstable({gate})]\n", applicability = "has-placeholders" )] pub attr_span: Span, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::thread_local_access, code = "E0625")] +#[derive(Diagnostic)] +#[diag(const_eval_thread_local_access, code = "E0625")] pub(crate) struct NonConstOpErr { #[primary_span] pub span: Span, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::static_access, code = "E0013")] +#[derive(Diagnostic)] +#[diag(const_eval_static_access, code = "E0013")] #[help] pub(crate) struct StaticAccessErr { #[primary_span] pub span: Span, pub kind: ConstContext, - #[note(const_eval::teach_note)] - #[help(const_eval::teach_help)] + #[note(teach_note)] + #[help(teach_help)] pub teach: Option<()>, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::raw_ptr_to_int)] +#[derive(Diagnostic)] +#[diag(const_eval_raw_ptr_to_int)] #[note] -#[note(const_eval::note2)] +#[note(note2)] pub(crate) struct RawPtrToIntErr { #[primary_span] pub span: Span, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::raw_ptr_comparison)] +#[derive(Diagnostic)] +#[diag(const_eval_raw_ptr_comparison)] #[note] pub(crate) struct RawPtrComparisonErr { #[primary_span] pub span: Span, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::panic_non_str)] +#[derive(Diagnostic)] +#[diag(const_eval_panic_non_str)] pub(crate) struct PanicNonStrErr { #[primary_span] pub span: Span, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::mut_deref, code = "E0658")] +#[derive(Diagnostic)] +#[diag(const_eval_mut_deref, code = "E0658")] pub(crate) struct MutDerefErr { #[primary_span] pub span: Span, pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::transient_mut_borrow, code = "E0658")] +#[derive(Diagnostic)] +#[diag(const_eval_transient_mut_borrow, code = "E0658")] pub(crate) struct TransientMutBorrowErr { #[primary_span] pub span: Span, pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::transient_mut_borrow_raw, code = "E0658")] +#[derive(Diagnostic)] +#[diag(const_eval_transient_mut_borrow_raw, code = "E0658")] pub(crate) struct TransientMutBorrowErrRaw { #[primary_span] pub span: Span, pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::max_num_nodes_in_const)] +#[derive(Diagnostic)] +#[diag(const_eval_max_num_nodes_in_const)] pub(crate) struct MaxNumNodesInConstErr { #[primary_span] pub span: Span, pub global_const_id: String, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unallowed_fn_pointer_call)] +#[derive(Diagnostic)] +#[diag(const_eval_unallowed_fn_pointer_call)] pub(crate) struct UnallowedFnPointerCall { #[primary_span] pub span: Span, pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unstable_const_fn)] +#[derive(Diagnostic)] +#[diag(const_eval_unstable_const_fn)] pub(crate) struct UnstableConstFn { #[primary_span] pub span: Span, pub def_path: String, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unallowed_mutable_refs, code = "E0764")] +#[derive(Diagnostic)] +#[diag(const_eval_unallowed_mutable_refs, code = "E0764")] pub(crate) struct UnallowedMutableRefs { #[primary_span] pub span: Span, pub kind: ConstContext, - #[note(const_eval::teach_note)] + #[note(teach_note)] pub teach: Option<()>, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unallowed_mutable_refs_raw, code = "E0764")] +#[derive(Diagnostic)] +#[diag(const_eval_unallowed_mutable_refs_raw, code = "E0764")] pub(crate) struct UnallowedMutableRefsRaw { #[primary_span] pub span: Span, pub kind: ConstContext, - #[note(const_eval::teach_note)] + #[note(teach_note)] pub teach: Option<()>, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::non_const_fmt_macro_call, code = "E0015")] +#[derive(Diagnostic)] +#[diag(const_eval_non_const_fmt_macro_call, code = "E0015")] pub(crate) struct NonConstFmtMacroCall { #[primary_span] pub span: Span, pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::non_const_fn_call, code = "E0015")] +#[derive(Diagnostic)] +#[diag(const_eval_non_const_fn_call, code = "E0015")] pub(crate) struct NonConstFnCall { #[primary_span] pub span: Span, @@ -148,35 +148,35 @@ pub(crate) struct NonConstFnCall { pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unallowed_op_in_const_context)] +#[derive(Diagnostic)] +#[diag(const_eval_unallowed_op_in_const_context)] pub(crate) struct UnallowedOpInConstContext { #[primary_span] pub span: Span, pub msg: String, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unallowed_heap_allocations, code = "E0010")] +#[derive(Diagnostic)] +#[diag(const_eval_unallowed_heap_allocations, code = "E0010")] pub(crate) struct UnallowedHeapAllocations { #[primary_span] #[label] pub span: Span, pub kind: ConstContext, - #[note(const_eval::teach_note)] + #[note(teach_note)] pub teach: Option<()>, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::unallowed_inline_asm, code = "E0015")] +#[derive(Diagnostic)] +#[diag(const_eval_unallowed_inline_asm, code = "E0015")] pub(crate) struct UnallowedInlineAsm { #[primary_span] pub span: Span, pub kind: ConstContext, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::interior_mutable_data_refer, code = "E0492")] +#[derive(Diagnostic)] +#[diag(const_eval_interior_mutable_data_refer, code = "E0492")] pub(crate) struct InteriorMutableDataRefer { #[primary_span] #[label] @@ -184,12 +184,12 @@ pub(crate) struct InteriorMutableDataRefer { #[help] pub opt_help: Option<()>, pub kind: ConstContext, - #[note(const_eval::teach_note)] + #[note(teach_note)] pub teach: Option<()>, } -#[derive(SessionDiagnostic)] -#[diag(const_eval::interior_mutability_borrow)] +#[derive(Diagnostic)] +#[diag(const_eval_interior_mutability_borrow)] pub(crate) struct InteriorMutabilityBorrow { #[primary_span] pub span: Span, |