Fix stability annotations for already stable bits of proc macro API 1.1
Remove unnecessary proc-macro-related `feature`s
This commit is contained in:
parent
c106125431
commit
dab8c0ab28
@ -73,9 +73,9 @@ use syntax_pos::hygiene::Mark;
|
||||
#[derive(Clone)]
|
||||
pub struct TokenStream(tokenstream::TokenStream);
|
||||
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||
impl !Send for TokenStream {}
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||
impl !Sync for TokenStream {}
|
||||
|
||||
/// Error returned from `TokenStream::from_str`.
|
||||
@ -85,9 +85,9 @@ pub struct LexError {
|
||||
_inner: (),
|
||||
}
|
||||
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||
impl !Send for LexError {}
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||
impl !Sync for LexError {}
|
||||
|
||||
impl TokenStream {
|
||||
@ -167,7 +167,7 @@ impl iter::FromIterator<TokenTree> for TokenStream {
|
||||
|
||||
/// A "flattening" operation on token streams, collects token trees
|
||||
/// from multiple token streams into a single stream.
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||
impl iter::FromIterator<TokenStream> for TokenStream {
|
||||
fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self {
|
||||
let mut builder = tokenstream::TokenStreamBuilder::new();
|
||||
|
@ -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 @@
|
||||
// aux-build:issue_38586.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate issue_38586;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:bang_proc_macro2.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
#![allow(unused_macros)]
|
||||
|
||||
extern crate bang_proc_macro2;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
// aux-build:bang_proc_macro.rs
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(proc_macro_non_items)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bang_proc_macro;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
// aux-build:proc-macro-gates.rs
|
||||
|
||||
#![feature(proc_macro, stmt_expr_attributes)]
|
||||
#![feature(use_extern_macros, stmt_expr_attributes)]
|
||||
|
||||
extern crate proc_macro_gates as foo;
|
||||
|
||||
|
@ -33,7 +33,7 @@ pub fn cond(input: TokenStream) -> TokenStream {
|
||||
panic!("Invalid macro usage in cond: {}", cond);
|
||||
}
|
||||
let is_else = match test {
|
||||
TokenTree::Ident(word) => &*word.to_string() == "else",
|
||||
TokenTree::Ident(ref word) => &*word.to_string() == "else",
|
||||
_ => false,
|
||||
};
|
||||
conds.push(if is_else || input.peek().is_none() {
|
||||
|
@ -11,7 +11,7 @@
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib, proc_macro_non_items)]
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib, proc_macro_non_items)]
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:cond_plugin.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
|
||||
extern crate cond_plugin;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
// aux-build:hello_macro.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
|
||||
extern crate hello_macro;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// no-prefer-dynamic
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate hygiene_example_codegen;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:bang-macro.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
|
||||
extern crate bang_macro;
|
||||
use bang_macro::rewrite;
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:count_compound_ops.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
|
||||
extern crate count_compound_ops;
|
||||
use count_compound_ops::count_compound_ops;
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:derive-attr-cfg.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
extern crate derive_attr_cfg;
|
||||
use derive_attr_cfg::Foo;
|
||||
|
@ -12,7 +12,7 @@
|
||||
// aux-build:hygiene_example.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
|
||||
extern crate hygiene_example;
|
||||
use hygiene_example::hello;
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:issue-39889.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(use_extern_macros)]
|
||||
#![allow(unused)]
|
||||
|
||||
extern crate issue_39889;
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:issue-40001-plugin.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, plugin)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(issue_40001_plugin)]
|
||||
|
||||
#[whitelisted_attr]
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:negative-token.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(proc_macro_non_items)]
|
||||
|
||||
extern crate negative_token;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// ignore-pretty
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate span_test_macros;
|
||||
|
@ -11,7 +11,6 @@
|
||||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro, proc_macro_lib)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
@ -11,8 +11,6 @@
|
||||
// aux-build:plugin.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use] extern crate plugin;
|
||||
|
||||
#[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: proc-macro derive panicked
|
||||
--> $DIR/issue-36935.rs:18:15
|
||||
--> $DIR/issue-36935.rs:16:15
|
||||
|
|
||||
LL | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked
|
||||
| ^^^
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// aux-build:invalid-punct-ident.rs
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate invalid_punct_ident;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// aux-build:invalid-punct-ident.rs
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate invalid_punct_ident;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// aux-build:invalid-punct-ident.rs
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate invalid_punct_ident;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
// aux-build:invalid-punct-ident.rs
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate invalid_punct_ident;
|
||||
|
||||
|
@ -27,7 +27,7 @@ fn parse(input: TokenStream) -> Result<(), Diagnostic> {
|
||||
.help("input must be: `===`"))
|
||||
}
|
||||
|
||||
if let TokenTree::Punct(tt) = tree {
|
||||
if let TokenTree::Punct(ref tt) = tree {
|
||||
if tt.as_char() == '=' {
|
||||
count += 1;
|
||||
last_span = span;
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:parent-source-spans.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, decl_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, decl_macro, proc_macro_non_items)]
|
||||
|
||||
extern crate parent_source_spans;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
// aux-build:three-equals.rs
|
||||
// ignore-stage1
|
||||
|
||||
#![feature(proc_macro, proc_macro_non_items)]
|
||||
#![feature(use_extern_macros, proc_macro_non_items)]
|
||||
|
||||
extern crate three_equals;
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
// aux-build:bang_proc_macro.rs
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![allow(unused_macros)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate derive_foo;
|
||||
|
@ -1,59 +1,59 @@
|
||||
error: cannot find derive macro `FooWithLongNan` in this scope
|
||||
--> $DIR/resolve-error.rs:37:10
|
||||
--> $DIR/resolve-error.rs:36:10
|
||||
|
|
||||
LL | #[derive(FooWithLongNan)]
|
||||
| ^^^^^^^^^^^^^^ help: try: `FooWithLongName`
|
||||
|
||||
error: cannot find attribute macro `attr_proc_macra` in this scope
|
||||
--> $DIR/resolve-error.rs:41:3
|
||||
--> $DIR/resolve-error.rs:40:3
|
||||
|
|
||||
LL | #[attr_proc_macra]
|
||||
| ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro`
|
||||
|
||||
error: cannot find attribute macro `FooWithLongNan` in this scope
|
||||
--> $DIR/resolve-error.rs:45:3
|
||||
--> $DIR/resolve-error.rs:44:3
|
||||
|
|
||||
LL | #[FooWithLongNan]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot find derive macro `Dlone` in this scope
|
||||
--> $DIR/resolve-error.rs:49:10
|
||||
--> $DIR/resolve-error.rs:48:10
|
||||
|
|
||||
LL | #[derive(Dlone)]
|
||||
| ^^^^^ help: try: `Clone`
|
||||
|
||||
error: cannot find derive macro `Dlona` in this scope
|
||||
--> $DIR/resolve-error.rs:53:10
|
||||
--> $DIR/resolve-error.rs:52:10
|
||||
|
|
||||
LL | #[derive(Dlona)]
|
||||
| ^^^^^ help: try: `Clona`
|
||||
|
||||
error: cannot find derive macro `attr_proc_macra` in this scope
|
||||
--> $DIR/resolve-error.rs:57:10
|
||||
--> $DIR/resolve-error.rs:56:10
|
||||
|
|
||||
LL | #[derive(attr_proc_macra)]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot find macro `FooWithLongNama!` in this scope
|
||||
--> $DIR/resolve-error.rs:62:5
|
||||
--> $DIR/resolve-error.rs:61:5
|
||||
|
|
||||
LL | FooWithLongNama!();
|
||||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam`
|
||||
|
||||
error: cannot find macro `attr_proc_macra!` in this scope
|
||||
--> $DIR/resolve-error.rs:65:5
|
||||
--> $DIR/resolve-error.rs:64:5
|
||||
|
|
||||
LL | attr_proc_macra!();
|
||||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac`
|
||||
|
||||
error: cannot find macro `Dlona!` in this scope
|
||||
--> $DIR/resolve-error.rs:68:5
|
||||
--> $DIR/resolve-error.rs:67:5
|
||||
|
|
||||
LL | Dlona!();
|
||||
| ^^^^^
|
||||
|
||||
error: cannot find macro `bang_proc_macrp!` in this scope
|
||||
--> $DIR/resolve-error.rs:71:5
|
||||
--> $DIR/resolve-error.rs:70:5
|
||||
|
|
||||
LL | bang_proc_macrp!();
|
||||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro`
|
||||
|
Loading…
Reference in New Issue
Block a user