1
Fork 0

Add tests and error messages

This commit is contained in:
Michael Goulet 2023-03-11 04:10:09 +00:00
parent 0308d4ad18
commit 104aacb49f
17 changed files with 339 additions and 14 deletions

View file

@ -347,3 +347,19 @@ pub struct TraitFnAsync {
#[label]
pub span: Span,
}
#[derive(Diagnostic)]
pub enum BadReturnTypeNotation {
#[diag(ast_lowering_bad_return_type_notation_inputs)]
Inputs {
#[primary_span]
#[suggestion(code = "()", applicability = "maybe-incorrect")]
span: Span,
},
#[diag(ast_lowering_bad_return_type_notation_output)]
Output {
#[primary_span]
#[suggestion(code = "", applicability = "maybe-incorrect")]
span: Span,
},
}