Skip to content

Commit 9f8b9d6

Browse files
committed
Update tests to use #[feature(rustc_attrs)]
1 parent cc61f9c commit 9f8b9d6

7 files changed

+10
-0
lines changed

Diff for: src/test/compile-fail/variance-trait-bounds.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#![deny(bivariance)]
1212
#![allow(dead_code)]
13+
#![feature(rustc_attrs)]
1314

1415
// Check that bounds on type parameters (other than `Self`) do not
1516
// influence variance.

Diff for: src/test/compile-fail/variance-types-bounds.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we correctly infer variance for type parameters in
1212
// various types and traits.
1313

14+
#![feature(rustc_attrs)]
15+
1416
#[rustc_variance]
1517
struct TestImm<A, B> { //~ ERROR types=[[+, +];[];[]]
1618
x: A,

Diff for: src/test/compile-fail/variance-types.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#![deny(bivariance)]
1212
#![allow(dead_code)]
13+
#![feature(rustc_attrs)]
1314

1415
use std::cell::Cell;
1516

Diff for: src/test/compile-fail/variance-use-contravariant-struct-1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test various uses of structs with distint variances to make sure
1212
// they permit lifetimes to be approximated as expected.
1313

14+
#![feature(rustc_attrs)]
15+
1416
struct SomeStruct<T>(fn(T));
1517

1618
fn foo<'min,'max>(v: SomeStruct<&'max ()>)

Diff for: src/test/compile-fail/variance-use-contravariant-struct-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// they permit lifetimes to be approximated as expected.
1313

1414
#![allow(dead_code)]
15+
#![feature(rustc_attrs)]
1516

1617
struct SomeStruct<T>(fn(T));
1718

Diff for: src/test/compile-fail/variance-use-covariant-struct-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// be shortened.
1313

1414
#![allow(dead_code)]
15+
#![feature(rustc_attrs)]
1516

1617
struct SomeStruct<T>(T);
1718

Diff for: src/test/compile-fail/variance-use-invariant-struct-1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test various uses of structs with distint variances to make sure
1212
// they permit lifetimes to be approximated as expected.
1313

14+
#![feature(rustc_attrs)]
15+
1416
struct SomeStruct<T>(*mut T);
1517

1618
fn foo<'min,'max>(v: SomeStruct<&'max ()>)

0 commit comments

Comments
 (0)