Skip to content

Commit dab8c0a

Browse files
committed
Fix stability annotations for already stable bits of proc macro API 1.1
Remove unnecessary proc-macro-related `feature`s
1 parent c106125 commit dab8c0a

33 files changed

+41
-48
lines changed

src/libproc_macro/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ use syntax_pos::hygiene::Mark;
7373
#[derive(Clone)]
7474
pub struct TokenStream(tokenstream::TokenStream);
7575

76-
#[unstable(feature = "proc_macro", issue = "38356")]
76+
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
7777
impl !Send for TokenStream {}
78-
#[unstable(feature = "proc_macro", issue = "38356")]
78+
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
7979
impl !Sync for TokenStream {}
8080

8181
/// Error returned from `TokenStream::from_str`.
@@ -85,9 +85,9 @@ pub struct LexError {
8585
_inner: (),
8686
}
8787

88-
#[unstable(feature = "proc_macro", issue = "38356")]
88+
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
8989
impl !Send for LexError {}
90-
#[unstable(feature = "proc_macro", issue = "38356")]
90+
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
9191
impl !Sync for LexError {}
9292

9393
impl TokenStream {
@@ -167,7 +167,7 @@ impl iter::FromIterator<TokenTree> for TokenStream {
167167

168168
/// A "flattening" operation on token streams, collects token trees
169169
/// from multiple token streams into a single stream.
170-
#[unstable(feature = "proc_macro", issue = "38356")]
170+
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
171171
impl iter::FromIterator<TokenStream> for TokenStream {
172172
fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self {
173173
let mut builder = tokenstream::TokenStreamBuilder::new();

src/test/compile-fail-fulldeps/proc-macro/auxiliary/issue_38586.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// force-host
1212
// no-prefer-dynamic
1313

14-
#![feature(proc_macro, proc_macro_lib)]
1514
#![crate_type = "proc-macro"]
1615

1716
extern crate proc_macro;

src/test/compile-fail-fulldeps/proc-macro/issue-38586.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// aux-build:issue_38586.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro)]
15-
1614
#[macro_use]
1715
extern crate issue_38586;
1816

src/test/compile-fail-fulldeps/proc-macro/lints_in_proc_macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:bang_proc_macro2.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, proc_macro_non_items)]
14+
#![feature(use_extern_macros, proc_macro_non_items)]
1515
#![allow(unused_macros)]
1616

1717
extern crate bang_proc_macro2;

src/test/compile-fail-fulldeps/proc-macro/macro-use-bang.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// aux-build:bang_proc_macro.rs
1212

13-
#![feature(proc_macro, proc_macro_non_items)]
13+
#![feature(proc_macro_non_items)]
1414

1515
#[macro_use]
1616
extern crate bang_proc_macro;

src/test/compile-fail-fulldeps/proc-macro/proc-macro-gates2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// aux-build:proc-macro-gates.rs
1212

13-
#![feature(proc_macro, stmt_expr_attributes)]
13+
#![feature(use_extern_macros, stmt_expr_attributes)]
1414

1515
extern crate proc_macro_gates as foo;
1616

src/test/run-pass-fulldeps/auxiliary/cond_plugin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn cond(input: TokenStream) -> TokenStream {
3333
panic!("Invalid macro usage in cond: {}", cond);
3434
}
3535
let is_else = match test {
36-
TokenTree::Ident(word) => &*word.to_string() == "else",
36+
TokenTree::Ident(ref word) => &*word.to_string() == "else",
3737
_ => false,
3838
};
3939
conds.push(if is_else || input.peek().is_none() {

src/test/run-pass-fulldeps/auxiliary/hello_macro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// no-prefer-dynamic
1212

1313
#![crate_type = "proc-macro"]
14-
#![feature(proc_macro, proc_macro_lib, proc_macro_non_items)]
14+
#![feature(proc_macro, proc_macro_non_items)]
1515

1616
extern crate proc_macro;
1717

src/test/run-pass-fulldeps/auxiliary/proc_macro_def.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// no-prefer-dynamic
1212

1313
#![crate_type = "proc-macro"]
14-
#![feature(proc_macro, proc_macro_lib, proc_macro_non_items)]
14+
#![feature(proc_macro, proc_macro_non_items)]
1515

1616
extern crate proc_macro;
1717

src/test/run-pass-fulldeps/macro-quote-cond.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:cond_plugin.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, proc_macro_non_items)]
14+
#![feature(use_extern_macros, proc_macro_non_items)]
1515

1616
extern crate cond_plugin;
1717

src/test/run-pass-fulldeps/macro-quote-test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// aux-build:hello_macro.rs
1414
// ignore-stage1
1515

16-
#![feature(proc_macro, proc_macro_non_items)]
16+
#![feature(use_extern_macros, proc_macro_non_items)]
1717

1818
extern crate hello_macro;
1919

src/test/run-pass-fulldeps/proc-macro/auxiliary/derive-attr-cfg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// no-prefer-dynamic
12-
#![feature(proc_macro)]
12+
1313
#![crate_type = "proc-macro"]
1414

1515
extern crate proc_macro;

src/test/run-pass-fulldeps/proc-macro/auxiliary/hygiene_example.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(proc_macro)]
11+
#![feature(use_extern_macros)]
1212

1313
extern crate hygiene_example_codegen;
1414

src/test/run-pass-fulldeps/proc-macro/bang-macro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:bang-macro.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, proc_macro_non_items)]
14+
#![feature(use_extern_macros, proc_macro_non_items)]
1515

1616
extern crate bang_macro;
1717
use bang_macro::rewrite;

src/test/run-pass-fulldeps/proc-macro/count_compound_ops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:count_compound_ops.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, proc_macro_non_items)]
14+
#![feature(use_extern_macros, proc_macro_non_items)]
1515

1616
extern crate count_compound_ops;
1717
use count_compound_ops::count_compound_ops;

src/test/run-pass-fulldeps/proc-macro/derive-attr-cfg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:derive-attr-cfg.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro)]
14+
#![feature(use_extern_macros)]
1515

1616
extern crate derive_attr_cfg;
1717
use derive_attr_cfg::Foo;

src/test/run-pass-fulldeps/proc-macro/hygiene_example.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// aux-build:hygiene_example.rs
1313
// ignore-stage1
1414

15-
#![feature(proc_macro, proc_macro_non_items)]
15+
#![feature(use_extern_macros, proc_macro_non_items)]
1616

1717
extern crate hygiene_example;
1818
use hygiene_example::hello;

src/test/run-pass-fulldeps/proc-macro/issue-39889.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:issue-39889.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro)]
14+
#![feature(use_extern_macros)]
1515
#![allow(unused)]
1616

1717
extern crate issue_39889;

src/test/run-pass-fulldeps/proc-macro/issue-40001.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:issue-40001-plugin.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, plugin)]
14+
#![feature(plugin)]
1515
#![plugin(issue_40001_plugin)]
1616

1717
#[whitelisted_attr]

src/test/run-pass-fulldeps/proc-macro/negative-token.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:negative-token.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, proc_macro_non_items)]
14+
#![feature(proc_macro_non_items)]
1515

1616
extern crate negative_token;
1717

src/test/run-pass-fulldeps/proc-macro/span-api-tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// ignore-pretty
1515

16-
#![feature(proc_macro)]
16+
#![feature(use_extern_macros)]
1717

1818
#[macro_use]
1919
extern crate span_test_macros;

src/test/ui-fulldeps/custom-derive/auxiliary/plugin.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// no-prefer-dynamic
1212

1313
#![crate_type = "proc-macro"]
14-
#![feature(proc_macro, proc_macro_lib)]
1514

1615
extern crate proc_macro;
1716

src/test/ui-fulldeps/custom-derive/issue-36935.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// aux-build:plugin.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro)]
15-
1614
#[macro_use] extern crate plugin;
1715

1816
#[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked

src/test/ui-fulldeps/custom-derive/issue-36935.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc-macro derive panicked
2-
--> $DIR/issue-36935.rs:18:15
2+
--> $DIR/issue-36935.rs:16:15
33
|
44
LL | #[derive(Foo, Bar)] //~ ERROR proc-macro derive panicked
55
| ^^^

src/test/ui-fulldeps/invalid-punct-ident-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// aux-build:invalid-punct-ident.rs
12-
#![feature(proc_macro)]
12+
1313
#[macro_use]
1414
extern crate invalid_punct_ident;
1515

src/test/ui-fulldeps/invalid-punct-ident-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// aux-build:invalid-punct-ident.rs
12-
#![feature(proc_macro)]
12+
1313
#[macro_use]
1414
extern crate invalid_punct_ident;
1515

src/test/ui-fulldeps/invalid-punct-ident-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// aux-build:invalid-punct-ident.rs
12-
#![feature(proc_macro)]
12+
1313
#[macro_use]
1414
extern crate invalid_punct_ident;
1515

src/test/ui-fulldeps/invalid-punct-ident-4.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// aux-build:invalid-punct-ident.rs
12-
#![feature(proc_macro)]
12+
1313
#[macro_use]
1414
extern crate invalid_punct_ident;
1515

src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn parse(input: TokenStream) -> Result<(), Diagnostic> {
2727
.help("input must be: `===`"))
2828
}
2929

30-
if let TokenTree::Punct(tt) = tree {
30+
if let TokenTree::Punct(ref tt) = tree {
3131
if tt.as_char() == '=' {
3232
count += 1;
3333
last_span = span;

src/test/ui-fulldeps/proc-macro/parent-source-spans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:parent-source-spans.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, decl_macro, proc_macro_non_items)]
14+
#![feature(use_extern_macros, decl_macro, proc_macro_non_items)]
1515

1616
extern crate parent_source_spans;
1717

src/test/ui-fulldeps/proc-macro/three-equals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// aux-build:three-equals.rs
1212
// ignore-stage1
1313

14-
#![feature(proc_macro, proc_macro_non_items)]
14+
#![feature(use_extern_macros, proc_macro_non_items)]
1515

1616
extern crate three_equals;
1717

src/test/ui-fulldeps/resolve-error.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// aux-build:bang_proc_macro.rs
1515

1616
#![feature(proc_macro)]
17-
#![allow(unused_macros)]
1817

1918
#[macro_use]
2019
extern crate derive_foo;

src/test/ui-fulldeps/resolve-error.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
error: cannot find derive macro `FooWithLongNan` in this scope
2-
--> $DIR/resolve-error.rs:37:10
2+
--> $DIR/resolve-error.rs:36:10
33
|
44
LL | #[derive(FooWithLongNan)]
55
| ^^^^^^^^^^^^^^ help: try: `FooWithLongName`
66

77
error: cannot find attribute macro `attr_proc_macra` in this scope
8-
--> $DIR/resolve-error.rs:41:3
8+
--> $DIR/resolve-error.rs:40:3
99
|
1010
LL | #[attr_proc_macra]
1111
| ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro`
1212

1313
error: cannot find attribute macro `FooWithLongNan` in this scope
14-
--> $DIR/resolve-error.rs:45:3
14+
--> $DIR/resolve-error.rs:44:3
1515
|
1616
LL | #[FooWithLongNan]
1717
| ^^^^^^^^^^^^^^
1818

1919
error: cannot find derive macro `Dlone` in this scope
20-
--> $DIR/resolve-error.rs:49:10
20+
--> $DIR/resolve-error.rs:48:10
2121
|
2222
LL | #[derive(Dlone)]
2323
| ^^^^^ help: try: `Clone`
2424

2525
error: cannot find derive macro `Dlona` in this scope
26-
--> $DIR/resolve-error.rs:53:10
26+
--> $DIR/resolve-error.rs:52:10
2727
|
2828
LL | #[derive(Dlona)]
2929
| ^^^^^ help: try: `Clona`
3030

3131
error: cannot find derive macro `attr_proc_macra` in this scope
32-
--> $DIR/resolve-error.rs:57:10
32+
--> $DIR/resolve-error.rs:56:10
3333
|
3434
LL | #[derive(attr_proc_macra)]
3535
| ^^^^^^^^^^^^^^^
3636

3737
error: cannot find macro `FooWithLongNama!` in this scope
38-
--> $DIR/resolve-error.rs:62:5
38+
--> $DIR/resolve-error.rs:61:5
3939
|
4040
LL | FooWithLongNama!();
4141
| ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam`
4242

4343
error: cannot find macro `attr_proc_macra!` in this scope
44-
--> $DIR/resolve-error.rs:65:5
44+
--> $DIR/resolve-error.rs:64:5
4545
|
4646
LL | attr_proc_macra!();
4747
| ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac`
4848

4949
error: cannot find macro `Dlona!` in this scope
50-
--> $DIR/resolve-error.rs:68:5
50+
--> $DIR/resolve-error.rs:67:5
5151
|
5252
LL | Dlona!();
5353
| ^^^^^
5454

5555
error: cannot find macro `bang_proc_macrp!` in this scope
56-
--> $DIR/resolve-error.rs:71:5
56+
--> $DIR/resolve-error.rs:70:5
5757
|
5858
LL | bang_proc_macrp!();
5959
| ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro`

0 commit comments

Comments
 (0)