miette icon indicating copy to clipboard operation
miette copied to clipboard

Error codes: Automatically add error code to doc

Open zkat opened this issue 1 year ago • 1 comments

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.

zkat avatar Oct 24 '23 21:10 zkat

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.

jdonszelmann avatar Nov 09 '23 15:11 jdonszelmann