diff options
| author | Georg Semmler <georg_semmler_05@web.de> | 2018-11-21 21:37:09 +0100 |
|---|---|---|
| committer | Georg Semmler <georg_semmler_05@web.de> | 2019-01-03 22:26:47 +0100 |
| commit | 70645e79b65ad255c1465b2caa985cbc16b851f3 (patch) | |
| tree | 0224a9034ccb7c5995d1e3fd2ef81f4bf9ebb84e | |
| parent | bcd7acfe046356e8107a4f2df2c5f06bc0abd219 (diff) | |
| download | rust-70645e79b65ad255c1465b2caa985cbc16b851f3.tar.gz rust-70645e79b65ad255c1465b2caa985cbc16b851f3.zip | |
Add some docs about the new feature to the unstable book
| -rw-r--r-- | src/doc/unstable-book/src/language-features/re-rebalance-coherence.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/re-rebalance-coherence.md b/src/doc/unstable-book/src/language-features/re-rebalance-coherence.md new file mode 100644 index 00000000000..608f0ed86f0 --- /dev/null +++ b/src/doc/unstable-book/src/language-features/re-rebalance-coherence.md @@ -0,0 +1,23 @@ +# `re_rebalance_coherence` + +The tracking issue for this feature is: [#55437] + +[#55437]: https://github.com/rust-lang/rust/issues/55437 + +------------------------ + +The `re_rebalance_coherence` feature tweaks the rules which trait +impls are allowed in crates. +The following rule is used: + +Given `impl<P1..=Pn> Trait<T1..=Tn> for T0`, an impl is valid only if at +least one of the following is true: +- `Trait` is a local trait +- All of + - At least one of the types `T0..=Tn` must be a local type. Let `Ti` be the + first such type. + - No uncovered type parameters `P1..=Pn` may appear in `T0..Ti` (excluding + `Ti`) + + +See the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/2451-re-rebalancing-coherence.md) for details. |
