about summary refs log tree commit diff
path: root/src/libproc_macro
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-01-01 16:14:35 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-01-02 12:13:30 -0800
commit045f8f69293fae924ee4998439ec0e34f98320be (patch)
treee1f319b047028fd4fd66a708ed1274fb4d127384 /src/libproc_macro
parent917e5baae7ff931b13a8b40d2fce60395fefe7a4 (diff)
downloadrust-045f8f69293fae924ee4998439ec0e34f98320be.tar.gz
rust-045f8f69293fae924ee4998439ec0e34f98320be.zip
rustc: Stabilize the `proc_macro` feature
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the
compiler to stabilize the "Macros 1.1" feature of the language. Many more
details can be found on the tracking issue, #35900.

Closes #35900
Diffstat (limited to 'src/libproc_macro')
-rw-r--r--src/libproc_macro/lib.rs9
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() {