File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change
1
+ use std:: env;
2
+ use std:: ffi:: OsString ;
3
+ use std:: process:: Command ;
4
+
5
+ fn main ( ) {
6
+ println ! ( "cargo:rerun-if-changed=build.rs" ) ;
7
+
8
+ let rustc = env:: var_os ( "RUSTC" ) . unwrap_or_else ( || OsString :: from ( "rustc" ) ) ;
9
+
10
+ let output = Command :: new ( rustc)
11
+ . arg ( "--version" )
12
+ . output ( )
13
+ . expect ( "failed to run `rustc --version`" ) ;
14
+
15
+ if String :: from_utf8_lossy ( & output. stdout ) . contains ( "nightly" ) {
16
+ println ! ( "cargo:rustc-cfg=nightly" ) ;
17
+ }
18
+ }
Original file line number Diff line number Diff line change 1
1
//! # embedded-nal-async - An async Network Abstraction Layer for Embedded Systems
2
2
3
3
#![ no_std]
4
- #![ feature( async_fn_in_trait, impl_trait_projections) ]
5
- #![ allow( stable_features, unknown_lints, async_fn_in_trait) ]
4
+ #![ cfg_attr( nightly, allow( stable_features, unknown_lints) ) ]
5
+ #![ cfg_attr( nightly, feature( async_fn_in_trait, impl_trait_projections) ) ]
6
+ #![ allow( async_fn_in_trait) ]
6
7
#![ deny( missing_docs) ]
7
8
#![ deny( unsafe_code) ]
8
9
#![ cfg_attr( feature = "ip_in_core" , feature( ip_in_core) ) ]
You can’t perform that action at this time.
0 commit comments