File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,11 @@ fn program_clauses_that_could_match<I: Interner>(
249249 db. trait_datum ( trait_ref. trait_id )
250250 . to_program_clauses ( builder) ;
251251 }
252- DomainGoal :: ObjectSafe ( trait_id) => db. trait_datum ( * trait_id) . to_program_clauses ( builder) ,
252+ DomainGoal :: ObjectSafe ( trait_id) => {
253+ if builder. db . is_object_safe ( * trait_id) {
254+ builder. push_fact ( DomainGoal :: ObjectSafe ( * trait_id) ) ;
255+ }
256+ }
253257 DomainGoal :: WellFormed ( WellFormed :: Ty ( ty) )
254258 | DomainGoal :: IsUpstream ( ty)
255259 | DomainGoal :: DownstreamType ( ty)
Original file line number Diff line number Diff line change @@ -540,11 +540,6 @@ impl<I: Interner> ToProgramClauses<I> for TraitDatum<I> {
540540 ) ;
541541 }
542542
543- // Object safety check
544- if builder. db . is_object_safe ( trait_ref. trait_id ) {
545- builder. push_fact ( DomainGoal :: ObjectSafe ( trait_ref. trait_id ) ) ;
546- }
547-
548543 // Reverse implied bound rules: given (e.g.) `trait Foo: Bar + Baz`,
549544 // we create rules like:
550545 //
You can’t perform that action at this time.
0 commit comments