Skip to content

Commit bcb006e

Browse files
committed
Add an alternative around separate traits
1 parent 17e621b commit bcb006e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

text/0000-panic-safe-slicing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ impl<T, I> IndexMut<I> for [T]
9898
- Stay as is.
9999
- A previous version of this RFC introduced new `get_slice` etc methods rather than overloading
100100
`get` etc. This avoids the utility trait but is somewhat less ergonomic.
101+
- Instead of one trait amalgamating all of the required methods, we could have one trait per
102+
method. This would open a more reasonable door to stabilizing those traits, but adds quite a lot
103+
more surface area. Replacing an unstable `SliceIndex` trait with a collection would be
104+
backwards compatible.
101105

102106
# Unresolved questions
103107

0 commit comments

Comments
 (0)