2022-10-14 13:10:49 +01:00
|
|
|
use rustc_errors::DiagnosticArgFromDisplay;
|
2022-09-18 11:47:31 -04:00
|
|
|
use rustc_macros::{Diagnostic, Subdiagnostic};
|
2022-08-18 18:08:39 +02:00
|
|
|
use rustc_span::{symbol::Ident, Span, Symbol};
|
2022-08-16 22:28:51 +02:00
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_generic_type_with_parentheses, code = "E0214")]
|
2022-08-16 22:28:51 +02:00
|
|
|
pub struct GenericTypeWithParentheses {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
|
|
|
pub span: Span,
|
|
|
|
#[subdiagnostic]
|
|
|
|
pub sub: Option<UseAngleBrackets>,
|
|
|
|
}
|
|
|
|
|
2022-10-14 13:10:49 +01:00
|
|
|
#[derive(Clone, Copy, Subdiagnostic)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[multipart_suggestion(ast_lowering_use_angle_brackets, applicability = "maybe-incorrect")]
|
2022-08-16 22:28:51 +02:00
|
|
|
pub struct UseAngleBrackets {
|
2022-10-14 13:10:49 +01:00
|
|
|
#[suggestion_part(code = "<")]
|
2022-08-16 22:28:51 +02:00
|
|
|
pub open_param: Span,
|
2022-10-14 13:10:49 +01:00
|
|
|
#[suggestion_part(code = ">")]
|
2022-08-16 22:28:51 +02:00
|
|
|
pub close_param: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_abi, code = "E0703")]
|
2022-09-08 15:37:15 +02:00
|
|
|
#[note]
|
2022-08-17 16:58:57 +02:00
|
|
|
pub struct InvalidAbi {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
|
|
|
pub span: Span,
|
|
|
|
pub abi: Symbol,
|
2022-09-08 15:37:15 +02:00
|
|
|
pub command: String,
|
|
|
|
#[subdiagnostic]
|
|
|
|
pub suggestion: Option<InvalidAbiSuggestion>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Subdiagnostic)]
|
|
|
|
#[suggestion(
|
2022-10-22 11:07:54 +02:00
|
|
|
ast_lowering_invalid_abi_suggestion,
|
2022-09-08 15:37:15 +02:00
|
|
|
code = "{suggestion}",
|
|
|
|
applicability = "maybe-incorrect"
|
|
|
|
)]
|
|
|
|
pub struct InvalidAbiSuggestion {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
pub suggestion: String,
|
2022-08-17 16:58:57 +02:00
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_assoc_ty_parentheses)]
|
2022-08-17 16:58:57 +02:00
|
|
|
pub struct AssocTyParentheses {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
#[subdiagnostic]
|
|
|
|
pub sub: AssocTyParenthesesSub,
|
|
|
|
}
|
|
|
|
|
2022-10-14 13:10:49 +01:00
|
|
|
#[derive(Clone, Copy, Subdiagnostic)]
|
2022-08-17 16:58:57 +02:00
|
|
|
pub enum AssocTyParenthesesSub {
|
2022-10-22 11:07:54 +02:00
|
|
|
#[multipart_suggestion(ast_lowering_remove_parentheses)]
|
2022-10-14 13:10:49 +01:00
|
|
|
Empty {
|
|
|
|
#[suggestion_part(code = "")]
|
|
|
|
parentheses_span: Span,
|
|
|
|
},
|
2022-10-22 11:07:54 +02:00
|
|
|
#[multipart_suggestion(ast_lowering_use_angle_brackets)]
|
2022-10-14 13:10:49 +01:00
|
|
|
NotEmpty {
|
|
|
|
#[suggestion_part(code = "<")]
|
|
|
|
open_param: Span,
|
|
|
|
#[suggestion_part(code = ">")]
|
|
|
|
close_param: Span,
|
|
|
|
},
|
2022-08-17 16:58:57 +02:00
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_misplaced_impl_trait, code = "E0562")]
|
2022-08-19 14:55:06 +02:00
|
|
|
pub struct MisplacedImplTrait<'a> {
|
2022-08-17 16:58:57 +02:00
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
2022-08-19 14:55:06 +02:00
|
|
|
pub position: DiagnosticArgFromDisplay<'a>,
|
2022-08-17 16:58:57 +02:00
|
|
|
}
|
2022-08-17 19:48:25 +02:00
|
|
|
|
2023-02-14 19:15:43 +00:00
|
|
|
#[derive(Diagnostic)]
|
|
|
|
#[diag(ast_lowering_misplaced_assoc_ty_binding)]
|
|
|
|
pub struct MisplacedAssocTyBinding<'a> {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
pub position: DiagnosticArgFromDisplay<'a>,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_underscore_expr_lhs_assign)]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct UnderscoreExprLhsAssign {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_base_expression_double_dot)]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct BaseExpressionDoubleDot {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_await_only_in_async_fn_and_blocks, code = "E0728")]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct AwaitOnlyInAsyncFnAndBlocks {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
2023-04-27 17:40:55 +00:00
|
|
|
pub await_kw_span: Span,
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_this_not_async)]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub item_span: Option<Span>,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_generator_too_many_parameters, code = "E0628")]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct GeneratorTooManyParameters {
|
|
|
|
#[primary_span]
|
|
|
|
pub fn_decl_span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_closure_cannot_be_static, code = "E0697")]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct ClosureCannotBeStatic {
|
|
|
|
#[primary_span]
|
|
|
|
pub fn_decl_span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-08-17 19:48:25 +02:00
|
|
|
#[help]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_async_non_move_closure_not_supported, code = "E0708")]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct AsyncNonMoveClosureNotSupported {
|
|
|
|
#[primary_span]
|
|
|
|
pub fn_decl_span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_functional_record_update_destructuring_assignment)]
|
2023-04-10 22:02:52 +02:00
|
|
|
pub struct FunctionalRecordUpdateDestructuringAssignment {
|
2022-08-17 19:48:25 +02:00
|
|
|
#[primary_span]
|
|
|
|
#[suggestion(code = "", applicability = "machine-applicable")]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_async_generators_not_supported, code = "E0727")]
|
2022-08-17 19:48:25 +02:00
|
|
|
pub struct AsyncGeneratorsNotSupported {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
2022-08-17 23:00:33 +02:00
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_inline_asm_unsupported_target, code = "E0472")]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InlineAsmUnsupportedTarget {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_att_syntax_only_x86)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct AttSyntaxOnlyX86 {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_abi_specified_multiple_times)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct AbiSpecifiedMultipleTimes {
|
|
|
|
#[primary_span]
|
|
|
|
pub abi_span: Span,
|
|
|
|
pub prev_name: Symbol,
|
|
|
|
#[label]
|
|
|
|
pub prev_span: Span,
|
|
|
|
#[note]
|
|
|
|
pub equivalent: Option<()>,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_clobber_abi_not_supported)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct ClobberAbiNotSupported {
|
|
|
|
#[primary_span]
|
|
|
|
pub abi_span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-17 23:00:33 +02:00
|
|
|
#[note]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_abi_clobber_abi)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InvalidAbiClobberAbi {
|
|
|
|
#[primary_span]
|
|
|
|
pub abi_span: Span,
|
|
|
|
pub supported_abis: String,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_register)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InvalidRegister<'a> {
|
|
|
|
#[primary_span]
|
|
|
|
pub op_span: Span,
|
2022-08-19 14:55:06 +02:00
|
|
|
pub reg: Symbol,
|
|
|
|
pub error: &'a str,
|
2022-08-17 23:00:33 +02:00
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_register_class)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InvalidRegisterClass<'a> {
|
|
|
|
#[primary_span]
|
|
|
|
pub op_span: Span,
|
2022-08-19 14:55:06 +02:00
|
|
|
pub reg_class: Symbol,
|
|
|
|
pub error: &'a str,
|
2022-08-17 23:00:33 +02:00
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_asm_template_modifier_reg_class)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InvalidAsmTemplateModifierRegClass {
|
|
|
|
#[primary_span]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_template_modifier)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub placeholder_span: Span,
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_argument)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub op_span: Span,
|
|
|
|
#[subdiagnostic]
|
|
|
|
pub sub: InvalidAsmTemplateModifierRegClassSub,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:47:31 -04:00
|
|
|
#[derive(Subdiagnostic)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub enum InvalidAsmTemplateModifierRegClassSub {
|
2022-10-22 11:07:54 +02:00
|
|
|
#[note(ast_lowering_support_modifiers)]
|
2022-08-17 23:00:33 +02:00
|
|
|
SupportModifier { class_name: Symbol, modifiers: String },
|
2022-10-22 11:07:54 +02:00
|
|
|
#[note(ast_lowering_does_not_support_modifiers)]
|
2022-08-17 23:00:33 +02:00
|
|
|
DoesNotSupportModifier { class_name: Symbol },
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_asm_template_modifier_const)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InvalidAsmTemplateModifierConst {
|
|
|
|
#[primary_span]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_template_modifier)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub placeholder_span: Span,
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_argument)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub op_span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_invalid_asm_template_modifier_sym)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct InvalidAsmTemplateModifierSym {
|
|
|
|
#[primary_span]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_template_modifier)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub placeholder_span: Span,
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_argument)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub op_span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_register_class_only_clobber)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct RegisterClassOnlyClobber {
|
|
|
|
#[primary_span]
|
|
|
|
pub op_span: Span,
|
|
|
|
pub reg_class_name: Symbol,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_register_conflict)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub struct RegisterConflict<'a> {
|
|
|
|
#[primary_span]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_register1)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub op_span1: Span,
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_register2)]
|
2022-08-17 23:00:33 +02:00
|
|
|
pub op_span2: Span,
|
|
|
|
pub reg1_name: &'a str,
|
|
|
|
pub reg2_name: &'a str,
|
|
|
|
#[help]
|
|
|
|
pub in_out: Option<Span>,
|
|
|
|
}
|
2022-08-18 18:08:39 +02:00
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-08-18 18:08:39 +02:00
|
|
|
#[help]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_sub_tuple_binding)]
|
2022-08-18 18:08:39 +02:00
|
|
|
pub struct SubTupleBinding<'a> {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
2022-10-22 15:48:55 +02:00
|
|
|
#[suggestion(
|
2022-10-22 11:07:54 +02:00
|
|
|
ast_lowering_sub_tuple_binding_suggestion,
|
2022-10-22 15:48:55 +02:00
|
|
|
style = "verbose",
|
2022-08-18 18:08:39 +02:00
|
|
|
code = "..",
|
|
|
|
applicability = "maybe-incorrect"
|
|
|
|
)]
|
|
|
|
pub span: Span,
|
|
|
|
pub ident: Ident,
|
|
|
|
pub ident_name: Symbol,
|
|
|
|
pub ctx: &'a str,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_extra_double_dot)]
|
2022-08-18 18:08:39 +02:00
|
|
|
pub struct ExtraDoubleDot<'a> {
|
|
|
|
#[primary_span]
|
|
|
|
#[label]
|
|
|
|
pub span: Span,
|
2022-10-22 11:07:54 +02:00
|
|
|
#[label(ast_lowering_previously_used_here)]
|
2022-08-18 18:08:39 +02:00
|
|
|
pub prev_span: Span,
|
|
|
|
pub ctx: &'a str,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-08-18 18:08:39 +02:00
|
|
|
#[note]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_misplaced_double_dot)]
|
2022-08-18 18:08:39 +02:00
|
|
|
pub struct MisplacedDoubleDot {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
2022-08-18 19:30:56 +02:00
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_misplaced_relax_trait_bound)]
|
2022-08-18 19:30:56 +02:00
|
|
|
pub struct MisplacedRelaxTraitBound {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_not_supported_for_lifetime_binder_async_closure)]
|
2022-08-18 19:30:56 +02:00
|
|
|
pub struct NotSupportedForLifetimeBinderAsyncClosure {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_arbitrary_expression_in_pattern)]
|
2022-08-18 19:30:56 +02:00
|
|
|
pub struct ArbitraryExpressionInPattern {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
2022-08-26 18:03:41 +02:00
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_inclusive_range_with_no_end)]
|
2022-08-26 18:03:41 +02:00
|
|
|
pub struct InclusiveRangeWithNoEnd {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
2022-09-02 15:57:31 +00:00
|
|
|
|
2022-09-15 00:01:44 -04:00
|
|
|
#[derive(Diagnostic, Clone, Copy)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(ast_lowering_trait_fn_async, code = "E0706")]
|
2022-09-02 15:57:31 +00:00
|
|
|
#[note]
|
2022-10-13 10:13:02 +01:00
|
|
|
#[note(ast_lowering_note2)]
|
2022-09-02 15:57:31 +00:00
|
|
|
pub struct TraitFnAsync {
|
|
|
|
#[primary_span]
|
|
|
|
pub fn_span: Span,
|
|
|
|
#[label]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
2023-03-11 04:10:09 +00:00
|
|
|
|
|
|
|
#[derive(Diagnostic)]
|
|
|
|
pub enum BadReturnTypeNotation {
|
|
|
|
#[diag(ast_lowering_bad_return_type_notation_inputs)]
|
|
|
|
Inputs {
|
|
|
|
#[primary_span]
|
2023-04-10 22:16:17 +00:00
|
|
|
#[suggestion(code = "()", applicability = "maybe-incorrect")]
|
2023-03-11 04:10:09 +00:00
|
|
|
span: Span,
|
|
|
|
},
|
|
|
|
#[diag(ast_lowering_bad_return_type_notation_output)]
|
|
|
|
Output {
|
|
|
|
#[primary_span]
|
|
|
|
#[suggestion(code = "", applicability = "maybe-incorrect")]
|
|
|
|
span: Span,
|
|
|
|
},
|
|
|
|
}
|