Switch to version_check ()

version_check has fewer dependencies, and is already used by proc-macro-error and Rocket.
This commit is contained in:
Chris Wong 2020-09-28 22:03:06 +10:00 committed by GitHub
parent 250d93df9a
commit 64390ec0ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -26,7 +26,7 @@ futures = { version = "0.3.0", optional = true }
actix-web-dep = { version = "2.0.0", optional = true, default-features = false, package = "actix-web" }
[build-dependencies]
rustc_version = "0.2.3"
version_check = "0.9.2"
[dev-dependencies]
trybuild = { version = "1.0.33", features = ["diff"] }

View file

@ -1,8 +1,5 @@
use rustc_version::{version_meta, Channel};
fn main() {
match version_meta().map(|v| v.channel).unwrap_or(Channel::Stable) {
Channel::Dev | Channel::Nightly => println!("cargo:rustc-cfg=unstable"),
Channel::Beta | Channel::Stable => {}
if version_check::is_feature_flaggable() == Some(true) {
println!("cargo:rustc-cfg=unstable");
}
}