-
Notifications
You must be signed in to change notification settings - Fork 89
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
proc_macro should be in the prelude #113
Comments
The change is now in 1.42.0: https://blog.rust-lang.org/2020/03/12/Rust-1.42.html#use-proc_macro:tokenstream;-now-works |
A failing minimal example would be appreciated. |
|
rust-lang/cargo@4d64eb99a4#diff-7f98585dbf9d30aa100c8318e2c77e79R1021-R1022 This should probably be handled in nixpkgs which I'll prepare a PR for. |
My main concern, why I actually commented, was why a language feature is actually implemented in |
Technically In fact, cargo still doesn’t do the same if instead of OTOH I do sympathize with your concern as pretty much all rust code assumes cargo. |
I have a prototype for this: andir/nixpkgs@898fb00 It can only go into nixpkgs once 1.42 has landed in master. It is currently going through the staging cycle so that will only be a day or two more. |
So, adding
Rustc is 1.42.0 in this case. |
@andir you need |
As of rust-lang/cargo#7700
--extern proc_macro
is getting added to the prelude of therustc
invocationscargo
makes when buildingproc_macro
crates.As
crate2nix
/buildRustCrate
(not sure where exactly this would go, filling this issue out without investigating too much) does not add this flag, there’s some discrepancy between how rustc behaves when invoked by cargo and by crate2nix. In particularcargo
does not requireextern crate proc_macro
anymore to useproc_macro
inproc_macro
crates, so eventually things will start failing to compile when this gets to stable and crates stop including theextern crate
.The text was updated successfully, but these errors were encountered: