//@ known-bug: #79590 trait Database: Restriction {} trait Restriction { type Inner; } struct Test {} impl Database for Test {} impl Restriction for Test { type Inner = u32; } fn main() { let t = Test {}; let x: &dyn Database = &t; }