File tree 2 files changed +3
-51
lines changed
2 files changed +3
-51
lines changed Original file line number Diff line number Diff line change @@ -913,13 +913,11 @@ impl ir::StructDatum {
913
913
fn to_program_clauses ( & self , program : & ir:: Program ) -> Vec < ir:: ProgramClause > {
914
914
// Given:
915
915
//
916
- // struct Foo<T: Eq> {
917
- // field: Bar
918
- // }
916
+ // struct Foo<T: Eq> { }
919
917
//
920
918
// we generate the following clause:
921
919
//
922
- // for<?T> WF(Foo<?T>) :- WF(?T), WF(Bar), (?T: Eq), WF(?T: Eq).
920
+ // for<?T> WF(Foo<?T>) :- WF(?T), (?T: Eq), WF(?T: Eq).
923
921
924
922
let wf = ir:: ProgramClause {
925
923
implication : self . binders . map_ref ( |bound_datum| {
@@ -934,17 +932,12 @@ impl ir::StructDatum {
934
932
. cloned ( )
935
933
. map ( |ty| ir:: WellFormed :: Ty ( ty) . cast ( ) ) ;
936
934
937
- let fields = bound_datum. fields
938
- . iter ( )
939
- . cloned ( )
940
- . map ( |ty| ir:: WellFormed :: Ty ( ty) . cast ( ) ) ;
941
-
942
935
let where_clauses = bound_datum. where_clauses . iter ( )
943
936
. cloned ( )
944
937
. flat_map ( |wc| wc. expanded ( program) )
945
938
. map ( |wc| wc. cast ( ) ) ;
946
939
947
- tys. chain ( fields ) . chain ( where_clauses) . collect ( )
940
+ tys. chain ( where_clauses) . collect ( )
948
941
}
949
942
}
950
943
} ) ,
Original file line number Diff line number Diff line change @@ -700,47 +700,6 @@ fn struct_wf() {
700
700
}
701
701
}
702
702
703
- #[ test]
704
- fn struct_with_fields_wf ( ) {
705
- test ! {
706
- program {
707
- struct Foo { }
708
-
709
- struct Bar {
710
- f: Foo
711
- }
712
-
713
- trait Clone { }
714
- struct Dummy <T > where T : Clone { }
715
- impl Clone for Foo { }
716
-
717
- struct Baz <T > {
718
- f: Dummy <T >
719
- }
720
- }
721
-
722
- goal {
723
- WellFormed ( Bar )
724
- } yields {
725
- "Unique"
726
- }
727
-
728
- // `Bar` does not implement `Clone` so `Dummy<Bar>` is ill-formed
729
- goal {
730
- WellFormed ( Baz <Bar >)
731
- } yields {
732
- "No possible solution"
733
- }
734
-
735
- // This time `Foo` does implement `Clone`
736
- goal {
737
- WellFormed ( Baz <Foo >)
738
- } yields {
739
- "Unique"
740
- }
741
- }
742
- }
743
-
744
703
#[ test]
745
704
fn generic_trait ( ) {
746
705
test ! {
You can’t perform that action at this time.
0 commit comments