// check-pass // Regression test for issue #90662 // Tests that projection caching does not cause a spurious error trait HasProvider {} trait Provider { type Interface: ?Sized; } trait Repository {} trait Service {} struct DbConnection; impl Provider for DbConnection { type Interface = DbConnection; } struct RepositoryImpl; impl> Provider for RepositoryImpl { type Interface = dyn Repository; } struct ServiceImpl; impl> Provider for ServiceImpl { type Interface = dyn Service; } struct TestModule; impl HasProvider<>::Interface> for TestModule {} impl HasProvider<>::Interface> for TestModule {} impl HasProvider<>::Interface> for TestModule {} fn main() {}