//@ known-bug: #121052 #![feature(generic_const_exprs, with_negative_coherence)] use std::ops::Mul; pub trait Indices { const NUM_ELEMS: usize; } 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, { } pub trait Concat {} pub struct Tensor, const N: usize> {} 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, { }