diff options
| author | nidnogg <henriquevt98@gmail.com> | 2022-08-20 16:27:41 -0300 |
|---|---|---|
| committer | nidnogg <henriquevt98@gmail.com> | 2022-08-21 23:22:55 -0300 |
| commit | 4c82845b3ac583377b871bf01dc07ec513c466fe (patch) | |
| tree | ededbf4ca5f0fb7512322e75dc7059e7fd28d489 /compiler/rustc_const_eval/src/errors.rs | |
| parent | d1f14ee1b01dd39cd79cd9cdd71e91ba521901fe (diff) | |
| download | rust-4c82845b3ac583377b871bf01dc07ec513c466fe.tar.gz rust-4c82845b3ac583377b871bf01dc07ec513c466fe.zip | |
Fixed failing tests (missing labels), added automatic error code in create_feature_err() builder
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index 7fa6a67a7f9..7e1cf4ef1aa 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -89,8 +89,8 @@ pub(crate) struct TransientMutBorrowErrRaw { } #[derive(SessionDiagnostic)] -#[error(const_eval::const_evaL_max_num_nodes_exceeded)] -pub(crate) struct MaxNumNodesExceeded { +#[error(const_eval::const_evaL_max_num_nodes_in_const_err)] +pub(crate) struct MaxNumNodesInConstErr { #[primary_span] pub span: Span, pub s: String, @@ -109,7 +109,7 @@ pub(crate) struct UnallowedFnPointerCall { pub(crate) struct UnstableConstFn { #[primary_span] pub span: Span, - pub def_id: String, + pub def_path: String, } #[derive(SessionDiagnostic)] @@ -160,6 +160,7 @@ pub(crate) struct UnallowedOpInConstContext { #[error(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)] @@ -178,6 +179,7 @@ pub(crate) struct UnallowedInlineAsm { #[error(const_eval::interior_mutable_data_refer, code = "E0492")] pub(crate) struct InteriorMutableDataRefer { #[primary_span] + #[label] pub span: Span, #[help] pub opt_help: Option<()>, |
