@@ -506,7 +506,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
506
506
/// normally invoked directly; instead, you invoke
507
507
/// `GoalsData::intern` (which will ultimately call this
508
508
/// method).
509
- fn intern_goals ( & self , data : impl IntoIterator < Item = Goal < Self > > ) -> Self :: InternedGoals ;
509
+ fn intern_goals < E > (
510
+ & self ,
511
+ data : impl IntoIterator < Item = Result < Goal < Self > , E > > ,
512
+ ) -> Result < Self :: InternedGoals , E > ;
510
513
511
514
/// Lookup the `GoalsData` that was interned to create a `InternedGoals`.
512
515
fn goals_data < ' a > ( & self , goals : & ' a Self :: InternedGoals ) -> & ' a [ Goal < Self > ] ;
@@ -542,10 +545,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
542
545
/// normally invoked directly; instead, you invoke
543
546
/// `ProgramClauses::from` (which will ultimately call this
544
547
/// method).
545
- fn intern_program_clauses (
548
+ fn intern_program_clauses < E > (
546
549
& self ,
547
- data : impl IntoIterator < Item = ProgramClause < Self > > ,
548
- ) -> Self :: InternedProgramClauses ;
550
+ data : impl IntoIterator < Item = Result < ProgramClause < Self > , E > > ,
551
+ ) -> Result < Self :: InternedProgramClauses , E > ;
549
552
550
553
/// Lookup the `ProgramClauseData` that was interned to create a `ProgramClause`.
551
554
fn program_clauses_data < ' a > (
@@ -557,10 +560,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
557
560
/// normally invoked directly; instead, you invoke
558
561
/// `QuantifiedWhereClauses::from` (which will ultimately call this
559
562
/// method).
560
- fn intern_quantified_where_clauses (
563
+ fn intern_quantified_where_clauses < E > (
561
564
& self ,
562
- data : impl IntoIterator < Item = QuantifiedWhereClause < Self > > ,
563
- ) -> Self :: InternedQuantifiedWhereClauses ;
565
+ data : impl IntoIterator < Item = Result < QuantifiedWhereClause < Self > , E > > ,
566
+ ) -> Result < Self :: InternedQuantifiedWhereClauses , E > ;
564
567
565
568
/// Lookup the slice of `QuantifiedWhereClause` that was interned to
566
569
/// create a `QuantifiedWhereClauses`.
@@ -573,10 +576,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
573
576
/// normally invoked directly; instead, you invoke
574
577
/// `ParameterKinds::from` (which will ultimately call this
575
578
/// method).
576
- fn intern_parameter_kinds (
579
+ fn intern_parameter_kinds < E > (
577
580
& self ,
578
- data : impl IntoIterator < Item = ParameterKind < ( ) > > ,
579
- ) -> Self :: InternedParameterKinds ;
581
+ data : impl IntoIterator < Item = Result < ParameterKind < ( ) > , E > > ,
582
+ ) -> Result < Self :: InternedParameterKinds , E > ;
580
583
581
584
/// Lookup the slice of `ParameterKind` that was interned to
582
585
/// create a `ParameterKinds`.
@@ -589,10 +592,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
589
592
/// normally invoked directly; instead, you invoke
590
593
/// `CanonicalVarKinds::from` (which will ultimately call this
591
594
/// method).
592
- fn intern_canonical_var_kinds (
595
+ fn intern_canonical_var_kinds < E > (
593
596
& self ,
594
- data : impl IntoIterator < Item = ParameterKind < UniverseIndex > > ,
595
- ) -> Self :: InternedCanonicalVarKinds ;
597
+ data : impl IntoIterator < Item = Result < ParameterKind < UniverseIndex > , E > > ,
598
+ ) -> Result < Self :: InternedCanonicalVarKinds , E > ;
596
599
597
600
/// Lookup the slice of `ParameterKind` that was interned to
598
601
/// create a `ParameterKinds`.
@@ -879,10 +882,10 @@ mod default {
879
882
goal
880
883
}
881
884
882
- fn intern_goals (
885
+ fn intern_goals < E > (
883
886
& self ,
884
- data : impl IntoIterator < Item = Goal < ChalkIr > > ,
885
- ) -> Vec < Goal < ChalkIr > > {
887
+ data : impl IntoIterator < Item = Result < Goal < ChalkIr > , E > > ,
888
+ ) -> Result < Vec < Goal < ChalkIr > > , E > {
886
889
data. into_iter ( ) . collect ( )
887
890
}
888
891
@@ -915,10 +918,10 @@ mod default {
915
918
clause
916
919
}
917
920
918
- fn intern_program_clauses (
921
+ fn intern_program_clauses < E > (
919
922
& self ,
920
- data : impl IntoIterator < Item = ProgramClause < Self > > ,
921
- ) -> Vec < ProgramClause < Self > > {
923
+ data : impl IntoIterator < Item = Result < ProgramClause < Self > , E > > ,
924
+ ) -> Result < Vec < ProgramClause < Self > > , E > {
922
925
data. into_iter ( ) . collect ( )
923
926
}
924
927
@@ -929,10 +932,10 @@ mod default {
929
932
clauses
930
933
}
931
934
932
- fn intern_quantified_where_clauses (
935
+ fn intern_quantified_where_clauses < E > (
933
936
& self ,
934
- data : impl IntoIterator < Item = QuantifiedWhereClause < Self > > ,
935
- ) -> Self :: InternedQuantifiedWhereClauses {
937
+ data : impl IntoIterator < Item = Result < QuantifiedWhereClause < Self > , E > > ,
938
+ ) -> Result < Self :: InternedQuantifiedWhereClauses , E > {
936
939
data. into_iter ( ) . collect ( )
937
940
}
938
941
@@ -942,24 +945,27 @@ mod default {
942
945
) -> & ' a [ QuantifiedWhereClause < Self > ] {
943
946
clauses
944
947
}
945
- fn intern_parameter_kinds (
948
+ fn intern_parameter_kinds < E > (
946
949
& self ,
947
- data : impl IntoIterator < Item = ParameterKind < ( ) > > ,
948
- ) -> Self :: InternedParameterKinds {
950
+ data : impl IntoIterator < Item = Result < ParameterKind < ( ) > , E > > ,
951
+ ) -> Result < Self :: InternedParameterKinds , E > {
949
952
data. into_iter ( ) . collect ( )
950
953
}
954
+
951
955
fn parameter_kinds_data < ' a > (
952
956
& self ,
953
957
parameter_kinds : & ' a Self :: InternedParameterKinds ,
954
958
) -> & ' a [ ParameterKind < ( ) > ] {
955
959
parameter_kinds
956
960
}
957
- fn intern_canonical_var_kinds (
961
+
962
+ fn intern_canonical_var_kinds < E > (
958
963
& self ,
959
- data : impl IntoIterator < Item = ParameterKind < UniverseIndex > > ,
960
- ) -> Self :: InternedCanonicalVarKinds {
964
+ data : impl IntoIterator < Item = Result < ParameterKind < UniverseIndex > , E > > ,
965
+ ) -> Result < Self :: InternedCanonicalVarKinds , E > {
961
966
data. into_iter ( ) . collect ( )
962
967
}
968
+
963
969
fn canonical_var_kinds_data < ' a > (
964
970
& self ,
965
971
canonical_var_kinds : & ' a Self :: InternedCanonicalVarKinds ,
0 commit comments