mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-21 13:05:45 +00:00
* Fix nightly no_std * Fix nightly no_std
This commit is contained in:
12
rust/flatbuffers/build.rs
Normal file
12
rust/flatbuffers/build.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use rustc_version::{version_meta, Channel};
|
||||
|
||||
fn main() {
|
||||
let version_meta = version_meta().unwrap();
|
||||
|
||||
// To use nightly features we declare this and then we can use
|
||||
// #[cfg(nightly)]
|
||||
// for nightly only features
|
||||
if version_meta.channel == Channel::Nightly {
|
||||
println!("cargo:rustc-cfg=nightly")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user