about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/errors.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-01-18 17:20:39 +0000
committerMichael Goulet <michael@errs.io>2024-02-05 21:08:47 +0000
commite65abc0ea58f2f7dd6812fafa92c4f5b2a28af7b (patch)
tree2d5db82981a9de4bfb4e6f3945b0b25d3c69ce97 /compiler/rustc_hir_analysis/src/errors.rs
parent16cbdd0321f342093b71026dc1c5126606e4abe9 (diff)
downloadrust-e65abc0ea58f2f7dd6812fafa92c4f5b2a28af7b.tar.gz
rust-e65abc0ea58f2f7dd6812fafa92c4f5b2a28af7b.zip
Make the error message better
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/errors.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs
index 8b8c0f7ff8d..bec53693d6c 100644
--- a/compiler/rustc_hir_analysis/src/errors.rs
+++ b/compiler/rustc_hir_analysis/src/errors.rs
@@ -1502,6 +1502,16 @@ pub struct NotSupportedDelegation<'a> {
 }
 
 #[derive(Diagnostic)]
+#[diag(hir_analysis_method_should_return_future)]
+pub struct MethodShouldReturnFuture {
+    #[primary_span]
+    pub span: Span,
+    pub method_name: Symbol,
+    #[note]
+    pub trait_item_span: Option<Span>,
+}
+
+#[derive(Diagnostic)]
 #[diag(hir_analysis_unused_generic_parameter)]
 pub(crate) struct UnusedGenericParameter {
     #[primary_span]