Files
ws_stream_wasm/build.rs
Naja Melan 233ff28192 fix doc configuration
Before this, having rustdoc pass --cfg docs meant that cargo test breaks on stable.
2020-03-17 23:00:28 +01:00

17 lines
440 B
Rust

// Detect the rustc channel
//
use rustc_version::{ version_meta, Channel };
fn main()
{
// 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=rustc_dev" ),
}
}