fucking fuk

master
Avril 4 years ago
parent c7ac74c651
commit a01e3377a5
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -24,5 +24,8 @@ memmap = "0.7"
getrandom = "0.1"
base64 = "0.12"
[target.'cfg(not(nightly))'.dependencies]
[build-dependencies]
rustc_version = "0.2"
[target.'cfg(not(nightly))'.dependencies] # Fuck this. Just. Fuck. It.
linked-list = "0.0"

@ -0,0 +1,24 @@
extern crate rustc_version;
use rustc_version::{version, version_meta, Channel};
fn main() {
// Assert we haven't travelled back in time
assert!(version().unwrap().major >= 1);
// Set cfg flags depending on release channel
match version_meta().unwrap().channel {
Channel::Stable => {
println!("cargo:rustc-cfg=stable");
}
Channel::Beta => {
println!("cargo:rustc-cfg=beta");
}
Channel::Nightly => {
println!("cargo:rustc-cfg=nightly");
}
Channel::Dev => {
println!("cargo:rustc-cfg=dev");
}
}
}
Loading…
Cancel
Save