@@ -168,17 +168,17 @@ in Rust, though it does in fact exist.
168
168
Here is a table of important variances which the rest of this section will be devoted
169
169
to trying to explain:
170
170
171
- | | | 'a | T | U |
172
- | ---| ---------------| :---------:| :-----------------:| :---------:|
173
- | * | &'a T | covariant | covariant | |
174
- | * | &'a mut T | covariant | invariant | |
175
- | * | Box<T > | | covariant | |
176
- | | Vec<T > | | covariant | |
177
- | * | UnsafeCell<T > | | invariant | |
178
- | | Cell<T > | | invariant | |
179
- | * | fn(T) -> U | | ** contra** variant | covariant |
180
- | | * const T | | covariant | |
181
- | | * mut T | | invariant | |
171
+ | | | 'a | T | U |
172
+ | ---| ----------------- | :---------:| :-----------------:| :---------:|
173
+ | * | ` &'a T ` | covariant | covariant | |
174
+ | * | ` &'a mut T ` | covariant | invariant | |
175
+ | * | ` Box<T> ` | | covariant | |
176
+ | | ` Vec<T> ` | | covariant | |
177
+ | * | ` UnsafeCell<T> ` | | invariant | |
178
+ | | ` Cell<T> ` | | invariant | |
179
+ | * | ` fn(T) -> U ` | | ** contra** variant | covariant |
180
+ | | ` *const T ` | | covariant | |
181
+ | | ` *mut T ` | | invariant | |
182
182
183
183
The types with \* 's are the ones we will be focusing on, as they are in
184
184
some sense "fundamental". All the others can be understood by analogy to the others:
0 commit comments