I am facing below error message:
error[E0277]: the trait bound
&'a str: core::slice::private_slice_index::Sealed
is not satisfied --> src/json.rs:681:10
|
681 | impl<'a> SliceIndex for &'a str {
| ^^^^^^^^^^^^^^^^ the traitcore::slice::private_slice_index::Sealed
is not implemented for&'a str
error: aborting due to previous error
For,
impl<'a> SliceIndex for &'a str {
type Output=Json;
Looking up into the RFCs, mention something about gating traits from being implemented outside the crate so as to allow API evolution without breaking change. But I am able to implement SliceIndex<Json> for usize
. So what is different between usize
and &str
.
Thanks,