@@ -312,7 +312,7 @@ impl StructDatum {
312
312
/// ```notrust
313
313
/// -- Rule WellFormed-Type
314
314
/// forall<T> {
315
- /// WF(Foo<T>) :- Implemented (T: Eq).
315
+ /// WF(Foo<T>) :- WF (T: Eq).
316
316
/// }
317
317
///
318
318
/// -- Rule Implied-Bound-From-Type
@@ -361,7 +361,13 @@ impl StructDatum {
361
361
. map_ref ( |bound_datum| ProgramClauseImplication {
362
362
consequence : WellFormed :: Ty ( bound_datum. self_ty . clone ( ) . cast ( ) ) . cast ( ) ,
363
363
364
- conditions : { bound_datum. where_clauses . iter ( ) . cloned ( ) . casted ( ) . collect ( ) } ,
364
+ conditions : bound_datum
365
+ . where_clauses
366
+ . iter ( )
367
+ . cloned ( )
368
+ . map ( |wc| wc. map ( |bound| bound. into_well_formed_goal ( ) ) )
369
+ . casted ( )
370
+ . collect ( ) ,
365
371
} )
366
372
. cast ( ) ;
367
373
@@ -802,7 +808,7 @@ impl AssociatedTyDatum {
802
808
/// ```notrust
803
809
/// -- Rule WellFormed-AssocTy
804
810
/// forall<Self, 'a, T> {
805
- /// WellFormed((Foo::Assoc)<Self, 'a, T>) :- Implemented (Self: Foo), WC .
811
+ /// WellFormed((Foo::Assoc)<Self, 'a, T>) :- WellFormed (Self: Foo), WellFormed(WC) .
806
812
/// }
807
813
///
808
814
/// -- Rule Implied-WC-From-AssocTy
@@ -876,15 +882,21 @@ impl AssociatedTyDatum {
876
882
// Well-formedness of projection type.
877
883
//
878
884
// forall<Self> {
879
- // WellFormed((Foo::Assoc)<Self>) :- Implemented (Self: Foo), WC .
885
+ // WellFormed((Foo::Assoc)<Self>) :- WellFormed (Self: Foo), WellFormed(WC) .
880
886
// }
881
887
clauses. push (
882
888
Binders {
883
889
binders : binders. clone ( ) ,
884
890
value : ProgramClauseImplication {
885
891
consequence : WellFormed :: Ty ( app_ty. clone ( ) ) . cast ( ) ,
886
- conditions : iter:: once ( trait_ref. clone ( ) . cast ( ) )
887
- . chain ( self . where_clauses . iter ( ) . cloned ( ) . casted ( ) )
892
+ conditions : iter:: once ( WellFormed :: Trait ( trait_ref. clone ( ) ) . cast ( ) )
893
+ . chain (
894
+ self . where_clauses
895
+ . iter ( )
896
+ . cloned ( )
897
+ . map ( |wc| wc. map ( |bound| bound. into_well_formed_goal ( ) ) )
898
+ . casted ( ) ,
899
+ )
888
900
. collect ( ) ,
889
901
} ,
890
902
}
0 commit comments