-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Incorrect detection of proc-macro crate type #140929
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
Comments
Can you show exactly what command you ran? If it is |
@ehuss thanks for the reply, your comment made me realize what is going on more precisely. So this is in a cargo workspace. After adding the
and also
works. What caused the issue is that our CI build is running
and that fails with the provided error. I still feel like this is a bug (or at least a very strange behavior), as I would not expect disabling the test harness to lead to an error saying the proc-macro crate is not a proc-macro crate. |
Ah. The issue is that I'm not sure what your goal is with setting I filed rust-lang/cargo#15519 for providing a better error message. |
Thanks! |
I have a
proc-macro
crate implementing a deriver logic with#[proc_macro_derive]
that compiles correctly.If I add a
harness = false
line to the[lib]
section though like this:then the compilation fails with:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: