From dea7025259dad511bf285b4ae8742463225d9ba3 Mon Sep 17 00:00:00 2001 From: Anders Musikka Date: Mon, 19 Aug 2024 15:21:58 +0200 Subject: [PATCH] Add more helpful error-message --- savefile/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/savefile/src/lib.rs b/savefile/src/lib.rs index 5799960..f846dc2 100644 --- a/savefile/src/lib.rs +++ b/savefile/src/lib.rs @@ -2450,6 +2450,7 @@ pub const MAX_CHILDREN: usize = 10000; #[cfg_attr(feature = "rust1_78", diagnostic::on_unimplemented( message = "`{Self}` cannot be introspected by Savefile, since it doesn't implement trait `savefile::Introspect`", label = "This cannot be introspected", + note = "If you get this message after having used the #[savefile_ignore] attribute on a field, consider adding #[savefile_introspect_ignore]." note = "You can implement it by adding `#[derive(Savefile)]` or `#[derive(SavefileIntrospectOnly)]` before the declaration of `{Self}`", note = "Or you can manually implement the `savefile::Introspect` trait." ))]