dtolnay / rustversion

Conditional compilation according to rustc compiler version
Apache License 2.0
334 stars 15 forks source link

Nightlies without versions #9

Closed valpackett closed 4 years ago

valpackett commented 4 years ago

Unofficial "nightly" builds of Rust (such as those from OS packages) are not guaranteed to have a date (I suspect that happens when they're not built in a git checkout):

% ~/.local/share/cargo/bin/rustc --version
rustc 1.42.0-nightly (a9c1c04e9 2019-12-24)
% /usr/local/bin/rustc --version
rustc 1.42.0-nightly

but the current type is not capable of representing that and I don't see a way to do it without breaking API :(

Maybe it should just be Dev

dtolnay commented 4 years ago

Those are effectively dev builds.

BTW this crate does not expose any public types so there is no backward compatibility consideration about the representation.

valpackett commented 4 years ago

Thanks!