1 error[E0605]: non-primitive cast: `Self` as `&dyn Index<usize, Output = <Self as Index<usize>>::Output>`
2 --> $DIR/issue-22312.rs:11:24
4 LL | let indexer = &(*self as &dyn Index<usize, Output = <Self as Index<usize>>::Output>);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
7 help: consider borrowing the value
9 LL | let indexer = &(&*self as &dyn Index<usize, Output = <Self as Index<usize>>::Output>);
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0605`.