about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-29 15:29:27 +0100
committerGitHub <noreply@github.com>2025-01-29 15:29:27 +0100
commitf8d103df43deaa0fbe4c1916186c4c8c275ce636 (patch)
tree39861f1451489d772182457a1e9d44aedbc2a5f5 /compiler/rustc_trait_selection/src/errors.rs
parent61cc3e51f8bf5c12595a4d61a5ee9de812974b43 (diff)
parent4203627cedc5a6b5a7b7605888b5c33876e2b0e2 (diff)
downloadrust-f8d103df43deaa0fbe4c1916186c4c8c275ce636.tar.gz
rust-f8d103df43deaa0fbe4c1916186c4c8c275ce636.zip
Rollup merge of #133382 - mu001999-contrib:diag/fnitem, r=lcnr
Suggest considering casting fn item as fn pointer in more cases

Fixes #132648
Diffstat (limited to 'compiler/rustc_trait_selection/src/errors.rs')
-rw-r--r--compiler/rustc_trait_selection/src/errors.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/errors.rs b/compiler/rustc_trait_selection/src/errors.rs
index 2dfa72972ba..c8672b9dbd2 100644
--- a/compiler/rustc_trait_selection/src/errors.rs
+++ b/compiler/rustc_trait_selection/src/errors.rs
@@ -1497,6 +1497,12 @@ pub struct FnConsiderCasting {
 }
 
 #[derive(Subdiagnostic)]
+#[help(trait_selection_fn_consider_casting_both)]
+pub struct FnConsiderCastingBoth<'a> {
+    pub sig: Binder<'a, FnSig<'a>>,
+}
+
+#[derive(Subdiagnostic)]
 pub enum SuggestAccessingField<'a> {
     #[suggestion(
         trait_selection_suggest_accessing_field,