Rollup merge of #140671 - xizheyin:issue-140169, r=petrochenkov
Parser: Recover error from named params while parse_path Fixes #140169 I added test to the first commit and the second added the code and changes to test. r? `@petrochenkov`
This commit is contained in:
@@ -1646,6 +1646,30 @@ pub(crate) struct ExpectedFnPathFoundFnKeyword {
|
||||
pub fn_token_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_path_found_named_params)]
|
||||
pub(crate) struct FnPathFoundNamedParams {
|
||||
#[primary_span]
|
||||
#[suggestion(applicability = "machine-applicable", code = "")]
|
||||
pub named_param_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_path_found_c_variadic_params)]
|
||||
pub(crate) struct PathFoundCVariadicParams {
|
||||
#[primary_span]
|
||||
#[suggestion(applicability = "machine-applicable", code = "")]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_path_found_attribute_in_params)]
|
||||
pub(crate) struct PathFoundAttributeInParams {
|
||||
#[primary_span]
|
||||
#[suggestion(applicability = "machine-applicable", code = "")]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_path_double_colon)]
|
||||
pub(crate) struct PathSingleColon {
|
||||
|
||||
Reference in New Issue
Block a user