Emit an error when RTN is used with ty/ct params
This commit is contained in:
parent
408bbd0406
commit
bbc536d3ac
5 changed files with 97 additions and 3 deletions
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue