From a267515a60c2791f9df9fd14c75518f0fae95d3e Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:41:09 +0800 Subject: [PATCH] add a more complete description of the error (#303) --- crates/codecs/derive/src/compact/structs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/codecs/derive/src/compact/structs.rs b/crates/codecs/derive/src/compact/structs.rs index 978eb858a..aee19937e 100644 --- a/crates/codecs/derive/src/compact/structs.rs +++ b/crates/codecs/derive/src/compact/structs.rs @@ -108,7 +108,8 @@ impl<'a> StructHandler<'a> { known_types.contains(&ftype.as_str()) || is_flag_type(ftype) || self.fields_iterator.peek().is_none(), - "{ftype} field should be placed as the last one since it's not known. " + "`{ftype}` field should be placed as the last one since it's not known. + If it's an alias type (which are not supported by proc_macro), be sure to add it to either `known_types` or `get_bit_size` lists in the derive crate." ); if ftype == "bytes::Bytes" {