1
Fork 0

Emit an error when RTN is used with ty/ct params

This commit is contained in:
Michael Goulet 2023-05-01 05:15:45 +00:00
parent 408bbd0406
commit bbc536d3ac
5 changed files with 97 additions and 3 deletions

View file

@ -857,3 +857,21 @@ pub(crate) enum DropImplPolarity {
span: Span,
},
}
#[derive(Diagnostic)]
pub(crate) enum ReturnTypeNotationIllegalParam {
#[diag(hir_analysis_return_type_notation_illegal_param_type)]
Type {
#[primary_span]
span: Span,
#[label]
param_span: Span,
},
#[diag(hir_analysis_return_type_notation_illegal_param_const)]
Const {
#[primary_span]
span: Span,
#[label]
param_span: Span,
},
}