-
Notifications
You must be signed in to change notification settings - Fork 41
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
Nightly detection does not take into account whether features can actually be used #126
Comments
Thanks very much. I'll update my code to use when it land. |
Honestly, I'd recommend instead using something like @cuviper's |
You can now parse |
I choose to implement |
Currently, the build script just checks whether the user is using nightly, but that doesn't work when the user's configuration, other flags, or the rustc wrapper, prevent the use of the relevant features:
produces
The
proc-macro2
crate specifically tries to handle this by parsingRUSTFLAGS
if set, though that currently also runs into issues (dtolnay/proc-macro2#290). Theanyhow
crate uses a "compile probe", which is very robust, but currently suffers from lack of information from Cargo (dtolnay/anyhow#156). But once rust-lang/cargo#9601 lands, we'll have access to the necessary configuration information to check for feature support using either of those two approaches.I filed this here (in addition to
proc-macro2
) because onceproc-macro2
is fixed, cookie will start breaking with the same reproduction steps due to thisbuild.rs
:rstest/build.rs
Lines 7 to 9 in 3e6648a
You can see that by changing the instructions above to
-Zallow-features=proc_macro_span
:See also rwf2/cookie-rs#177.
The text was updated successfully, but these errors were encountered: