diff options
| author | Michael Goulet <michael@errs.io> | 2023-05-01 05:15:45 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-06-05 19:52:04 +0000 |
| commit | bbc536d3ac83ad0e3600af2d04701faed63ecd79 (patch) | |
| tree | a9d22ca7605bed4e4955d7f0e94faccbc1a00ee6 /compiler/rustc_hir_analysis/src/errors.rs | |
| parent | 408bbd040613f6776e0a7d05d582c81f4ddc189a (diff) | |
| download | rust-bbc536d3ac83ad0e3600af2d04701faed63ecd79.tar.gz rust-bbc536d3ac83ad0e3600af2d04701faed63ecd79.zip | |
Emit an error when RTN is used with ty/ct params
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/errors.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index 6e7eb4f6cdc..7dce1272f96 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -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, + }, +} |
