Add custom_attribute gate to tests which need them

This commit is contained in:
Manish Goregaokar 2015-02-14 16:15:43 +05:30
parent 237ae450bf
commit 0001817485
14 changed files with 22 additions and 1 deletions

View file

@ -13,6 +13,7 @@
#![deny(unused_attributes)]
#![allow(dead_code)]
#![feature(custom_attribute)]
#[abi="stdcall"] extern {} //~ ERROR unused attribute

View file

@ -11,6 +11,7 @@
// When denying at the crate level, be sure to not get random warnings from the
// injected intrinsics by the compiler.
#![feature(custom_attribute)]
#![deny(unused_attributes)]
#![mutable_doc] //~ ERROR unused attribute

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(custom_attribute)]
macro_rules! test { ($nm:ident,
#[$a:meta],
$i:item) => (mod $nm { #![$a] $i }); }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(custom_attribute)]
macro_rules! test { ($nm:ident,
#[$a:meta],
$i:item) => (mod $nm { #[$a] $i }); }

View file

@ -7,9 +7,10 @@
// <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.
#![deny(unused_attributes)]
#![allow(dead_code, unused_imports)]
#![feature(core)]
#![feature(core, custom_attribute)]
#![foo] //~ ERROR unused attribute

View file

@ -10,6 +10,8 @@
// error-pattern:expected item
#![feature(custom_attribute)]
#[foo = "bar"]
extern crate test;

View file

@ -10,6 +10,8 @@
// error-pattern:expected item
#![feature(custom_attribute)]
mod m {
#[foo = "bar"]
extern crate test;

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(unused_attribute)]
#![feature(custom_attribute)]
#[foo(bar)]
mod foo {

View file

@ -11,6 +11,9 @@
// Static recursion check shouldn't fail when given a foreign item (#18279)
// aux-build:check_static_recursion_foreign_helper.rs
#![feature(custom_attribute)]
extern crate check_static_recursion_foreign_helper;
extern crate libc;

View file

@ -10,6 +10,7 @@
// pp-exact - Make sure we actually print the attributes
#![allow(unused_attribute)]
#![feature(custom_attribute)]
struct cat {
name: String,

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(unused_attribute)]
#![feature(custom_attribute)]
struct cat {
name: String,

View file

@ -11,6 +11,8 @@
// These are attributes of the implicit crate. Really this just needs to parse
// for completeness since .rs files linked from .rc files support this
// notation to specify their module's attributes
#![feature(custom_attribute)]
#![allow(unused_attribute)]
#![attr1 = "val"]
#![attr2 = "val"]

View file

@ -10,6 +10,7 @@
// pp-exact - Make sure we print all the attributes
#![allow(unused_attribute)]
#![feature(custom_attribute)]
#[frobable]
trait frobable {

View file

@ -9,6 +9,7 @@
// except according to those terms.
// pp-exact - Make sure we actually print the attributes
#![feature(custom_attribute)]
enum crew_of_enterprise_d {