Skip to content
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

probe_rustc_version can lead to build failures on old nightly rustc #74

Open
RalfJung opened this issue Oct 4, 2024 · 0 comments
Open

Comments

@RalfJung
Copy link

RalfJung commented Oct 4, 2024

One (I think common) way of using probe_rustc_version is to determine whether a given feature is stable and can be used by the crate. However, as this comment shows, there's a subtle pitfall here: even if we are on version 1.79, that might be an old nightly from the 1.79 cycle which does not yet have the feature!

Would it make sense to have probe_rustc_version ensure that the compiler is at least as new as the given stable release? Basically, this would mean that probe_rustc_version(1, 79) should check

  • If we are on beta or stable, require version 1.79
  • If we are on nightly, require version 1.80 to be sure that all features from 1.79 are included
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

1 participant