File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ Now that we have a defined set of requirements for lifetimes, we can define how
74
74
` 'a ` may define a region larger than ` 'b ` , but that still fits our definition.
75
75
Going back to our example above, we can say that ` 'static: 'b ` .
76
76
77
- For now, let's accept the idea that subtypes of lifetimes can be transitive (more on this in [ Variance] ( #variance ) ),
77
+ For now, let's accept the idea that subtypes of lifetimes can be passed through references (more on this in [ Variance] ( #variance ) ),
78
78
eg. ` &'static str ` is a subtype of ` &'b str ` , then we can let them coerce, and then the example above will compile
79
79
80
80
``` rust
@@ -120,7 +120,7 @@ However, the implementation of `assign` is valid.
120
120
Therefore, this must mean that ` &mut &'static str ` should ** not** a * subtype* of ` &mut &'b str ` ,
121
121
even if ` 'static ` is a subtype of ` 'b ` .
122
122
123
- Variance is the way that Rust defines the transitivity of subtypes through their * type constructor* .
123
+ Variance is the way that Rust defines the relationships of subtypes through their * type constructor* .
124
124
A type constructor in Rust is any generic type with unbound arguments.
125
125
For instance ` Vec ` is a type constructor that takes a type ` T ` and returns
126
126
` Vec<T> ` . ` & ` and ` &mut ` are type constructors that take two inputs: a
You can’t perform that action at this time.
0 commit comments