diff --git a/src/subtyping.md b/src/subtyping.md index 9cbf2af..b5ce948 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -64,13 +64,13 @@ For instance `Vec` is a type constructor that takes a `T` and returns a `Vec`. `&` and `&mut` are type constructors that take two inputs: a lifetime, and a type to point to. -A type constructor's *variance* is how the subtyping of its inputs affects the +A type constructor F's *variance* is how the subtyping of its inputs affects the subtyping of its outputs. There are three kinds of variance in Rust: * F is *covariant* over `T` if `T` being a subtype of `U` implies `F` is a subtype of `F` (subtyping "passes through") * F is *contravariant* over `T` if `T` being a subtype of `U` implies - `F` is a subtype of `F` (subtyping is "inverted") + `F` is a subtype of `F` (subtyping is "inverted") * F is *invariant* over `T` otherwise (no subtyping relation can be derived) It should be noted that covariance is *far* more common and important than