about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-09-10 01:54:51 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-09-10 03:35:47 +0300
commit615eaba14b51adb177a2e249354ae7c35d51e403 (patch)
treebca658a31a4ed0137bcad2632f3d125bd184a505 /src/test/ui
parent2d4e34ca8bb1369f7e0eea4cb50e6faa0827a6e5 (diff)
downloadrust-615eaba14b51adb177a2e249354ae7c35d51e403.tar.gz
rust-615eaba14b51adb177a2e249354ae7c35d51e403.zip
Feature gate non-builtin attributes in inner attribute position
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-bench.rs2
-rw-r--r--src/test/ui/span/issue-36530.rs3
-rw-r--r--src/test/ui/span/issue-36530.stderr14
3 files changed, 16 insertions, 3 deletions
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs b/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs
index 6c226799338..d0adcf4025f 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs
@@ -20,6 +20,8 @@
 // See issue-12997-1.rs and issue-12997-2.rs to see how `#[bench]` is
 // handled in "weird places" when `--test` is passed.
 
+#![feature(custom_inner_attributes)]
+
 #![bench                   = "4100"]
 
 fn main() { }
diff --git a/src/test/ui/span/issue-36530.rs b/src/test/ui/span/issue-36530.rs
index c6cdb8b6db7..fbe1535caae 100644
--- a/src/test/ui/span/issue-36530.rs
+++ b/src/test/ui/span/issue-36530.rs
@@ -8,7 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// gate-test-custom_inner_attributes
+
 #[foo] //~ ERROR is currently unknown to the compiler
 mod foo {
     #![foo] //~ ERROR is currently unknown to the compiler
+            //~| ERROR non-builtin inner attributes are unstable
 }
diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr
index e7dd8e7aa8f..78d81ad0493 100644
--- a/src/test/ui/span/issue-36530.stderr
+++ b/src/test/ui/span/issue-36530.stderr
@@ -1,19 +1,27 @@
 error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
-  --> $DIR/issue-36530.rs:11:3
+  --> $DIR/issue-36530.rs:13:3
    |
 LL | #[foo] //~ ERROR is currently unknown to the compiler
    |   ^^^
    |
    = help: add #![feature(custom_attribute)] to the crate attributes to enable
 
+error[E0658]: non-builtin inner attributes are unstable (see issue #38356)
+  --> $DIR/issue-36530.rs:15:5
+   |
+LL |     #![foo] //~ ERROR is currently unknown to the compiler
+   |     ^^^^^^^
+   |
+   = help: add #![feature(custom_inner_attributes)] to the crate attributes to enable
+
 error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
-  --> $DIR/issue-36530.rs:13:8
+  --> $DIR/issue-36530.rs:15:8
    |
 LL |     #![foo] //~ ERROR is currently unknown to the compiler
    |        ^^^
    |
    = help: add #![feature(custom_attribute)] to the crate attributes to enable
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0658`.