about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/errors.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-01-26 17:33:42 +0000
committerMichael Goulet <michael@errs.io>2024-01-31 16:59:19 +0000
commit3913c9a0cacf4bacb4ca1c6255271d54ec995f02 (patch)
treee86c1e10d0db17e1ca359b3e4a7887eb04562394 /compiler/rustc_ast_lowering/src/errors.rs
parent54db272cc972f232cc50a7c6dff30140f904738a (diff)
downloadrust-3913c9a0cacf4bacb4ca1c6255271d54ec995f02.tar.gz
rust-3913c9a0cacf4bacb4ca1c6255271d54ec995f02.zip
Error on incorrect item kind in async bound
Diffstat (limited to 'compiler/rustc_ast_lowering/src/errors.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/errors.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/errors.rs b/compiler/rustc_ast_lowering/src/errors.rs
index 51bb8a96fad..7658dfa5d5f 100644
--- a/compiler/rustc_ast_lowering/src/errors.rs
+++ b/compiler/rustc_ast_lowering/src/errors.rs
@@ -395,3 +395,18 @@ pub(crate) struct GenericParamDefaultInBinder {
     #[primary_span]
     pub span: Span,
 }
+
+#[derive(Diagnostic)]
+#[diag(ast_lowering_async_bound_not_on_trait)]
+pub(crate) struct AsyncBoundNotOnTrait {
+    #[primary_span]
+    pub span: Span,
+    pub descr: &'static str,
+}
+
+#[derive(Diagnostic)]
+#[diag(ast_lowering_async_bound_only_for_fn_traits)]
+pub(crate) struct AsyncBoundOnlyForFnTraits {
+    #[primary_span]
+    pub span: Span,
+}