Skip to content

Commit 479021b

Browse files
Merge pull request #874 from Kimundi/patch-1
Add an extra fn() entry to the variance table in the subtyping chapter
2 parents 346472c + 0f6186d commit 479021b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/subtyping.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Variance of types is automatically determined as follows
6161
| `[T]` and `[T; n]` | | covariant |
6262
| `fn() -> T` | | covariant |
6363
| `fn(T) -> ()` | | contravariant |
64+
| `fn(T) -> T` | | invariant |
6465
| `std::cell::UnsafeCell<T>` | | invariant |
6566
| `std::marker::PhantomData<T>` | | covariant |
6667
| `dyn Trait<T> + 'a` | covariant | invariant |

0 commit comments

Comments
 (0)