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 @@ -918,13 +918,11 @@ impl ir::StructDatum {
918
918
fn to_program_clauses ( & self , program : & ir:: Program ) -> Vec < ir:: ProgramClause > {
919
919
// Given:
920
920
//
921
- // struct Foo<T: Eq> {
922
- // field: Bar
923
- // }
921
+ // struct Foo<T: Eq> { }
924
922
//
925
923
// we generate the following clause:
926
924
//
927
- // for<?T> WF(Foo<?T>) :- WF(?T), WF(Bar), (?T: Eq), WF(?T: Eq).
925
+ // for<?T> WF(Foo<?T>) :- WF(?T), (?T: Eq), WF(?T: Eq).
928
926
929
927
let wf = ir:: ProgramClause {
930
928
implication : self . binders . map_ref ( |bound_datum| {
@@ -939,17 +937,12 @@ impl ir::StructDatum {
939
937
. cloned ( )
940
938
. map ( |ty| ir:: WellFormed :: Ty ( ty) . cast ( ) ) ;
941
939
942
- let fields = bound_datum. fields
943
- . iter ( )
944
- . cloned ( )
945
- . map ( |ty| ir:: WellFormed :: Ty ( ty) . cast ( ) ) ;
946
-
947
940
let where_clauses = bound_datum. where_clauses . iter ( )
948
941
. cloned ( )
949
942
. flat_map ( |wc| wc. expanded ( program) )
950
943
. map ( |wc| wc. cast ( ) ) ;
951
944
952
- tys. chain ( fields ) . chain ( where_clauses) . collect ( )
945
+ tys. chain ( where_clauses) . collect ( )
953
946
}
954
947
}
955
948
} ) ,
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