1 extern crate autocfg; 2 3 use std::env; 4 main()5fn main() { 6 let ac = autocfg::new(); 7 8 // If the "i128" feature is explicity requested, don't bother probing for it. 9 // It will still cause a build error if that was set improperly. 10 if env::var_os("CARGO_FEATURE_I128").is_some() || ac.probe_type("i128") { 11 autocfg::emit("has_i128"); 12 } 13 14 ac.emit_expression_cfg( 15 "unsafe { 1f64.to_int_unchecked::<i32>() }", 16 "has_to_int_unchecked", 17 ); 18 19 autocfg::rerun_path("build.rs"); 20 } 21