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:
parent
917e5baae7
commit
045f8f6929
65 changed files with 13 additions and 188 deletions
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
// force-host
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
// force-host
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// aux-build:derive-bad.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_bad;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:derive-a.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:derive-unstable-2.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:derive-unstable.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
@ -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() {}
|
||||
|
|
@ -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() {
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
@ -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() {}
|
||||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:derive-a.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// aux-build:derive-a-b.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_a_b;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:derive-b.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// aux-build:derive-panic.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_panic;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:derive-b.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// aux-build:derive-a.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_a;
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// aux-build:add-impl.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate add_impl;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:append-impl.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// force-host
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// ignore-test
|
||||
|
||||
#![feature(macro_reexport, proc_macro)]
|
||||
#![feature(macro_reexport)]
|
||||
|
||||
#[macro_reexport(A)]
|
||||
extern crate derive_a;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![deny(warnings)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// aux-build:double.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(unused)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// aux-build:derive-b.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_b;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// aux-build:derive-same-struct.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_same_struct;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
// compile-flags: --test
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
// aux-build:expand-with-a-macro.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![deny(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// aux-build:derive-a.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_a;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// aux-build:derive-nothing.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_nothing;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// aux-build:derive-a.rs
|
||||
// aux-build:derive-reexport.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_reexport;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_lib)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue