File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -557,16 +557,6 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
557557 }
558558}
559559
560- impl < T > ExpectedFound < T > {
561- pub fn new ( a_is_expected : bool , a : T , b : T ) -> Self {
562- if a_is_expected {
563- ExpectedFound { expected : a, found : b }
564- } else {
565- ExpectedFound { expected : b, found : a }
566- }
567- }
568- }
569-
570560impl < ' tcx , T > InferOk < ' tcx , T > {
571561 pub fn unit ( self ) -> InferOk < ' tcx , ( ) > {
572562 InferOk { value : ( ) , obligations : self . obligations }
Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ pub struct ExpectedFound<T> {
1515 pub found : T ,
1616}
1717
18+ impl < T > ExpectedFound < T > {
19+ pub fn new ( a_is_expected : bool , a : T , b : T ) -> Self {
20+ if a_is_expected {
21+ ExpectedFound { expected : a, found : b }
22+ } else {
23+ ExpectedFound { expected : b, found : a }
24+ }
25+ }
26+ }
27+
1828// Data structures used in type unification
1929#[ derive( Clone , Debug , TypeFoldable ) ]
2030pub enum TypeError < ' tcx > {
You can’t perform that action at this time.
0 commit comments