Skip to content

Commit 0001817

Browse files
committed
Add custom_attribute gate to tests which need them
1 parent 237ae45 commit 0001817

14 files changed

+22
-1
lines changed

src/test/compile-fail/lint-obsolete-attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#![deny(unused_attributes)]
1515
#![allow(dead_code)]
16+
#![feature(custom_attribute)]
1617

1718
#[abi="stdcall"] extern {} //~ ERROR unused attribute
1819

src/test/compile-fail/lint-unknown-attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// When denying at the crate level, be sure to not get random warnings from the
1212
// injected intrinsics by the compiler.
1313

14+
#![feature(custom_attribute)]
1415
#![deny(unused_attributes)]
1516

1617
#![mutable_doc] //~ ERROR unused attribute

src/test/compile-fail/macro-inner-attributes.rs

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

11+
#![feature(custom_attribute)]
12+
1113
macro_rules! test { ($nm:ident,
1214
#[$a:meta],
1315
$i:item) => (mod $nm { #![$a] $i }); }

src/test/compile-fail/macro-outer-attributes.rs

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

11+
#![feature(custom_attribute)]
12+
1113
macro_rules! test { ($nm:ident,
1214
#[$a:meta],
1315
$i:item) => (mod $nm { #[$a] $i }); }

src/test/compile-fail/unused-attr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
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+
1011
#![deny(unused_attributes)]
1112
#![allow(dead_code, unused_imports)]
12-
#![feature(core)]
13+
#![feature(core, custom_attribute)]
1314

1415
#![foo] //~ ERROR unused attribute
1516

src/test/run-pass/attr-before-view-item.rs

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

1111
// error-pattern:expected item
1212

13+
#![feature(custom_attribute)]
14+
1315
#[foo = "bar"]
1416
extern crate test;
1517

src/test/run-pass/attr-before-view-item2.rs

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

1111
// error-pattern:expected item
1212

13+
#![feature(custom_attribute)]
14+
1315
mod m {
1416
#[foo = "bar"]
1517
extern crate test;

src/test/run-pass/attr-mix-new.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010
#![allow(unused_attribute)]
11+
#![feature(custom_attribute)]
1112

1213
#[foo(bar)]
1314
mod foo {

src/test/run-pass/check-static-recursion-foreign.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// Static recursion check shouldn't fail when given a foreign item (#18279)
1212

1313
// aux-build:check_static_recursion_foreign_helper.rs
14+
15+
#![feature(custom_attribute)]
16+
1417
extern crate check_static_recursion_foreign_helper;
1518
extern crate libc;
1619

src/test/run-pass/class-attributes-1.rs

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

1111
// pp-exact - Make sure we actually print the attributes
1212
#![allow(unused_attribute)]
13+
#![feature(custom_attribute)]
1314

1415
struct cat {
1516
name: String,

src/test/run-pass/class-attributes-2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010
#![allow(unused_attribute)]
11+
#![feature(custom_attribute)]
1112

1213
struct cat {
1314
name: String,

src/test/run-pass/item-attributes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// These are attributes of the implicit crate. Really this just needs to parse
1212
// for completeness since .rs files linked from .rc files support this
1313
// notation to specify their module's attributes
14+
15+
#![feature(custom_attribute)]
1416
#![allow(unused_attribute)]
1517
#![attr1 = "val"]
1618
#![attr2 = "val"]

src/test/run-pass/method-attributes.rs

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

1111
// pp-exact - Make sure we print all the attributes
1212
#![allow(unused_attribute)]
13+
#![feature(custom_attribute)]
1314

1415
#[frobable]
1516
trait frobable {

src/test/run-pass/variant-attributes.rs

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

1111
// pp-exact - Make sure we actually print the attributes
12+
#![feature(custom_attribute)]
1213

1314
enum crew_of_enterprise_d {
1415

0 commit comments

Comments
 (0)