Skip to content

Commit e6abfff

Browse files
committed
Add a drawback about doc readability
1 parent bcb006e commit e6abfff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

text/0000-panic-safe-slicing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ impl<T, I> IndexMut<I> for [T]
9292
- The `SliceIndex` trait is unfortunate - it's tuned for exactly the set of methods it's used by.
9393
It only exists because inherent methods cannot be overloaded the same way that trait
9494
implementations can be. It would most likely remain unstable indefinitely.
95+
- Documentation may suffer. Rustdoc output currently explicitly shows each of the ways you can
96+
index a slice, while there will simply be a single generic implementation with this change. This
97+
may not be that bad, though. The doc block currently seems to provided the most valuable
98+
information to newcomers rather than the trait bound, and that will still be present with this
99+
change.
95100

96101
# Alternatives
97102

0 commit comments

Comments
 (0)