@@ -506,7 +506,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
506506 /// normally invoked directly; instead, you invoke
507507 /// `GoalsData::intern` (which will ultimately call this
508508 /// 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 > ;
510513
511514 /// Lookup the `GoalsData` that was interned to create a `InternedGoals`.
512515 fn goals_data < ' a > ( & self , goals : & ' a Self :: InternedGoals ) -> & ' a [ Goal < Self > ] ;
@@ -542,10 +545,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
542545 /// normally invoked directly; instead, you invoke
543546 /// `ProgramClauses::from` (which will ultimately call this
544547 /// method).
545- fn intern_program_clauses (
548+ fn intern_program_clauses < E > (
546549 & 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 > ;
549552
550553 /// Lookup the `ProgramClauseData` that was interned to create a `ProgramClause`.
551554 fn program_clauses_data < ' a > (
@@ -557,10 +560,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
557560 /// normally invoked directly; instead, you invoke
558561 /// `QuantifiedWhereClauses::from` (which will ultimately call this
559562 /// method).
560- fn intern_quantified_where_clauses (
563+ fn intern_quantified_where_clauses < E > (
561564 & 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 > ;
564567
565568 /// Lookup the slice of `QuantifiedWhereClause` that was interned to
566569 /// create a `QuantifiedWhereClauses`.
@@ -573,10 +576,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
573576 /// normally invoked directly; instead, you invoke
574577 /// `ParameterKinds::from` (which will ultimately call this
575578 /// method).
576- fn intern_parameter_kinds (
579+ fn intern_parameter_kinds < E > (
577580 & self ,
578- data : impl IntoIterator < Item = ParameterKind < ( ) > > ,
579- ) -> Self :: InternedParameterKinds ;
581+ data : impl IntoIterator < Item = Result < ParameterKind < ( ) > , E > > ,
582+ ) -> Result < Self :: InternedParameterKinds , E > ;
580583
581584 /// Lookup the slice of `ParameterKind` that was interned to
582585 /// create a `ParameterKinds`.
@@ -589,10 +592,10 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
589592 /// normally invoked directly; instead, you invoke
590593 /// `CanonicalVarKinds::from` (which will ultimately call this
591594 /// method).
592- fn intern_canonical_var_kinds (
595+ fn intern_canonical_var_kinds < E > (
593596 & 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 > ;
596599
597600 /// Lookup the slice of `ParameterKind` that was interned to
598601 /// create a `ParameterKinds`.
@@ -879,10 +882,10 @@ mod default {
879882 goal
880883 }
881884
882- fn intern_goals (
885+ fn intern_goals < E > (
883886 & 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 > {
886889 data. into_iter ( ) . collect ( )
887890 }
888891
@@ -915,10 +918,10 @@ mod default {
915918 clause
916919 }
917920
918- fn intern_program_clauses (
921+ fn intern_program_clauses < E > (
919922 & 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 > {
922925 data. into_iter ( ) . collect ( )
923926 }
924927
@@ -929,10 +932,10 @@ mod default {
929932 clauses
930933 }
931934
932- fn intern_quantified_where_clauses (
935+ fn intern_quantified_where_clauses < E > (
933936 & 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 > {
936939 data. into_iter ( ) . collect ( )
937940 }
938941
@@ -942,24 +945,27 @@ mod default {
942945 ) -> & ' a [ QuantifiedWhereClause < Self > ] {
943946 clauses
944947 }
945- fn intern_parameter_kinds (
948+ fn intern_parameter_kinds < E > (
946949 & self ,
947- data : impl IntoIterator < Item = ParameterKind < ( ) > > ,
948- ) -> Self :: InternedParameterKinds {
950+ data : impl IntoIterator < Item = Result < ParameterKind < ( ) > , E > > ,
951+ ) -> Result < Self :: InternedParameterKinds , E > {
949952 data. into_iter ( ) . collect ( )
950953 }
954+
951955 fn parameter_kinds_data < ' a > (
952956 & self ,
953957 parameter_kinds : & ' a Self :: InternedParameterKinds ,
954958 ) -> & ' a [ ParameterKind < ( ) > ] {
955959 parameter_kinds
956960 }
957- fn intern_canonical_var_kinds (
961+
962+ fn intern_canonical_var_kinds < E > (
958963 & 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 > {
961966 data. into_iter ( ) . collect ( )
962967 }
968+
963969 fn canonical_var_kinds_data < ' a > (
964970 & self ,
965971 canonical_var_kinds : & ' a Self :: InternedCanonicalVarKinds ,
0 commit comments