Add missing diagnostics and flesh out tests

This commit is contained in:
Michael Goulet
2024-08-26 16:31:06 -04:00
parent 7c8e281f73
commit 174c3f9519
25 changed files with 508 additions and 19 deletions

View File

@@ -494,9 +494,14 @@ enum AllowReturnTypeNotation {
}
enum GenericArgsMode {
/// Allow paren sugar, don't allow RTN.
ParenSugar,
/// Allow RTN, don't allow paren sugar.
ReturnTypeNotation,
// Error if parenthesized generics or RTN are encountered.
Err,
/// Silence errors when lowering generics. Only used with `Res::Err`.
Silence,
}
impl<'a, 'hir> LoweringContext<'a, 'hir> {