Skip to content

Commit f27e769

Browse files
committed
Fix nits
1 parent 8474222 commit f27e769

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

text/0000-re-rebalancing-coherence.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ local or not has nothing to do with type parameters. Given `trait Foo<T, U>`,
6363

6464
Local Type: A struct, enum, or union which was defined in the current crate.
6565
This is not affected by type parameters. `struct Foo` is considered local, but
66-
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases do not affect
67-
locality.
66+
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases and trait
67+
aliases do not affect locality.
6868

6969
Covered Type: A type which appears as a parameter to another type. For example,
70-
`T` is uncovered, but `Vec<T>` is covered. This is only relevant for type
71-
parameters.
70+
`T` is uncovered, but the `T` in `Vec<T>` is covered. This is only relevant for
71+
type parameters.
7272

7373
Blanket Impl: Any implementation where a type appears uncovered. `impl<T> Foo
7474
for T`, `impl<T> Bar<T> for T`, `impl<T> Bar<Vec<T>> for T`, and `impl<T> Bar<T>
7575
for Vec<T>` are considered blanket impls. However, `impl<T> Bar<Vec<T>> for
76-
Vec<T>` is not a blanket impl, as all types which appear in this impl are
77-
covered by `Vec`.
76+
Vec<T>` is not a blanket impl, as all instances of `T` which appear in this impl
77+
are covered by `Vec`.
7878

7979
Fundamental Type: A type for which you cannot add a blanket impl backwards
8080
compatibly. This includes `&`, `&mut`, and `Box`. Any time a type `T` is
@@ -93,7 +93,8 @@ implementation to use.
9393
In languages without coherence, the compiler has to have some way to choose
9494
which implementation to use when multiple implementations could apply. Scala
9595
does this by having complex scope resolution rules for "implicit" parameters.
96-
Haskell does this by picking one at random.
96+
Haskell (when a discouraged flag is enabled) does this by picking an impl
97+
arbitrarily.
9798

9899
Rust's solution is to enforce that there is only one impl to choose from at all.
99100
While the rules required to enforce this are quite complex, the result is easy

0 commit comments

Comments
 (0)