You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new overloaded slice operations have replaced the various `slice`
methods on slice types. However, the relevant traits were not included
in the prelude, meaning that you would have to manually import
`std::ops::Slice` to get these operations -- an unintended regression.
This commit adds the traits to the prelude, as is done with most other
operator traits.
Unfortunately, the trait `std::slice::Slice` (which defines an
`as_slice` method) was already included in the prelude. This trait is
renamed to `AsSlice`, which is a better name in any case.
In addition, because of both `AsSlice` and `Str` traits being included
in the prelude, both of which define `as_slice`, and both of which are
used for generic programming, this commit renames `ops::Slice::as_slice`
to `ops::Slice::as_slice_`. This is a stopgap solution; we'll need to
figure out a long-term story here later on.
Closes#17710
Due to the renamings, this is a:
[breaking-change]
0 commit comments