|
14 | 14 | //! to use this crate will be trivially able to switch to the upstream |
15 | 15 | //! `proc_macro` crate once its API stabilizes. |
16 | 16 | //! |
17 | | -//! In the meantime this crate also has an `unstable` Cargo feature which |
| 17 | +//! In the meantime this crate also has a `nightly` Cargo feature which |
18 | 18 | //! enables it to reimplement itself with the unstable API of `proc_macro`. |
19 | 19 | //! This'll allow immediate usage of the beneficial upstream API, particularly |
20 | 20 | //! around preserving span information. |
21 | 21 |
|
22 | | -#![cfg_attr(feature = "unstable", feature(proc_macro))] |
| 22 | +#![cfg_attr(feature = "nightly", feature(proc_macro))] |
23 | 23 |
|
24 | 24 | extern crate proc_macro; |
25 | 25 |
|
26 | | -#[cfg(not(feature = "unstable"))] |
| 26 | +#[cfg(not(feature = "nightly"))] |
27 | 27 | extern crate unicode_xid; |
28 | 28 |
|
29 | 29 | use std::fmt; |
30 | 30 | use std::str::FromStr; |
31 | 31 | use std::iter::FromIterator; |
32 | 32 |
|
33 | 33 | #[macro_use] |
34 | | -#[cfg(not(feature = "unstable"))] |
| 34 | +#[cfg(not(feature = "nightly"))] |
35 | 35 | mod strnom; |
36 | 36 |
|
37 | 37 | #[path = "stable.rs"] |
38 | | -#[cfg(not(feature = "unstable"))] |
| 38 | +#[cfg(not(feature = "nightly"))] |
39 | 39 | mod imp; |
40 | 40 | #[path = "unstable.rs"] |
41 | | -#[cfg(feature = "unstable")] |
| 41 | +#[cfg(feature = "nightly")] |
42 | 42 | mod imp; |
43 | 43 |
|
44 | 44 | #[macro_use] |
@@ -162,8 +162,8 @@ impl Span { |
162 | 162 | Span(imp::Span::def_site()) |
163 | 163 | } |
164 | 164 |
|
165 | | - /// This method is only available when the `"unstable"` feature is enabled. |
166 | | - #[cfg(feature = "unstable")] |
| 165 | + /// This method is only available when the `"nightly"` feature is enabled. |
| 166 | + #[cfg(feature = "nightly")] |
167 | 167 | pub fn unstable(self) -> proc_macro::Span { |
168 | 168 | self.0.unstable() |
169 | 169 | } |
|
0 commit comments