Skip to content

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

@RalfJung

Description

@RalfJung

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions