3 // Regression test for issue #90662
4 // Tests that projection caching does not cause a spurious error
6 trait HasProvider<T: ?Sized> {}
8 type Interface: ?Sized;
15 impl<M> Provider<M> for DbConnection {
16 type Interface = DbConnection;
19 struct RepositoryImpl;
20 impl<M: HasProvider<DbConnection>> Provider<M> for RepositoryImpl {
21 type Interface = dyn Repository;
25 impl<M: HasProvider<dyn Repository>> Provider<M> for ServiceImpl {
26 type Interface = dyn Service;
30 impl HasProvider<<DbConnection as Provider<Self>>::Interface> for TestModule {}
31 impl HasProvider<<RepositoryImpl as Provider<Self>>::Interface> for TestModule {}
32 impl HasProvider<<ServiceImpl as Provider<Self>>::Interface> for TestModule {}