@@ -170,7 +170,7 @@ impl PpSourceMode {
170170 hir_map : Option < & hir_map:: Map < ' tcx > > ,
171171 f : F )
172172 -> A
173- where F : FnOnce ( & PrinterSupport ) -> A
173+ where F : FnOnce ( & dyn PrinterSupport ) -> A
174174 {
175175 match * self {
176176 PpmNormal | PpmEveryBodyLoops | PpmExpanded => {
@@ -208,7 +208,7 @@ impl PpSourceMode {
208208 id : & str ,
209209 f : F )
210210 -> A
211- where F : FnOnce ( & HirPrinterSupport , & hir:: Crate ) -> A
211+ where F : FnOnce ( & dyn HirPrinterSupport , & hir:: Crate ) -> A
212212 {
213213 match * self {
214214 PpmNormal => {
@@ -265,7 +265,7 @@ trait PrinterSupport: pprust::PpAnn {
265265 ///
266266 /// (Rust does not yet support upcasting from a trait object to
267267 /// an object for one of its super-traits.)
268- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust:: PpAnn ;
268+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust:: PpAnn ;
269269}
270270
271271trait HirPrinterSupport < ' hir > : pprust_hir:: PpAnn {
@@ -281,7 +281,7 @@ trait HirPrinterSupport<'hir>: pprust_hir::PpAnn {
281281 ///
282282 /// (Rust does not yet support upcasting from a trait object to
283283 /// an object for one of its super-traits.)
284- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust_hir:: PpAnn ;
284+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust_hir:: PpAnn ;
285285
286286 /// Computes an user-readable representation of a path, if possible.
287287 fn node_path ( & self , id : ast:: NodeId ) -> Option < String > {
@@ -305,7 +305,7 @@ impl<'hir> PrinterSupport for NoAnn<'hir> {
305305 self . sess
306306 }
307307
308- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust:: PpAnn {
308+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust:: PpAnn {
309309 self
310310 }
311311}
@@ -319,7 +319,7 @@ impl<'hir> HirPrinterSupport<'hir> for NoAnn<'hir> {
319319 self . hir_map . as_ref ( )
320320 }
321321
322- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust_hir:: PpAnn {
322+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust_hir:: PpAnn {
323323 self
324324 }
325325}
@@ -346,7 +346,7 @@ impl<'hir> PrinterSupport for IdentifiedAnnotation<'hir> {
346346 self . sess
347347 }
348348
349- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust:: PpAnn {
349+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust:: PpAnn {
350350 self
351351 }
352352}
@@ -397,7 +397,7 @@ impl<'hir> HirPrinterSupport<'hir> for IdentifiedAnnotation<'hir> {
397397 self . hir_map . as_ref ( )
398398 }
399399
400- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust_hir:: PpAnn {
400+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust_hir:: PpAnn {
401401 self
402402 }
403403}
@@ -458,7 +458,7 @@ impl<'a> PrinterSupport for HygieneAnnotation<'a> {
458458 self . sess
459459 }
460460
461- fn pp_ann ( & self ) -> & pprust:: PpAnn {
461+ fn pp_ann ( & self ) -> & dyn pprust:: PpAnn {
462462 self
463463 }
464464}
@@ -496,7 +496,7 @@ impl<'b, 'tcx> HirPrinterSupport<'tcx> for TypedAnnotation<'b, 'tcx> {
496496 Some ( & self . tcx . hir )
497497 }
498498
499- fn pp_ann < ' a > ( & ' a self ) -> & ' a pprust_hir:: PpAnn {
499+ fn pp_ann < ' a > ( & ' a self ) -> & ' a dyn pprust_hir:: PpAnn {
500500 self
501501 }
502502
@@ -896,7 +896,7 @@ pub fn print_after_parsing(sess: &Session,
896896
897897 if let PpmSource ( s) = ppm {
898898 // Silently ignores an identified node.
899- let out: & mut Write = & mut out;
899+ let out: & mut dyn Write = & mut out;
900900 s. call_with_pp_support ( sess, None , move |annotation| {
901901 debug ! ( "pretty printing source code {:?}" , s) ;
902902 let sess = annotation. sess ( ) ;
@@ -953,7 +953,7 @@ pub fn print_after_hir_lowering<'tcx, 'a: 'tcx>(sess: &'a Session,
953953 match ( ppm, opt_uii) {
954954 ( PpmSource ( s) , _) => {
955955 // Silently ignores an identified node.
956- let out: & mut Write = & mut out;
956+ let out: & mut dyn Write = & mut out;
957957 s. call_with_pp_support ( sess, Some ( hir_map) , move |annotation| {
958958 debug ! ( "pretty printing source code {:?}" , s) ;
959959 let sess = annotation. sess ( ) ;
@@ -969,7 +969,7 @@ pub fn print_after_hir_lowering<'tcx, 'a: 'tcx>(sess: &'a Session,
969969 }
970970
971971 ( PpmHir ( s) , None ) => {
972- let out: & mut Write = & mut out;
972+ let out: & mut dyn Write = & mut out;
973973 s. call_with_pp_support_hir ( sess,
974974 cstore,
975975 hir_map,
@@ -993,7 +993,7 @@ pub fn print_after_hir_lowering<'tcx, 'a: 'tcx>(sess: &'a Session,
993993 }
994994
995995 ( PpmHirTree ( s) , None ) => {
996- let out: & mut Write = & mut out;
996+ let out: & mut dyn Write = & mut out;
997997 s. call_with_pp_support_hir ( sess,
998998 cstore,
999999 hir_map,
@@ -1009,7 +1009,7 @@ pub fn print_after_hir_lowering<'tcx, 'a: 'tcx>(sess: &'a Session,
10091009 }
10101010
10111011 ( PpmHir ( s) , Some ( uii) ) => {
1012- let out: & mut Write = & mut out;
1012+ let out: & mut dyn Write = & mut out;
10131013 s. call_with_pp_support_hir ( sess,
10141014 cstore,
10151015 hir_map,
@@ -1043,7 +1043,7 @@ pub fn print_after_hir_lowering<'tcx, 'a: 'tcx>(sess: &'a Session,
10431043 }
10441044
10451045 ( PpmHirTree ( s) , Some ( uii) ) => {
1046- let out: & mut Write = & mut out;
1046+ let out: & mut dyn Write = & mut out;
10471047 s. call_with_pp_support_hir ( sess,
10481048 cstore,
10491049 hir_map,
@@ -1137,7 +1137,7 @@ fn print_with_analysis<'tcx, 'a: 'tcx>(sess: &'a Session,
11371137 Some ( code) => {
11381138 let variants = gather_flowgraph_variants ( tcx. sess ) ;
11391139
1140- let out: & mut Write = & mut out;
1140+ let out: & mut dyn Write = & mut out;
11411141
11421142 print_flowgraph ( variants, tcx, code, mode, out)
11431143 }
0 commit comments