diff options
Diffstat (limited to 'src/libproc_macro')
| -rw-r--r-- | src/libproc_macro/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 5ee9fecfb21..1491bdc6c8d 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -15,8 +15,7 @@ //! Currently the primary use of this crate is to provide the ability to define //! new custom derive modes through `#[proc_macro_derive]`. //! -//! Added recently as part of [RFC 1681] this crate is currently *unstable* and -//! requires the `#![feature(proc_macro_lib)]` directive to use. +//! Added recently as part of [RFC 1681] this crate is stable as of Rust 1.15.0. //! //! [RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md //! @@ -27,7 +26,7 @@ //! area for macro authors is stabilized. #![crate_name = "proc_macro"] -#![unstable(feature = "proc_macro_lib", issue = "27812")] +#![stable(feature = "proc_macro_lib", since = "1.15.0")] #![crate_type = "rlib"] #![crate_type = "dylib"] #![cfg_attr(not(stage0), deny(warnings))] @@ -55,12 +54,14 @@ use syntax::ptr::P; /// /// The API of this type is intentionally bare-bones, but it'll be expanded over /// time! +#[stable(feature = "proc_macro_lib", since = "1.15.0")] pub struct TokenStream { inner: Vec<P<ast::Item>>, } /// Error returned from `TokenStream::from_str`. #[derive(Debug)] +#[stable(feature = "proc_macro_lib", since = "1.15.0")] pub struct LexError { _inner: (), } @@ -131,6 +132,7 @@ pub mod __internal { } } +#[stable(feature = "proc_macro_lib", since = "1.15.0")] impl FromStr for TokenStream { type Err = LexError; @@ -154,6 +156,7 @@ impl FromStr for TokenStream { } } +#[stable(feature = "proc_macro_lib", since = "1.15.0")] impl fmt::Display for TokenStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { for item in self.inner.iter() { |
