Skip to content

Commit 510938c

Browse files
conradludgateehuss
authored andcommitted
remove use of transitive
1 parent 8e129cc commit 510938c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/subtyping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Now that we have a defined set of requirements for lifetimes, we can define how
7474
`'a` may define a region larger than `'b`, but that still fits our definition.
7575
Going back to our example above, we can say that `'static: 'b`.
7676

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)),
7878
eg. `&'static str` is a subtype of `&'b str`, then we can let them coerce, and then the example above will compile
7979

8080
```rust
@@ -120,7 +120,7 @@ However, the implementation of `assign` is valid.
120120
Therefore, this must mean that `&mut &'static str` should **not** a *subtype* of `&mut &'b str`,
121121
even if `'static` is a subtype of `'b`.
122122

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*.
124124
A type constructor in Rust is any generic type with unbound arguments.
125125
For instance `Vec` is a type constructor that takes a type `T` and returns
126126
`Vec<T>`. `&` and `&mut` are type constructors that take two inputs: a

0 commit comments

Comments
 (0)