diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/errors.rs | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index d0fb7aff30e..309d02052b7 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -333,3 +333,70 @@ pub(crate) struct TrackCallerOnMain { #[label] pub annotated: Span, } + +#[derive(Diagnostic)] +#[diag(hir_analysis_start_not_track_caller)] +pub(crate) struct StartTrackCaller { + #[primary_span] + pub span: Span, + #[label] + pub start: Span, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_start_not_async, code = "E0752")] +pub(crate) struct StartAsync { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_start_function_where, code = "E0647")] +pub(crate) struct StartFunctionWhere { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_start_function_parameters, code = "E0132")] +pub(crate) struct StartFunctionParameters { + #[primary_span] + #[label] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_main_function_return_type_generic, code = "E0131")] +pub(crate) struct MainFunctionReturnTypeGeneric { + #[primary_span] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_main_function_async, code = "E0752")] +pub(crate) struct MainFunctionAsync { + #[primary_span] + pub span: Span, + #[label] + pub asyncness: Option<Span>, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_main_function_generic_parameters, code = "E0131")] +pub(crate) struct MainFunctionGenericParameters { + #[primary_span] + pub span: Span, + #[label] + pub label_span: Option<Span>, +} + +#[derive(Diagnostic)] +#[diag(hir_analysis_variadic_function_compatible_convention, code = "E0045")] +pub(crate) struct VariadicFunctionCompatibleConvention<'a> { + #[primary_span] + #[label] + pub span: Span, + pub conventions: &'a str, +} |
