Auto merge of #117297 - clubby789:fn-trait-missing-paren, r=TaKO8Ki
Give a better diagnostic for missing parens in Fn* bounds Fixes #108109 It would be nice to try and recover here, but I'm not sure it's worth the effort, especially as the bounds on the recovered function would be incorrect.
This commit is contained in:
commit
187d1afa9d
7 changed files with 73 additions and 0 deletions
|
@ -270,6 +270,9 @@ parse_fn_ptr_with_generics = function pointer types may not have generic paramet
|
|||
*[false] a
|
||||
} `for` parameter list
|
||||
|
||||
parse_fn_trait_missing_paren = `Fn` bounds require arguments in parentheses
|
||||
.add_paren = add the missing parentheses
|
||||
|
||||
parse_forgot_paren = perhaps you forgot parentheses?
|
||||
|
||||
parse_found_expr_would_be_stmt = expected expression, found `{$token}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue