-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Make proc_macro_span
optional with nightly
#415
Comments
I suspect this is a Cargo bug. Cargo is not propagating that I tested this by creating a 2-line .cargo/config.toml as you showed, and a build script containing: // build.rs
fn main() {
std::process::Command::new("env").status().unwrap();
std::process::exit(1);
} The output of |
Indeed, it looks like the flag is not passed when using
I am not very sure if I should open an issue in cargo though, as it might be expected based on this 🤷♀️ rust-lang/cargo#12437 (comment). Out of curiosity, what is the reasoning for always enabling |
From the documentation of
proc_macro_span
I was understanding that if you don't allow unstable features in your nightly build, then the build of the crate should still work:"Enabled when building with nightly, unless
-Z allow-feature
in RUSTFLAGS disallows unstable features."I am using the following configuration in my
.cargo/config.toml
:And the following rust nightly:
nightly-2023-09-25
.When building a dummy crate that just has proc-macro2 as a dependency, the following happens:
The
--cfg proc_macro_span
was added even though we also pass the-Zallow-features=
flag. Is this the expected behavior?I would like to be able to build proc-macro2 with nightly without having to enable the unstable feature. Is this possible?
The text was updated successfully, but these errors were encountered: