@@ -244,16 +244,17 @@ fn program_clauses_that_could_match<I: Interner>(
244244 . opaque_ty_data ( opaque_ty. opaque_ty_id )
245245 . to_program_clauses ( builder) ,
246246 } ,
247- DomainGoal :: WellFormed ( WellFormed :: Trait ( trait_predicate) ) => {
248- db. trait_datum ( trait_predicate. trait_id )
247+ DomainGoal :: WellFormed ( WellFormed :: Trait ( trait_ref) )
248+ | DomainGoal :: LocalImplAllowed ( trait_ref) => {
249+ db. trait_datum ( trait_ref. trait_id )
249250 . to_program_clauses ( builder) ;
250251 }
252+ DomainGoal :: ObjectSafe ( trait_id) => db. trait_datum ( * trait_id) . to_program_clauses ( builder) ,
251253 DomainGoal :: WellFormed ( WellFormed :: Ty ( ty) )
252254 | DomainGoal :: IsUpstream ( ty)
253- | DomainGoal :: DownstreamType ( ty) => match_ty ( builder, environment, ty) ?,
254- DomainGoal :: IsFullyVisible ( ty) | DomainGoal :: IsLocal ( ty) => {
255- match_ty ( builder, environment, ty) ?
256- }
255+ | DomainGoal :: DownstreamType ( ty)
256+ | DomainGoal :: IsFullyVisible ( ty)
257+ | DomainGoal :: IsLocal ( ty) => match_ty ( builder, environment, ty) ?,
257258 DomainGoal :: FromEnv ( _) => ( ) , // Computed in the environment
258259 DomainGoal :: Normalize ( Normalize { alias, ty : _ } ) => match alias {
259260 AliasTy :: Projection ( proj) => {
@@ -291,11 +292,7 @@ fn program_clauses_that_could_match<I: Interner>(
291292 }
292293 AliasTy :: Opaque ( _) => ( ) ,
293294 } ,
294- DomainGoal :: LocalImplAllowed ( trait_ref) => db
295- . trait_datum ( trait_ref. trait_id )
296- . to_program_clauses ( builder) ,
297- DomainGoal :: Compatible ( ( ) ) => ( ) ,
298- DomainGoal :: Reveal ( ( ) ) => ( ) ,
295+ DomainGoal :: Compatible ( ( ) ) | DomainGoal :: Reveal ( ( ) ) => ( ) ,
299296 } ;
300297
301298 Ok ( ( ) )
0 commit comments