struct Foo(T); type Bar = Foo; #[derive(derive_more::AsMut)] #[as_mut(Bar)] struct Baz(Foo); fn main() { let mut item = Baz(Foo(1i32)); let _: &mut Bar = item.as_mut(); }