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
This commit is contained in:
Alex Crichton 2017-01-01 16:14:35 -08:00
parent 917e5baae7
commit 045f8f6929
65 changed files with 13 additions and 188 deletions

View file

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "proc-macro"]
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,7 +11,6 @@
// force-host
// no-prefer-dynamic
#![feature(proc_macro, proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// force-host
// no-prefer-dynamic
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// force-host
// no-prefer-dynamic
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
// force-host
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
// force-host
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// force-host
// no-prefer-dynamic
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// force-host
// no-prefer-dynamic
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,7 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;

View file

@ -10,8 +10,6 @@
// aux-build:derive-bad.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_bad;

View file

@ -10,7 +10,6 @@
// aux-build:derive-a.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -10,7 +10,6 @@
// aux-build:derive-unstable-2.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -10,7 +10,6 @@
// aux-build:derive-unstable.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -11,7 +11,6 @@
// error-pattern: cannot export macro_rules! macros from a `proc-macro` crate
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#[macro_export]
macro_rules! foo {

View file

@ -1,13 +0,0 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern: the `proc-macro` crate type is experimental
#![crate_type = "proc-macro"]

View file

@ -1,13 +0,0 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern crate proc_macro; //~ ERROR: use of unstable library feature
fn main() {}

View file

@ -1,15 +0,0 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type = "proc-macro"]
#[proc_macro_derive(Foo)] //~ ERROR: is an experimental feature
pub fn foo() {
}

View file

@ -1,17 +0,0 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// aux-build:derive-a.rs
#[macro_use]
extern crate derive_a;
#[derive(A)] //~ ERROR custom derive macros are experimentally supported
struct S;

View file

@ -1,12 +0,0 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[cfg(proc_macro)] //~ ERROR: experimental and subject to change
fn foo() {}

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;
#[proc_macro_derive(Foo)]

View file

@ -10,7 +10,6 @@
// aux-build:derive-a.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -10,8 +10,6 @@
// aux-build:derive-a-b.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_a_b;

View file

@ -10,7 +10,6 @@
// aux-build:derive-b.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -10,8 +10,6 @@
// aux-build:derive-panic.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_panic;

View file

@ -10,7 +10,6 @@
// aux-build:derive-b.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "proc-macro"]
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;

View file

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "proc-macro"]
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;

View file

@ -10,8 +10,6 @@
// aux-build:derive-a.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_a;
#[macro_use]

View file

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "proc-macro"]
#![feature(proc_macro, proc_macro_lib)]
#![allow(warnings)]
extern crate proc_macro;

View file

@ -8,6 +8,5 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(proc_macro)]
#![allow(unused)]
#![crate_type = "proc-macro"]

View file

@ -8,6 +8,5 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(proc_macro)]
#![allow(unused)]
#![crate_type = "proc-macro"]

View file

@ -9,7 +9,6 @@
// except according to those terms.
#![crate_type = "proc-macro"]
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(proc_macro)]
#[macro_use]
extern crate foo;

View file

@ -9,8 +9,6 @@
// except according to those terms.
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -10,8 +10,6 @@
// aux-build:add-impl.rs
#![feature(proc_macro)]
#[macro_use]
extern crate add_impl;

View file

@ -10,7 +10,6 @@
// aux-build:append-impl.rs
#![feature(proc_macro)]
#![allow(warnings)]
#[macro_use]

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// force-host
// no-prefer-dynamic
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -10,7 +10,7 @@
// ignore-test
#![feature(macro_reexport, proc_macro)]
#![feature(macro_reexport)]
#[macro_reexport(A)]
extern crate derive_a;

View file

@ -11,9 +11,6 @@
// no-prefer-dynamic
// compile-flags:--crate-type proc-macro
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;
use proc_macro::TokenStream;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,8 +11,6 @@
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![deny(warnings)]
extern crate proc_macro;

View file

@ -10,7 +10,6 @@
// aux-build:double.rs
#![feature(proc_macro)]
#![allow(unused)]
#[macro_use]

View file

@ -11,8 +11,6 @@
// aux-build:derive-b.rs
// ignore-stage1
#![feature(proc_macro)]
#[macro_use]
extern crate derive_b;

View file

@ -10,8 +10,6 @@
// aux-build:derive-same-struct.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_same_struct;

View file

@ -12,8 +12,6 @@
// compile-flags: --test
#![crate_type = "proc-macro"]
#![feature(proc_macro)]
#![feature(proc_macro, proc_macro_lib)]
extern crate proc_macro;

View file

@ -11,7 +11,6 @@
// aux-build:expand-with-a-macro.rs
// ignore-stage1
#![feature(proc_macro)]
#![deny(warnings)]
#[macro_use]

View file

@ -11,8 +11,6 @@
// aux-build:derive-atob.rs
// aux-build:derive-ctod.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_atob;
#[macro_use]

View file

@ -11,8 +11,6 @@
// aux-build:derive-a.rs
// ignore-stage1
#![feature(proc_macro)]
#[macro_use]
extern crate derive_a;

View file

@ -11,8 +11,6 @@
// aux-build:derive-nothing.rs
// ignore-stage1
#![feature(proc_macro)]
#[macro_use]
extern crate derive_nothing;

View file

@ -11,8 +11,6 @@
// aux-build:derive-a.rs
// aux-build:derive-reexport.rs
#![feature(proc_macro)]
#[macro_use]
extern crate derive_reexport;

View file

@ -10,8 +10,6 @@
// no-prefer-dynamic
#![feature(proc_macro)]
#![feature(proc_macro_lib)]
#![crate_type = "proc-macro"]
extern crate proc_macro;