Skip to content

derivative crate: proc macro derivative not expanded #12607

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
cyqsimon opened this issue Jun 21, 2022 · 1 comment
Closed

derivative crate: proc macro derivative not expanded #12607

cyqsimon opened this issue Jun 21, 2022 · 1 comment

Comments

@cyqsimon
Copy link

cyqsimon commented Jun 21, 2022

use derivative::Derivative;
#[derive(Derivative)]
#[derivative(Debug)]
struct Foo {}

error

cargo check and cargo build both pass.

rust-analyzer version: 427061d 2022-06-19

rustc version: I tested both rustc 1.61.0 (fe5b13d68 2022-05-18) & rustc 1.63.0-nightly (5750a6aa2 2022-06-20)


Possibly-related issue: #12582

@flodiebold
Copy link
Member

Fixed by #12599, I think:

#[cfg_attr(not(test), proc_macro_derive(Derivative, attributes(derivative)))]
pub fn derivative(input: TokenStream) -> TokenStream {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants