about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-12 12:10:10 +0000
committerbors <bors@rust-lang.org>2019-02-12 12:10:10 +0000
commitc84e7976423bb910bb5eb5eecffc7e33a897a97f (patch)
tree24570884cb7742fe817286a3cde2643722eb8c6a /src/test
parenta54b5c7a645ead203d77e78245362f9e0f00dd3c (diff)
parentbbe524d7c1a1028737a93c7c71c508a68363b681 (diff)
downloadrust-c84e7976423bb910bb5eb5eecffc7e33a897a97f.tar.gz
rust-c84e7976423bb910bb5eb5eecffc7e33a897a97f.zip
Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkov
Require a list of features in `#[allow_internal_unstable]`

The blanket-permission slip is not great and will likely give us trouble some point down the road.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass-fulldeps/auxiliary/plugin_args.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-allow-internal-unstable.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr4
-rw-r--r--src/test/ui/internal/auxiliary/internal_unstable.rs10
-rw-r--r--src/test/ui/internal/internal-unstable.rs2
9 files changed, 16 insertions, 16 deletions
diff --git a/src/test/run-pass-fulldeps/auxiliary/plugin_args.rs b/src/test/run-pass-fulldeps/auxiliary/plugin_args.rs
index eab612c5dfb..309acb25184 100644
--- a/src/test/run-pass-fulldeps/auxiliary/plugin_args.rs
+++ b/src/test/run-pass-fulldeps/auxiliary/plugin_args.rs
@@ -43,7 +43,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
         NormalTT {
             expander: Box::new(Expander { args: args, }),
             def_info: None,
-            allow_internal_unstable: false,
+            allow_internal_unstable: None,
             allow_internal_unsafe: false,
             local_inner_macros: false,
             unstable_feature: None,
diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.rs b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.rs
index cf320b2747c..ee48f951629 100644
--- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.rs
+++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.rs
@@ -5,7 +5,7 @@
 macro_rules! bar {
     () => {
         // more layers don't help:
-        #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+        #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
         macro_rules! baz {
             () => {}
         }
diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr
index 7cdf743b279..802c74239d7 100644
--- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr
+++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr
@@ -1,8 +1,8 @@
 error[E0658]: allow_internal_unstable side-steps feature gating and stability checks
   --> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:8:9
    |
-LL |         #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ...
 LL | bar!();
    | ------- in this macro invocation
diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.rs b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.rs
index c9ea6c338b5..ede969097d5 100644
--- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.rs
+++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.rs
@@ -1,7 +1,7 @@
 // checks that this attribute is caught on non-macro items.
 // this needs a different test since this is done after expansion
 
-#[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+#[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
 struct S;
 
 fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr
index 485c00ad42b..d619f1e3239 100644
--- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr
+++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr
@@ -1,8 +1,8 @@
 error[E0658]: allow_internal_unstable side-steps feature gating and stability checks
   --> $DIR/feature-gate-allow-internal-unstable-struct.rs:4:1
    |
-LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
 
diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.rs b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.rs
index bea60fc012e..0a1b6acd9bf 100644
--- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.rs
+++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.rs
@@ -1,6 +1,6 @@
 #![allow(unused_macros)]
 
-#[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+#[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
 macro_rules! foo {
     () => {}
 }
diff --git a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr
index 0533d071de3..aa4f6648c4f 100644
--- a/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr
+++ b/src/test/ui/feature-gates/feature-gate-allow-internal-unstable.stderr
@@ -1,8 +1,8 @@
 error[E0658]: allow_internal_unstable side-steps feature gating and stability checks
   --> $DIR/feature-gate-allow-internal-unstable.rs:3:1
    |
-LL | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[allow_internal_unstable()] //~ ERROR allow_internal_unstable side-steps
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
 
diff --git a/src/test/ui/internal/auxiliary/internal_unstable.rs b/src/test/ui/internal/auxiliary/internal_unstable.rs
index 7cf54c3e6a6..7c79dcb7522 100644
--- a/src/test/ui/internal/auxiliary/internal_unstable.rs
+++ b/src/test/ui/internal/auxiliary/internal_unstable.rs
@@ -23,14 +23,14 @@ pub struct Bar {
 }
 
 #[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
+#[allow_internal_unstable(function)]
 #[macro_export]
 macro_rules! call_unstable_allow {
     () => { $crate::unstable() }
 }
 
 #[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
+#[allow_internal_unstable(struct_field)]
 #[macro_export]
 macro_rules! construct_unstable_allow {
     ($e: expr) => {
@@ -39,21 +39,21 @@ macro_rules! construct_unstable_allow {
 }
 
 #[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
+#[allow_internal_unstable(method)]
 #[macro_export]
 macro_rules! call_method_allow {
     ($e: expr) => { $e.method() }
 }
 
 #[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
+#[allow_internal_unstable(struct_field, struct2_field)]
 #[macro_export]
 macro_rules! access_field_allow {
     ($e: expr) => { $e.x }
 }
 
 #[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
+#[allow_internal_unstable()]
 #[macro_export]
 macro_rules! pass_through_allow {
     ($e: expr) => { $e }
diff --git a/src/test/ui/internal/internal-unstable.rs b/src/test/ui/internal/internal-unstable.rs
index 34fef33bfeb..e09a5d89172 100644
--- a/src/test/ui/internal/internal-unstable.rs
+++ b/src/test/ui/internal/internal-unstable.rs
@@ -13,7 +13,7 @@ macro_rules! foo {
     }}
 }
 
-#[allow_internal_unstable]
+#[allow_internal_unstable(function)]
 macro_rules! bar {
     ($e: expr) => {{
         foo!($e,