//@ known-bug: #115808 #![feature(generic_const_exprs)] use std::ops::Mul; pub trait Indices { const NUM_ELEMS: usize; } pub trait Concat { type Output; } pub struct Tensor, const N: usize> where [u8; I::NUM_ELEMS]: Sized, {} impl, J: Indices, const N: usize> Mul> for Tensor where I: Concat, >::Output: Indices, [u8; I::NUM_ELEMS]: Sized, [u8; J::NUM_ELEMS]: Sized, [u8; >::Output::NUM_ELEMS]: Sized, { type Output = Tensor<>::Output, N>; }