Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error codes: Automatically add error code to doc #310

Open
zkat opened this issue Oct 24, 2023 · 1 comment
Open

Error codes: Automatically add error code to doc #310

zkat opened this issue Oct 24, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zkat
Copy link
Owner

zkat commented Oct 24, 2023

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 zkat added enhancement New feature or request good first issue Good for newcomers labels Oct 24, 2023
@jdonszelmann
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants