diff --git a/text/0000-trait-alias.md b/text/0000-trait-alias.md index e289dd2310e..cee2cdd8dd9 100644 --- a/text/0000-trait-alias.md +++ b/text/0000-trait-alias.md @@ -150,6 +150,22 @@ more predicates, just like any other `where` clause. You cannot directly `impl` a trait alias, but you can have them as *bounds*, *trait objects* and *impl Trait*. +---- + +It is an error to attempt to override a previously specified +equivalence constraint with a non-equivalent type. For example: + +```rust +trait SharableIterator = Iterator + Sync; +trait IntIterator = Iterator; + +fn quux1>(...) { ... } // ok +fn quux2>(...) { ... } // ok (perhaps subject to lint warning) +fn quux3>(...) { ... } // ERROR: `Item` already constrained + +trait FloIterator = IntIterator; // ERROR: `Item` already constrained +``` + --- When using a trait alias as a trait object, it is subject to object safety restrictions *after*