pub trait ComptimeIndex<I>: Index<I> {
// Provided method
fn cube_idx(&self, i: I) -> &Self::Output { ... }
}Expand description
Workaround for comptime indexing, since the helper that replaces index operators doesn’t know about whether a variable is comptime. Has the same signature in unexpanded code, so it will automatically dispatch the correct one.