2 #![feature(rustc_attrs)]
6 // Check that a type parameter which is only used in a trait bound is
7 // not considered bivariant.
10 struct InvariantMut<'a,A:'a,B:'a> { //~ ERROR [-, o, o]
15 struct InvariantCell<A> { //~ ERROR [o]
20 struct InvariantIndirect<A> { //~ ERROR [o]
25 struct Covariant<A> { //~ ERROR [+]
30 struct Contravariant<A> { //~ ERROR [-]
35 enum Enum<A,B,C> { //~ ERROR [+, -, o]
37 Bar(Contravariant<B>),
38 Zed(Covariant<C>,Contravariant<C>)