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>(
249
249
db. trait_datum ( trait_ref. trait_id )
250
250
. to_program_clauses ( builder) ;
251
251
}
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
+ }
253
257
DomainGoal :: WellFormed ( WellFormed :: Ty ( ty) )
254
258
| DomainGoal :: IsUpstream ( ty)
255
259
| 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> {
540
540
) ;
541
541
}
542
542
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
-
548
543
// Reverse implied bound rules: given (e.g.) `trait Foo: Bar + Baz`,
549
544
// we create rules like:
550
545
//
You can’t perform that action at this time.
0 commit comments