提交 c2e26972 编写于 作者: K Keegan McAllister

Un-gate macro_rules

上级 d0163d33
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(globs, plugin, macro_rules)] #![feature(globs, plugin)]
extern crate syntax; extern crate syntax;
extern crate rustc; extern crate rustc;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(globs, unsafe_destructor, macro_rules, slicing_syntax, default_type_params)] #![feature(globs, unsafe_destructor, slicing_syntax, default_type_params)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
extern crate core; extern crate core;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
html_root_url = "http://doc.rust-lang.org/nightly/", html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")] html_playground_url = "http://play.rust-lang.org/")]
#![feature(macro_rules, globs, slicing_syntax)] #![feature(globs, slicing_syntax)]
#![feature(associated_types)] #![feature(associated_types)]
pub use self::Piece::*; pub use self::Piece::*;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
// if you change this list without updating src/doc/reference.md, @cmr will be sad // if you change this list without updating src/doc/reference.md, @cmr will be sad
static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
("globs", Active), ("globs", Active),
("macro_rules", Active), ("macro_rules", Accepted),
("struct_variant", Accepted), ("struct_variant", Accepted),
("asm", Active), ("asm", Active),
("managed_boxes", Removed), ("managed_boxes", Removed),
...@@ -169,12 +169,7 @@ fn visit_mac(&mut self, mac: &ast::Mac) { ...@@ -169,12 +169,7 @@ fn visit_mac(&mut self, mac: &ast::Mac) {
let ast::MacInvocTT(ref path, _, _) = mac.node; let ast::MacInvocTT(ref path, _, _) = mac.node;
let id = path.segments.last().unwrap().identifier; let id = path.segments.last().unwrap().identifier;
if id == token::str_to_ident("macro_rules") { if id == token::str_to_ident("asm") {
self.context.gate_feature("macro_rules", path.span, "macro definitions are \
not stable enough for use and are subject to change");
}
else if id == token::str_to_ident("asm") {
self.context.gate_feature("asm", path.span, "inline assembly is not \ self.context.gate_feature("asm", path.span, "inline assembly is not \
stable enough for use and is subject to change"); stable enough for use and is subject to change");
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
html_root_url = "http://doc.rust-lang.org/nightly/")] html_root_url = "http://doc.rust-lang.org/nightly/")]
#![allow(unknown_features)] #![allow(unknown_features)]
#![feature(asm, macro_rules, globs, slicing_syntax)] #![feature(asm, globs, slicing_syntax)]
#![feature(unboxed_closures, default_type_params)] #![feature(unboxed_closures, default_type_params)]
#![feature(old_orphan_check)] #![feature(old_orphan_check)]
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#![crate_name="lint_stability"] #![crate_name="lint_stability"]
#![crate_type = "lib"] #![crate_type = "lib"]
#![feature(macro_rules)]
#[deprecated] #[deprecated]
pub fn deprecated() {} pub fn deprecated() {}
#[deprecated="text"] #[deprecated="text"]
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
#[macro_export] #[macro_export]
macro_rules! make_a_5 { macro_rules! make_a_5 {
() => (5) () => (5)
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
pub fn increment(x: uint) -> uint { pub fn increment(x: uint) -> uint {
x + 1 x + 1
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// force-host // force-host
#![feature(globs, plugin_registrar, macro_rules, quote)] #![feature(globs, plugin_registrar, quote)]
extern crate syntax; extern crate syntax;
extern crate rustc; extern crate rustc;
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
pub mod inner { pub mod inner {
#[macro_export] #[macro_export]
macro_rules! foo { macro_rules! foo {
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
// except according to those terms. // except according to those terms.
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![feature(macro_rules)]
#[macro_export] #[macro_export]
macro_rules! reexported { macro_rules! reexported {
() => ( 3u ) () => ( 3u )
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
//! should not affect the strict version hash (SVH) computation //! should not affect the strict version hash (SVH) computation
//! (#14132). //! (#14132).
#![feature(macro_rules)]
#![crate_name = "a"] #![crate_name = "a"]
macro_rules! three { macro_rules! three {
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// force-host // force-host
#![feature(macro_rules)]
#[macro_export] #[macro_export]
macro_rules! macro_one { () => ("one") } macro_rules! macro_one { () => ("one") }
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
// ignore-lexer-test FIXME #15679 // ignore-lexer-test FIXME #15679
// Microbenchmarks for various functions in std and extra // Microbenchmarks for various functions in std and extra
#![feature(macro_rules)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
use std::io::File; use std::io::File;
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE. // OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(macro_rules)]
#![feature(simd)] #![feature(simd)]
#![allow(experimental)] #![allow(experimental)]
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
// ignore-stage1 // ignore-stage1
// ignore-cross-compile #12102 // ignore-cross-compile #12102
#![feature(macro_rules, plugin, slicing_syntax)] #![feature(plugin, slicing_syntax)]
extern crate regex; extern crate regex;
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
// Test that the borrow checker prevents pointers to temporaries // Test that the borrow checker prevents pointers to temporaries
// with statement lifetimes from escaping. // with statement lifetimes from escaping.
#![feature(macro_rules)]
use std::ops::Drop; use std::ops::Drop;
static mut FLAGS: u64 = 0; static mut FLAGS: u64 = 0;
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
static A: uint = { 1u; 2 }; static A: uint = { 1u; 2 };
//~^ ERROR: blocks in constants are limited to items and tail expressions //~^ ERROR: blocks in constants are limited to items and tail expressions
......
// Copyright 2013 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.
macro_rules! foo { () => () }
//~^ ERROR: macro definitions are not stable enough for use
fn main() {}
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! foo { macro_rules! foo {
() => { break 'x; } () => { break 'x; }
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! foo { macro_rules! foo {
($e: expr) => { 'x: loop { $e } } ($e: expr) => { 'x: loop { $e } }
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! foo { macro_rules! foo {
() => { break 'x; } () => { break 'x; }
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! foo { macro_rules! foo {
($e: expr) => { 'x: for _ in range(0,1) { $e } } ($e: expr) => { 'x: for _ in range(0,1) { $e } }
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
fn macros() { fn macros() {
macro_rules! foo{ macro_rules! foo{
($p:pat, $e:expr, $b:block) => {{ ($p:pat, $e:expr, $b:block) => {{
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! recursive { macro_rules! recursive {
() => (recursive!()) //~ ERROR recursion limit reached while expanding the macro `recursive` () => (recursive!()) //~ ERROR recursion limit reached while expanding the macro `recursive`
} }
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// error-pattern: // error-pattern:
#![feature(macro_rules)]
macro_rules! foo{ macro_rules! foo{
() => {{ () => {{
macro_rules! bar{() => (())} macro_rules! bar{() => (())}
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
// ignore-test // ignore-test
#![feature(macro_rules)]
macro_rules! f { () => (n) } macro_rules! f { () => (n) }
fn main() -> (){ fn main() -> (){
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! prob1 { macro_rules! prob1 {
(0) => { (0) => {
0 0
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
// error-pattern: unexpected token // error-pattern: unexpected token
macro_rules! e { macro_rules! e {
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#![allow(unused_unsafe)] #![allow(unused_unsafe)]
#![allow(dead_code)] #![allow(dead_code)]
#![deny(unsafe_blocks)] #![deny(unsafe_blocks)]
#![feature(macro_rules)]
unsafe fn allowed() {} unsafe fn allowed() {}
#[allow(unsafe_blocks)] fn also_allowed() { unsafe {} } #[allow(unsafe_blocks)] fn also_allowed() { unsafe {} }
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// //
// regression test for #8005 // regression test for #8005
#![feature(macro_rules)]
macro_rules! test { () => { fn foo() -> int { 1i; } } } macro_rules! test { () => { fn foo() -> int { 1i; } } }
//~^ ERROR not all control paths return a value //~^ ERROR not all control paths return a value
//~^^ HELP consider removing this semicolon //~^^ HELP consider removing this semicolon
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! ignored_item { macro_rules! ignored_item {
() => { () => {
fn foo() {} fn foo() {}
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! test { ($nm:ident, macro_rules! test { ($nm:ident,
#[$a:meta], #[$a:meta],
$i:item) => (mod $nm { #![$a] $i }); } $i:item) => (mod $nm { #![$a] $i }); }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! test { ($a, $b) => (()); } //~ ERROR Cannot transcribe macro_rules! test { ($a, $b) => (()); } //~ ERROR Cannot transcribe
fn main() { fn main() {
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! test { ($nm:ident, macro_rules! test { ($nm:ident,
#[$a:meta], #[$a:meta],
$i:item) => (mod $nm { #[$a] $i }); } $i:item) => (mod $nm { #[$a] $i }); }
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// forbid-output: in expansion of // forbid-output: in expansion of
#![feature(macro_rules)]
macro_rules! make_method { macro_rules! make_method {
($name:ident) => ( fn $name(&self) { } ) ($name:ident) => ( fn $name(&self) { } )
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! foo { () => ( x ) } macro_rules! foo { () => ( x ) }
fn main() { fn main() {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
// deeply nested types that will fail the `Send` check by overflow // deeply nested types that will fail the `Send` check by overflow
// when the recursion limit is set very low. // when the recursion limit is set very low.
#![feature(macro_rules)]
#![allow(dead_code)] #![allow(dead_code)]
#![recursion_limit="10"] #![recursion_limit="10"]
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// aux-build:svh-b.rs // aux-build:svh-b.rs
// aux-build:svh-a-change-lit.rs // aux-build:svh-a-change-lit.rs
#![feature(macro_rules)]
extern crate a; extern crate a;
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
//~^ NOTE: perhaps this crate needs to be recompiled //~^ NOTE: perhaps this crate needs to be recompiled
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// aux-build:svh-b.rs // aux-build:svh-b.rs
// aux-build:svh-a-change-significant-cfg.rs // aux-build:svh-a-change-significant-cfg.rs
#![feature(macro_rules)]
extern crate a; extern crate a;
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
//~^ NOTE: perhaps this crate needs to be recompiled //~^ NOTE: perhaps this crate needs to be recompiled
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// aux-build:svh-b.rs // aux-build:svh-b.rs
// aux-build:svh-a-change-trait-bound.rs // aux-build:svh-a-change-trait-bound.rs
#![feature(macro_rules)]
extern crate a; extern crate a;
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
//~^ NOTE: perhaps this crate needs to be recompiled //~^ NOTE: perhaps this crate needs to be recompiled
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// aux-build:svh-b.rs // aux-build:svh-b.rs
// aux-build:svh-a-change-type-arg.rs // aux-build:svh-a-change-type-arg.rs
#![feature(macro_rules)]
extern crate a; extern crate a;
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
//~^ NOTE: perhaps this crate needs to be recompiled //~^ NOTE: perhaps this crate needs to be recompiled
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// aux-build:svh-b.rs // aux-build:svh-b.rs
// aux-build:svh-a-change-type-ret.rs // aux-build:svh-a-change-type-ret.rs
#![feature(macro_rules)]
extern crate a; extern crate a;
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
//~^ NOTE: perhaps this crate needs to be recompiled //~^ NOTE: perhaps this crate needs to be recompiled
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// aux-build:svh-b.rs // aux-build:svh-b.rs
// aux-build:svh-a-change-type-static.rs // aux-build:svh-a-change-type-static.rs
#![feature(macro_rules)]
extern crate a; extern crate a;
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
//~^ NOTE: perhaps this crate needs to be recompiled //~^ NOTE: perhaps this crate needs to be recompiled
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules, trace_macros)] #![feature(trace_macros)]
fn main() { fn main() {
trace_macros!(); //~ ERROR trace_macros! accepts only `true` or `false` trace_macros!(); //~ ERROR trace_macros! accepts only `true` or `false`
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
fn macros() { fn macros() {
macro_rules! foo{ macro_rules! foo{
($p:pat, $e:expr, $b:block) => {{ ($p:pat, $e:expr, $b:block) => {{
......
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
// lldb-command:continue // lldb-command:continue
#![feature(macro_rules)]
#![omit_gdb_pretty_printer_section] #![omit_gdb_pretty_printer_section]
macro_rules! trivial { macro_rules! trivial {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
// minimal junk // minimal junk
#![no_std] #![no_std]
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
// minimal junk // minimal junk
#![no_std] #![no_std]
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
// Check that we do not ICE when compiling this // Check that we do not ICE when compiling this
// macro, which reuses the expression `$id` // macro, which reuses the expression `$id`
#![feature(macro_rules)]
struct Foo { struct Foo {
a: int a: int
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// check that cfg correctly chooses between the macro impls (see also // check that cfg correctly chooses between the macro impls (see also
// cfg-macros-notfoo.rs) // cfg-macros-notfoo.rs)
#![feature(macro_rules)]
#[cfg(foo)] #[cfg(foo)]
#[macro_use] #[macro_use]
mod foo { mod foo {
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
// check that cfg correctly chooses between the macro impls (see also // check that cfg correctly chooses between the macro impls (see also
// cfg-macros-foo.rs) // cfg-macros-foo.rs)
#![feature(macro_rules)]
#[cfg(foo)] #[cfg(foo)]
#[macro_use] #[macro_use]
mod foo { mod foo {
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
// Test that the lifetime of rvalues in for loops is extended // Test that the lifetime of rvalues in for loops is extended
// to the for loop itself. // to the for loop itself.
#![feature(macro_rules)]
use std::ops::Drop; use std::ops::Drop;
static mut FLAGS: u64 = 0; static mut FLAGS: u64 = 0;
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
// statement or end of block, as appropriate given the temporary // statement or end of block, as appropriate given the temporary
// lifetime rules. // lifetime rules.
#![feature(macro_rules)]
use std::ops::Drop; use std::ops::Drop;
static mut FLAGS: u64 = 0; static mut FLAGS: u64 = 0;
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
// no-pretty-expanded // no-pretty-expanded
#![allow(unused_must_use, dead_code, deprecated)] #![allow(unused_must_use, dead_code, deprecated)]
#![feature(macro_rules)]
use std::io::MemWriter; use std::io::MemWriter;
use std::fmt; use std::fmt;
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! assert_approx_eq { macro_rules! assert_approx_eq {
($a:expr, $b:expr) => ({ ($a:expr, $b:expr) => ({
use std::num::Float; use std::num::Float;
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
// General test that function items in static blocks // General test that function items in static blocks
// can be generated with a macro. // can be generated with a macro.
#![feature(macro_rules)]
struct MyType { struct MyType {
desc: &'static str, desc: &'static str,
data: uint, data: uint,
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
mod foo { mod foo {
pub trait Value { pub trait Value {
fn value(&self) -> uint; fn value(&self) -> uint;
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
// memory, which makes for some *confusing* logs. That's why these are here // memory, which makes for some *confusing* logs. That's why these are here
// instead of in std. // instead of in std.
#![feature(macro_rules)]
#![reexport_test_harness_main = "test_main"] #![reexport_test_harness_main = "test_main"]
extern crate libc; extern crate libc;
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! define_vec { macro_rules! define_vec {
() => ( () => (
mod foo { mod foo {
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
#[derive(Show)] #[derive(Show)]
struct Unit; struct Unit;
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! check { macro_rules! check {
($m:ident, $t:ty, $v:expr) => {{ ($m:ident, $t:ty, $v:expr) => {{
mod $m { mod $m {
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
use std::num::strconv::ExponentFormat::{ExpBin, ExpDec}; use std::num::strconv::ExponentFormat::{ExpBin, ExpDec};
use std::num::strconv::SignificantDigits::DigMax; use std::num::strconv::SignificantDigits::DigMax;
use std::num::strconv::SignFormat::{SignAll, SignNeg}; use std::num::strconv::SignFormat::{SignAll, SignNeg};
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// A test of the macro system. Can we do HTML literals? // A test of the macro system. Can we do HTML literals?
#![feature(macro_rules)]
/* /*
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-pretty: pprust doesn't print hygiene output // ignore-pretty: pprust doesn't print hygiene output
#![feature(macro_rules)]
macro_rules! loop_x { macro_rules! loop_x {
($e: expr) => { ($e: expr) => {
// $e shouldn't be able to interact with this 'x // $e shouldn't be able to interact with this 'x
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! loop_x { macro_rules! loop_x {
($e: expr) => { ($e: expr) => {
// $e shouldn't be able to interact with this 'x // $e shouldn't be able to interact with this 'x
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
// no-pretty-expanded unnecessary unsafe block generated // no-pretty-expanded unnecessary unsafe block generated
// ignore-lexer-test FIXME #15679 // ignore-lexer-test FIXME #15679
#![feature(macro_rules)]
#![deny(warnings)] #![deny(warnings)]
#![allow(unused_must_use)] #![allow(unused_must_use)]
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(globs, macro_rules, intrinsics)] #![feature(globs, intrinsics)]
macro_rules! assert_approx_eq { macro_rules! assert_approx_eq {
($a:expr, $b:expr) => ({ ($a:expr, $b:expr) => ({
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(asm, macro_rules)] #![feature(asm)]
type History = Vec<&'static str>; type History = Vec<&'static str>;
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-pretty // ignore-pretty
#![feature(macro_rules)]
macro_rules! third { macro_rules! third {
($e:expr) => ({let x = 2; $e[x]}) ($e:expr) => ({let x = 2; $e[x]})
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! inner { macro_rules! inner {
($e:pat ) => ($e) ($e:pat ) => ($e)
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! print_hd_tl { macro_rules! print_hd_tl {
($field_hd:ident, $($field_tl:ident),+) => ({ ($field_hd:ident, $($field_tl:ident),+) => ({
print!("{}", stringify!($field_hd)); print!("{}", stringify!($field_hd));
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
use std::default::Default; use std::default::Default;
pub struct X<T> { pub struct X<T> {
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
struct Element; struct Element;
macro_rules! foo { macro_rules! foo {
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
// with different mutability in macro in two methods // with different mutability in macro in two methods
#![allow(unused_variable)] // unused foobar_immut + foobar_mut #![allow(unused_variable)] // unused foobar_immut + foobar_mut
#![feature(macro_rules)]
trait FooBar {} trait FooBar {}
struct Bar(i32); struct Bar(i32);
struct Foo { bar: Bar } struct Foo { bar: Bar }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! sty { macro_rules! sty {
($t:ty) => (stringify!($t)) ($t:ty) => (stringify!($t))
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
// after fixing #9384 and implementing hygiene for match bindings, // after fixing #9384 and implementing hygiene for match bindings,
// this now fails because the insertion of the 'y' into the match // this now fails because the insertion of the 'y' into the match
// doesn't cause capture. Making this macro hygienic (as I've done) // doesn't cause capture. Making this macro hygienic (as I've done)
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! silly_macro { macro_rules! silly_macro {
() => ( () => (
pub mod Qux { pub mod Qux {
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-pretty // ignore-pretty
#![feature(macro_rules)]
pub trait bomb { fn boom(&self, Ident); } pub trait bomb { fn boom(&self, Ident); }
pub struct S; pub struct S;
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-test #9737 // ignore-test #9737
#![feature(macro_rules)]
macro_rules! f { macro_rules! f {
(v: $x:expr) => ( println!("{}", $x) ) (v: $x:expr) => ( println!("{}", $x) )
} }
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-test #9383 // ignore-test #9383
#![feature(macro_rules)]
// shouldn't affect evaluation of $ex: // shouldn't affect evaluation of $ex:
macro_rules! bad_macro { macro_rules! bad_macro {
($ex:expr) => ({(|_x| { $ex }) (9) }) ($ex:expr) => ({(|_x| { $ex }) (9) })
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
// shouldn't affect evaluation of $ex: // shouldn't affect evaluation of $ex:
macro_rules! bad_macro { macro_rules! bad_macro {
($ex:expr) => ({let _x = 9i; $ex}) ($ex:expr) => ({let _x = 9i; $ex})
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-pretty - token trees can't pretty print // ignore-pretty - token trees can't pretty print
#![feature(macro_rules)]
pub fn main() { pub fn main() {
macro_rules! mylambda_tt { macro_rules! mylambda_tt {
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-pretty - token trees can't pretty print // ignore-pretty - token trees can't pretty print
#![feature(macro_rules)]
macro_rules! descriptions { macro_rules! descriptions {
($name:ident is $desc:expr) => { ($name:ident is $desc:expr) => {
// Check that we will correctly expand attributes // Check that we will correctly expand attributes
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
// ignore-pretty - token trees can't pretty print // ignore-pretty - token trees can't pretty print
#![feature(macro_rules)]
macro_rules! compiles_fine { macro_rules! compiles_fine {
(#[$at:meta]) => { (#[$at:meta]) => {
// test that the different types of attributes work // test that the different types of attributes work
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! do_block{ macro_rules! do_block{
($val:block) => {$val} ($val:block) => {$val}
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
pub fn increment(x: uint) -> uint { pub fn increment(x: uint) -> uint {
x + 1 x + 1
} }
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![feature(macro_rules)]
macro_rules! foo2 { macro_rules! foo2 {
() => { () => {
"foo" "foo"
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册