Skip to content

Commit e869e5f

Browse files
committed
Add some docs about the new feature to the unstable book
1 parent b8ee6fa commit e869e5f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# `re_rebalance_coherence`
2+
3+
The tracking issue for this feature is: [#55437]
4+
5+
[#55437]: https://github.com/rust-lang/rust/issues/55437
6+
7+
------------------------
8+
9+
The `re_rebalance_coherence` feature tweaks the rules which trait
10+
impls are allowed in crates.
11+
The following rule is used:
12+
13+
Given `impl<P1..=Pn> Trait<T1..=Tn> for T0`, an impl is valid only if at
14+
least one of the following is true:
15+
- `Trait` is a local trait
16+
- All of
17+
- At least one of the types `T0..=Tn` must be a local type. Let `Ti` be the
18+
first such type.
19+
- No uncovered type parameters `P1..=Pn` may appear in `T0..Ti` (excluding
20+
`Ti`)
21+
22+
23+
See the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/2451-re-rebalancing-coherence.md) for details.

0 commit comments

Comments
 (0)