mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-25 06:56:50 +00:00
Update tests to use #[feature(rustc_attrs)]
This commit is contained in:
parent
cc61f9c1d5
commit
9f8b9d6847
@ -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.
|
||||
|
@ -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,
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#![deny(bivariance)]
|
||||
#![allow(dead_code)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
use std::cell::Cell;
|
||||
|
||||
|
@ -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 ()>)
|
||||
|
@ -12,6 +12,7 @@
|
||||
// they permit lifetimes to be approximated as expected.
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
struct SomeStruct<T>(fn(T));
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
// be shortened.
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
struct SomeStruct<T>(T);
|
||||
|
||||
|
@ -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 ()>)
|
||||
|
Loading…
Reference in New Issue
Block a user