For struct like
The derive macro EncodeLabelSet emits
error: proc-macro derive panicked
--> tests/build/friendly-compilation-error-msg.rs:7:49
|
7 | #[derive(Debug, Clone, PartialEq, Eq, Hash, EncodeLabelSet)]
| ^^^^^^^^^^^^^^
|
= help: message: Can not derive Encode for struct with unnamed fields.
I think proc-macro derive panicked is a little bit confuse, and the end developer needs to continue reading down the error message to find the cause.
An usual practice is emit compile_error!, which show the causes more directly.
For struct like
The derive macro
EncodeLabelSetemitsI think
proc-macro derive panickedis a little bit confuse, and the end developer needs to continue reading down the error message to find the cause.An usual practice is emit
compile_error!, which show the causes more directly.