Skip to content

Commit

Permalink
Fix typo/minor grammar error in subtyping.md (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnall authored Oct 7, 2021
1 parent 650d245 commit 2d66852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/subtyping.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ And that's why function types, unlike anything else in the language, are
**contra**variant over their arguments.

Now, this is all well and good for the types the standard library provides, but
how is variance determined for type that *you* define? A struct, informally
how is variance determined for types that *you* define? A struct, informally
speaking, inherits the variance of its fields. If a struct `MyType`
has a generic argument `A` that is used in a field `a`, then MyType's variance
over `A` is exactly `a`'s variance over `A`.
Expand Down

0 comments on commit 2d66852

Please sign in to comment.