Update tests to use #[feature(rustc_attrs)]

This commit is contained in:
Niko Matsakis 2015-02-18 17:31:42 -05:00
parent cc61f9c1d5
commit 9f8b9d6847
7 changed files with 10 additions and 0 deletions

View File

@ -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.

View File

@ -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<A, B> { //~ ERROR types=[[+, +];[];[]]
x: A,

View File

@ -10,6 +10,7 @@
#![deny(bivariance)]
#![allow(dead_code)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View File

@ -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<T>(fn(T));
fn foo<'min,'max>(v: SomeStruct<&'max ()>)

View File

@ -12,6 +12,7 @@
// they permit lifetimes to be approximated as expected.
#![allow(dead_code)]
#![feature(rustc_attrs)]
struct SomeStruct<T>(fn(T));

View File

@ -12,6 +12,7 @@
// be shortened.
#![allow(dead_code)]
#![feature(rustc_attrs)]
struct SomeStruct<T>(T);

View File

@ -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<T>(*mut T);
fn foo<'min,'max>(v: SomeStruct<&'max ()>)