//@ known-bug: #107362 //@ compile-flags: -Cdebuginfo=2 pub trait Functor { type With: Functor; } pub struct IdFunctor(T); impl Functor for IdFunctor { type With = IdFunctor; } impl Functor for Vec { type With = Vec ; } pub struct Compose(F1::With>) where F1: Functor + ?Sized, F2: Functor + ?Sized; impl Functor for Compose where F1: Functor + ?Sized, F2: Functor + ?Sized { type With = F1::With> ; } pub enum Value where F: Functor + ?Sized, { SignedInt(*mut F::With), Array(*mut Value, ()>>), } fn main() { let x: Value> = Value::SignedInt(&mut IdFunctor(1)); }