blob: 59975fa7a7ed4a5d0eb6751b56f4159f7b8c9693 [file] [log] [blame]
error[E0208]: [-, o, o]
--> $DIR/variance-types.rs:20:1
|
LL | / struct InvariantMut<'a,A:'a,B:'a> { //~ ERROR [-, o, o]
LL | | t: &'a mut (A,B)
LL | | }
| |_^
error[E0208]: [o]
--> $DIR/variance-types.rs:25:1
|
LL | / struct InvariantCell<A> { //~ ERROR [o]
LL | | t: Cell<A>
LL | | }
| |_^
error[E0208]: [o]
--> $DIR/variance-types.rs:30:1
|
LL | / struct InvariantIndirect<A> { //~ ERROR [o]
LL | | t: InvariantCell<A>
LL | | }
| |_^
error[E0208]: [+]
--> $DIR/variance-types.rs:35:1
|
LL | / struct Covariant<A> { //~ ERROR [+]
LL | | t: A, u: fn() -> A
LL | | }
| |_^
error[E0208]: [-]
--> $DIR/variance-types.rs:40:1
|
LL | / struct Contravariant<A> { //~ ERROR [-]
LL | | t: fn(A)
LL | | }
| |_^
error[E0208]: [+, -, o]
--> $DIR/variance-types.rs:45:1
|
LL | / enum Enum<A,B,C> { //~ ERROR [+, -, o]
LL | | Foo(Covariant<A>),
LL | | Bar(Contravariant<B>),
LL | | Zed(Covariant<C>,Contravariant<C>)
LL | | }
| |_^
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0208`.