File tree 3 files changed +16
-2
lines changed 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,6 @@ unstable = []
13
13
14
14
[dev-dependencies ]
15
15
futures = " 0.1.17"
16
+
17
+ [build-dependencies ]
18
+ version_check = " 0.9"
Original file line number Diff line number Diff line change
1
+ extern crate version_check;
2
+
3
+ fn main ( ) {
4
+ println ! ( "cargo:rerun-if-changed=build.rs" ) ;
5
+ match version_check:: Channel :: read ( ) {
6
+ Some ( c) if c. is_nightly ( ) => println ! ( "cargo:rustc-cfg=nightly" ) ,
7
+ _ => ( ) ,
8
+ }
9
+ }
Original file line number Diff line number Diff line change 74
74
//! [`block!`], [`try_nb!`] and [`await!`] macros to adapt it for blocking
75
75
//! operation, or for non-blocking operation with `futures` or `await`.
76
76
//!
77
- //! **NOTE** Currently, both `try_nb!` and `await!` are feature gated behind the `unstable` Cargo
77
+ //! **NOTE**: Currently, both `try_nb!` and `await!` are feature gated behind the `unstable` Cargo
78
78
//! feature.
79
79
//!
80
+ //! **NOTE2**: The `await!` macro is only available when compiling on nightly Rust.
81
+ //!
80
82
//! [`block!`]: macro.block.html
81
83
//! [`try_nb!`]: macro.try_nb.html
82
84
//! [`await!`]: macro.await.html
@@ -429,7 +431,7 @@ impl<E> From<E> for Error<E> {
429
431
///
430
432
/// - `Ok(t)` if `$e` evaluates to `Ok(t)`
431
433
/// - `Err(e)` if `$e` evaluates to `Err(nb::Error::Other(e))`
432
- #[ cfg( feature = "unstable" ) ]
434
+ #[ cfg( nightly ) ]
433
435
#[ macro_export]
434
436
macro_rules! await {
435
437
( $e: expr) => {
You can’t perform that action at this time.
0 commit comments