Skip to content

Commit c2e2697

Browse files
author
Keegan McAllister
committed
Un-gate macro_rules
1 parent d0163d3 commit c2e2697

File tree

129 files changed

+15
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+15
-260
lines changed

src/grammar/verify.rs

Lines changed: 1 addition & 1 deletion
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(globs, plugin, macro_rules)]
11+
#![feature(globs, plugin)]
1212

1313
extern crate syntax;
1414
extern crate rustc;

src/libcoretest/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
#![feature(globs, unsafe_destructor, macro_rules, slicing_syntax, default_type_params)]
10+
#![feature(globs, unsafe_destructor, slicing_syntax, default_type_params)]
1111
#![feature(unboxed_closures)]
1212

1313
extern crate core;

src/libfmt_macros/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
html_root_url = "http://doc.rust-lang.org/nightly/",
2424
html_playground_url = "http://play.rust-lang.org/")]
2525

26-
#![feature(macro_rules, globs, slicing_syntax)]
26+
#![feature(globs, slicing_syntax)]
2727
#![feature(associated_types)]
2828

2929
pub use self::Piece::*;

src/libsyntax/feature_gate.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use std::ascii::AsciiExt;
3737
// if you change this list without updating src/doc/reference.md, @cmr will be sad
3838
static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
3939
("globs", Active),
40-
("macro_rules", Active),
40+
("macro_rules", Accepted),
4141
("struct_variant", Accepted),
4242
("asm", Active),
4343
("managed_boxes", Removed),
@@ -169,12 +169,7 @@ impl<'a, 'v> Visitor<'v> for MacroVisitor<'a> {
169169
let ast::MacInvocTT(ref path, _, _) = mac.node;
170170
let id = path.segments.last().unwrap().identifier;
171171

172-
if id == token::str_to_ident("macro_rules") {
173-
self.context.gate_feature("macro_rules", path.span, "macro definitions are \
174-
not stable enough for use and are subject to change");
175-
}
176-
177-
else if id == token::str_to_ident("asm") {
172+
if id == token::str_to_ident("asm") {
178173
self.context.gate_feature("asm", path.span, "inline assembly is not \
179174
stable enough for use and is subject to change");
180175
}

src/libtest/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
html_root_url = "http://doc.rust-lang.org/nightly/")]
3333

3434
#![allow(unknown_features)]
35-
#![feature(asm, macro_rules, globs, slicing_syntax)]
35+
#![feature(asm, globs, slicing_syntax)]
3636
#![feature(unboxed_closures, default_type_params)]
3737
#![feature(old_orphan_check)]
3838

src/test/auxiliary/lint_stability.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#![crate_name="lint_stability"]
1111
#![crate_type = "lib"]
1212

13-
#![feature(macro_rules)]
14-
1513
#[deprecated]
1614
pub fn deprecated() {}
1715
#[deprecated="text"]

src/test/auxiliary/macro_crate_def_only.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
#[macro_export]
1412
macro_rules! make_a_5 {
1513
() => (5)

src/test/auxiliary/macro_crate_nonterminal.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
pub fn increment(x: uint) -> uint {
1412
x + 1
1513
}

src/test/auxiliary/macro_crate_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// force-host
1212

13-
#![feature(globs, plugin_registrar, macro_rules, quote)]
13+
#![feature(globs, plugin_registrar, quote)]
1414

1515
extern crate syntax;
1616
extern crate rustc;

src/test/auxiliary/macro_export_inner_module.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
pub mod inner {
1412
#[macro_export]
1513
macro_rules! foo {

src/test/auxiliary/macro_reexport_1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// except according to those terms.
1010

1111
#![crate_type = "dylib"]
12-
#![feature(macro_rules)]
13-
1412
#[macro_export]
1513
macro_rules! reexported {
1614
() => ( 3u )

src/test/auxiliary/svh-a-base.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-change-lit.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-change-significant-cfg.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-change-trait-bound.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-change-type-arg.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-change-type-ret.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-change-type-static.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-comment.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-doc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-macro.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-no-change.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-redundant-cfg.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/svh-a-whitespace.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! should not affect the strict version hash (SVH) computation
1414
//! (#14132).
1515
16-
#![feature(macro_rules)]
17-
1816
#![crate_name = "a"]
1917

2018
macro_rules! three {

src/test/auxiliary/two_macros.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// force-host
1212

13-
#![feature(macro_rules)]
14-
1513
#[macro_export]
1614
macro_rules! macro_one { () => ("one") }
1715

src/test/bench/core-std.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// ignore-lexer-test FIXME #15679
1212
// Microbenchmarks for various functions in std and extra
1313

14-
#![feature(macro_rules)]
1514
#![feature(unboxed_closures)]
1615

1716
use std::io::File;

src/test/bench/shootout-mandelbrot.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
3939
// OF THE POSSIBILITY OF SUCH DAMAGE.
4040

41-
#![feature(macro_rules)]
4241
#![feature(simd)]
4342
#![allow(experimental)]
4443

src/test/bench/shootout-regex-dna.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
// ignore-stage1
4242
// ignore-cross-compile #12102
4343

44-
#![feature(macro_rules, plugin, slicing_syntax)]
44+
#![feature(plugin, slicing_syntax)]
4545

4646
extern crate regex;
4747

src/test/compile-fail/cleanup-rvalue-scopes-cf.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// Test that the borrow checker prevents pointers to temporaries
1212
// with statement lifetimes from escaping.
1313

14-
#![feature(macro_rules)]
15-
1614
use std::ops::Drop;
1715

1816
static mut FLAGS: u64 = 0;

src/test/compile-fail/const-block-non-item-statement.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
static A: uint = { 1u; 2 };
1412
//~^ ERROR: blocks in constants are limited to items and tail expressions
1513

src/test/compile-fail/gated-macro-rules.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/test/compile-fail/hygienic-label-1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
macro_rules! foo {
1412
() => { break 'x; }
1513
}

src/test/compile-fail/hygienic-label-2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
macro_rules! foo {
1412
($e: expr) => { 'x: loop { $e } }
1513
}

src/test/compile-fail/hygienic-label-3.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
macro_rules! foo {
1412
() => { break 'x; }
1513
}

src/test/compile-fail/hygienic-label-4.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
macro_rules! foo {
1412
($e: expr) => { 'x: for _ in range(0,1) { $e } }
1513
}

src/test/compile-fail/if-let.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
fn macros() {
1412
macro_rules! foo{
1513
($p:pat, $e:expr, $b:block) => {{

src/test/compile-fail/infinite-macro-expansion.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
macro_rules! recursive {
1412
() => (recursive!()) //~ ERROR recursion limit reached while expanding the macro `recursive`
1513
}

src/test/compile-fail/issue-10536.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
// error-pattern:
1515

16-
#![feature(macro_rules)]
17-
1816
macro_rules! foo{
1917
() => {{
2018
macro_rules! bar{() => (())}

src/test/compile-fail/issue-15167.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
// ignore-test
1717

18-
#![feature(macro_rules)]
19-
2018
macro_rules! f { () => (n) }
2119

2220
fn main() -> (){

src/test/compile-fail/issue-16098.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
macro_rules! prob1 {
1412
(0) => {
1513
0

src/test/compile-fail/issue-6596.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules)]
12-
1311
// error-pattern: unexpected token
1412

1513
macro_rules! e {

src/test/compile-fail/lint-unsafe-block.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#![allow(unused_unsafe)]
1212
#![allow(dead_code)]
1313
#![deny(unsafe_blocks)]
14-
#![feature(macro_rules)]
15-
1614
unsafe fn allowed() {}
1715

1816
#[allow(unsafe_blocks)] fn also_allowed() { unsafe {} }

0 commit comments

Comments
 (0)