Skip to content

Custom derives and procedural attribute macros don't show errors #9132

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

Closed
jonas-schievink opened this issue Jun 3, 2021 · 1 comment
Closed
Labels
A-diagnostics diagnostics / error reporting A-macro macro expansion

Comments

@jonas-schievink
Copy link
Contributor

jonas-schievink commented Jun 3, 2021

When we expand custom #[derive]s and attribute macros, we seem to ignore their errors.

Interestingly, if you do this:

serde::Deserialize!(struct S {
    #[serde(asd)]
    fld: u8,
});

...then the error shows up only if the invocation is inside a function body, not when it's in item position. (of course, the fact that you can call a custom derive like that is itself a bug)

@jonas-schievink jonas-schievink added A-macro macro expansion A-diagnostics diagnostics / error reporting labels Jun 3, 2021
@jonas-schievink
Copy link
Contributor Author

Fixed by #10339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting A-macro macro expansion
Projects
None yet
Development

No branches or pull requests

1 participant