File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,9 @@ impl<'interner, 'arena> Context<'interner> {
119119 // FIXME: indentation and grouping
120120
121121 match term {
122- Term :: ItemVar ( _, level) => RcDoc :: text ( format ! ( "ItemVar({:? })" , level) ) ,
123- Term :: LocalVar ( _, index) => RcDoc :: text ( format ! ( "LocalVar({:? })" , index) ) ,
124- Term :: MetaVar ( _, index) => RcDoc :: text ( format ! ( "MetaVar({:? })" , index) ) ,
122+ Term :: ItemVar ( _, level) => RcDoc :: text ( format ! ( "Item({ })" , level) ) ,
123+ Term :: LocalVar ( _, index) => RcDoc :: text ( format ! ( "Local({ })" , index) ) ,
124+ Term :: MetaVar ( _, index) => RcDoc :: text ( format ! ( "Meta({ })" , index) ) ,
125125 Term :: InsertedMeta ( _, level, info) => {
126126 RcDoc :: text ( format ! ( "InsertedMeta({:?}, {:?})" , level, info) )
127127 }
Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ impl fmt::Debug for Index {
6464 }
6565}
6666
67+ impl fmt:: Display for Index {
68+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
69+ self . 0 . fmt ( f)
70+ }
71+ }
72+
6773/// An iterator over indices, listed from the most recently bound.
6874pub fn indices ( ) -> impl Iterator < Item = Index > {
6975 ( 0 ..) . map ( Index )
@@ -105,6 +111,12 @@ impl fmt::Debug for Level {
105111 }
106112}
107113
114+ impl fmt:: Display for Level {
115+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
116+ self . 0 . fmt ( f)
117+ }
118+ }
119+
108120/// An iterator over levels, listed from the least recently bound.
109121pub fn levels ( ) -> impl Iterator < Item = Level > {
110122 ( 0 ..) . map ( Level )
You can’t perform that action at this time.
0 commit comments