Merge pull request #874 from Kimundi/patch-1

Add an extra fn() entry to the variance table in the subtyping chapter
This commit is contained in:
Ryan Scheel 2021-02-22 22:09:17 -08:00 committed by GitHub
commit 3b6fe80c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ Variance of types is automatically determined as follows
| `[T]` and `[T; n]` | | covariant |
| `fn() -> T` | | covariant |
| `fn(T) -> ()` | | contravariant |
| `fn(T) -> T` | | invariant |
| `std::cell::UnsafeCell<T>` | | invariant |
| `std::marker::PhantomData<T>` | | covariant |
| `dyn Trait<T> + 'a` | covariant | invariant |