提交 947f6ca4 编写于 作者: F Flavio Percoco

Feature gate macro_reexport. Fixes #20906

上级 c5961ad0
......@@ -114,7 +114,6 @@
#![feature(old_impl_check)]
#![feature(optin_builtin_traits)]
#![feature(int_uint)]
#![feature(int_uint)]
#![feature(core)]
#![feature(libc)]
#![feature(alloc)]
......@@ -123,6 +122,7 @@
#![feature(rand)]
#![feature(hash)]
#![cfg_attr(test, feature(test))]
#![feature(macro_reexport)]
// Don't link to std. We are std.
#![no_std]
......
......@@ -109,6 +109,9 @@
// int and uint are now deprecated
("int_uint", "1.0.0", Active),
// macro reexport needs more discusion and stabilization
("macro_reexport", Active),
// These are used to test this portion of the compiler, they don't actually
// mean anything
("test_accepted_feature", "1.0.0", Accepted),
......@@ -272,6 +275,10 @@ fn visit_item(&mut self, i: &ast::Item) {
self.gate_feature("plugin", i.span,
"compiler plugins are experimental \
and possibly buggy");
} else if attr::contains_name(&i.attrs[], "macro_reexport") {
self.gate_feature("macro_reexport", i.span,
"macros reexports are experimental \
and possibly buggy");
}
}
......
......@@ -9,6 +9,7 @@
// except according to those terms.
#![crate_type = "dylib"]
#![feature(macro_reexport)]
#[macro_reexport(reexported)]
#[macro_use] #[no_link]
......
......@@ -9,6 +9,7 @@
// except according to those terms.
#![crate_type = "dylib"]
#![feature(macro_reexport)]
#[macro_reexport(reexported)]
#[no_link]
......
......@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(macro_reexport)]
#[macro_reexport] //~ ERROR bad macro reexport
extern crate std;
......
......@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(macro_reexport)]
#[macro_reexport="foo"] //~ ERROR bad macro reexport
extern crate std;
......
......@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(macro_reexport)]
#[macro_reexport(foo="bar")] //~ ERROR bad macro reexport
extern crate std;
......
......@@ -11,6 +11,8 @@
// aux-build:macro_reexport_1.rs
// ignore-stage1
#![feature(macro_reexport)]
#[macro_reexport(reexported)]
#[no_link]
extern crate macro_reexport_1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册