miette
miette copied to clipboard
Error codes: Automatically add error code to doc
If an error or variant has an error code, we should add a #[doc = "_Error code_: `{code}`]
to them automatically so they show up in the documentation.
I am not sure if that is possible, since derive macros cannot really modify the definition of the type they derive for, they can only add extra implementations of traits (like Diagnostic
in miette's case). Would adding an attribute macro be an option? I'm not sure it really is.