From 9f8b9d6847ab02f7f1c28c84988ceae4c0a10f26 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 18 Feb 2015 17:31:42 -0500 Subject: [PATCH] Update tests to use #[feature(rustc_attrs)] --- src/test/compile-fail/variance-trait-bounds.rs | 1 + src/test/compile-fail/variance-types-bounds.rs | 2 ++ src/test/compile-fail/variance-types.rs | 1 + src/test/compile-fail/variance-use-contravariant-struct-1.rs | 2 ++ src/test/compile-fail/variance-use-contravariant-struct-2.rs | 1 + src/test/compile-fail/variance-use-covariant-struct-2.rs | 1 + src/test/compile-fail/variance-use-invariant-struct-1.rs | 2 ++ 7 files changed, 10 insertions(+) diff --git a/src/test/compile-fail/variance-trait-bounds.rs b/src/test/compile-fail/variance-trait-bounds.rs index 66197947923..88b50058b65 100644 --- a/src/test/compile-fail/variance-trait-bounds.rs +++ b/src/test/compile-fail/variance-trait-bounds.rs @@ -10,6 +10,7 @@ #![deny(bivariance)] #![allow(dead_code)] +#![feature(rustc_attrs)] // Check that bounds on type parameters (other than `Self`) do not // influence variance. diff --git a/src/test/compile-fail/variance-types-bounds.rs b/src/test/compile-fail/variance-types-bounds.rs index c60649878fe..d53e4cd7610 100644 --- a/src/test/compile-fail/variance-types-bounds.rs +++ b/src/test/compile-fail/variance-types-bounds.rs @@ -11,6 +11,8 @@ // Test that we correctly infer variance for type parameters in // various types and traits. +#![feature(rustc_attrs)] + #[rustc_variance] struct TestImm { //~ ERROR types=[[+, +];[];[]] x: A, diff --git a/src/test/compile-fail/variance-types.rs b/src/test/compile-fail/variance-types.rs index 6f6dd727692..e407ebe345a 100644 --- a/src/test/compile-fail/variance-types.rs +++ b/src/test/compile-fail/variance-types.rs @@ -10,6 +10,7 @@ #![deny(bivariance)] #![allow(dead_code)] +#![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/compile-fail/variance-use-contravariant-struct-1.rs b/src/test/compile-fail/variance-use-contravariant-struct-1.rs index 21a9e2477df..d2fd2978750 100644 --- a/src/test/compile-fail/variance-use-contravariant-struct-1.rs +++ b/src/test/compile-fail/variance-use-contravariant-struct-1.rs @@ -11,6 +11,8 @@ // Test various uses of structs with distint variances to make sure // they permit lifetimes to be approximated as expected. +#![feature(rustc_attrs)] + struct SomeStruct(fn(T)); fn foo<'min,'max>(v: SomeStruct<&'max ()>) diff --git a/src/test/compile-fail/variance-use-contravariant-struct-2.rs b/src/test/compile-fail/variance-use-contravariant-struct-2.rs index dd80ac91683..b38fd0e9ffc 100644 --- a/src/test/compile-fail/variance-use-contravariant-struct-2.rs +++ b/src/test/compile-fail/variance-use-contravariant-struct-2.rs @@ -12,6 +12,7 @@ // they permit lifetimes to be approximated as expected. #![allow(dead_code)] +#![feature(rustc_attrs)] struct SomeStruct(fn(T)); diff --git a/src/test/compile-fail/variance-use-covariant-struct-2.rs b/src/test/compile-fail/variance-use-covariant-struct-2.rs index f85f7bb6a38..d8e1a5f5f1c 100644 --- a/src/test/compile-fail/variance-use-covariant-struct-2.rs +++ b/src/test/compile-fail/variance-use-covariant-struct-2.rs @@ -12,6 +12,7 @@ // be shortened. #![allow(dead_code)] +#![feature(rustc_attrs)] struct SomeStruct(T); diff --git a/src/test/compile-fail/variance-use-invariant-struct-1.rs b/src/test/compile-fail/variance-use-invariant-struct-1.rs index b544ef00fc0..c89436b2094 100644 --- a/src/test/compile-fail/variance-use-invariant-struct-1.rs +++ b/src/test/compile-fail/variance-use-invariant-struct-1.rs @@ -11,6 +11,8 @@ // Test various uses of structs with distint variances to make sure // they permit lifetimes to be approximated as expected. +#![feature(rustc_attrs)] + struct SomeStruct(*mut T); fn foo<'min,'max>(v: SomeStruct<&'max ()>)