about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/errors
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-04-20 11:39:43 -0400
committerMichael Goulet <michael@errs.io>2024-04-20 11:39:43 -0400
commit57085a06d9279173aac3d45a1a56c728047f45a3 (patch)
tree8fafc7609e960ca2b62dcb1c678790e8ec45afa7 /compiler/rustc_hir_analysis/src/errors
parentfa0428c9d0f336cf51748621543679736f04cce6 (diff)
downloadrust-57085a06d9279173aac3d45a1a56c728047f45a3.tar.gz
rust-57085a06d9279173aac3d45a1a56c728047f45a3.zip
Explicitly mention `Self`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors')
-rw-r--r--compiler/rustc_hir_analysis/src/errors/precise_captures.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors/precise_captures.rs b/compiler/rustc_hir_analysis/src/errors/precise_captures.rs
index d1b2205dd9a..8a9b5fe6369 100644
--- a/compiler/rustc_hir_analysis/src/errors/precise_captures.rs
+++ b/compiler/rustc_hir_analysis/src/errors/precise_captures.rs
@@ -13,6 +13,16 @@ pub struct ParamNotCaptured {
 }
 
 #[derive(Diagnostic)]
+#[diag(hir_analysis_self_ty_not_captured)]
+#[note]
+pub struct SelfTyNotCaptured {
+    #[primary_span]
+    pub opaque_span: Span,
+    #[label]
+    pub trait_span: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(hir_analysis_lifetime_not_captured)]
 pub struct LifetimeNotCaptured {
     #[primary_span]