@@ -9,7 +9,7 @@ use ty::{Param, Bound, RawPtr, Ref, Never, Tuple};
9
9
use ty:: { Closure , Generator , GeneratorWitness , Foreign , Projection , Opaque } ;
10
10
use ty:: { Placeholder , UnnormalizedProjection , Dynamic , Int , Uint , Infer } ;
11
11
use ty:: { self , Ty , TyCtxt , TypeFoldable , GenericParamCount , GenericParamDefKind } ;
12
- use ty:: print:: { PrintContext , Print } ;
12
+ use ty:: print:: { PrintCx , Print } ;
13
13
14
14
use std:: cell:: Cell ;
15
15
use std:: fmt;
@@ -182,7 +182,7 @@ impl RegionHighlightMode {
182
182
macro_rules! gen_display_debug_body {
183
183
( $with: path ) => {
184
184
fn fmt( & self , f: & mut fmt:: Formatter <' _>) -> fmt:: Result {
185
- let mut cx = PrintContext :: new( ) ;
185
+ let mut cx = PrintCx :: new( ) ;
186
186
$with( self , f, & mut cx)
187
187
}
188
188
} ;
@@ -213,15 +213,15 @@ macro_rules! gen_display_debug {
213
213
macro_rules! gen_print_impl {
214
214
( ( $( $x: tt) +) $target: ty, ( $self: ident, $f: ident, $cx: ident) $disp: block $dbg: block ) => {
215
215
impl <$( $x) +> Print <' tcx> for $target {
216
- fn print<F : fmt:: Write >( & $self, $f: & mut F , $cx: & mut PrintContext ) -> fmt:: Result {
216
+ fn print<F : fmt:: Write >( & $self, $f: & mut F , $cx: & mut PrintCx ) -> fmt:: Result {
217
217
if $cx. is_debug $dbg
218
218
else $disp
219
219
}
220
220
}
221
221
} ;
222
222
( ( ) $target: ty, ( $self: ident, $f: ident, $cx: ident) $disp: block $dbg: block ) => {
223
223
impl Print <' tcx> for $target {
224
- fn print<F : fmt:: Write >( & $self, $f: & mut F , $cx: & mut PrintContext ) -> fmt:: Result {
224
+ fn print<F : fmt:: Write >( & $self, $f: & mut F , $cx: & mut PrintCx ) -> fmt:: Result {
225
225
if $cx. is_debug $dbg
226
226
else $disp
227
227
}
@@ -275,7 +275,7 @@ macro_rules! print {
275
275
} ;
276
276
}
277
277
278
- impl PrintContext {
278
+ impl PrintCx {
279
279
fn fn_sig < F : fmt:: Write > ( & mut self ,
280
280
f : & mut F ,
281
281
inputs : & [ Ty < ' _ > ] ,
@@ -608,11 +608,11 @@ pub fn parameterized<F: fmt::Write>(f: &mut F,
608
608
did : DefId ,
609
609
projections : & [ ty:: ProjectionPredicate < ' _ > ] )
610
610
-> fmt:: Result {
611
- PrintContext :: new ( ) . parameterized ( f, substs, did, projections)
611
+ PrintCx :: new ( ) . parameterized ( f, substs, did, projections)
612
612
}
613
613
614
614
impl < ' a , ' tcx , T : Print < ' tcx > > Print < ' tcx > for & ' a T {
615
- fn print < F : fmt:: Write > ( & self , f : & mut F , cx : & mut PrintContext ) -> fmt:: Result {
615
+ fn print < F : fmt:: Write > ( & self , f : & mut F , cx : & mut PrintCx ) -> fmt:: Result {
616
616
( * self ) . print ( f, cx)
617
617
}
618
618
}
0 commit comments