#![deny(bivariance)]
#![allow(dead_code)]
+#![feature(rustc_attrs)]
// Check that bounds on type parameters (other than `Self`) do not
// influence variance.
// 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,
#![deny(bivariance)]
#![allow(dead_code)]
+#![feature(rustc_attrs)]
use std::cell::Cell;
// 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 ()>)
// they permit lifetimes to be approximated as expected.
#![allow(dead_code)]
+#![feature(rustc_attrs)]
struct SomeStruct<T>(fn(T));
// be shortened.
#![allow(dead_code)]
+#![feature(rustc_attrs)]
struct SomeStruct<T>(T);
// 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 ()>)