File tree 2 files changed +7
-3
lines changed
compiler/rustc_driver_impl/src
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -421,8 +421,12 @@ fn run_compiler(
421
421
// effects of writing the dep-info and reporting errors.
422
422
queries. global_ctxt( ) ?. enter( |tcx| tcx. output_filenames( ( ) ) ) ;
423
423
} else {
424
- let krate = queries. parse( ) ?. steal( ) ;
425
- pretty:: print( sess, * ppm, pretty:: PrintExtra :: AfterParsing { krate } ) ;
424
+ let krate = queries. parse( ) ?;
425
+ pretty:: print(
426
+ sess,
427
+ * ppm,
428
+ pretty:: PrintExtra :: AfterParsing { krate: & * krate. borrow( ) } ,
429
+ ) ;
426
430
}
427
431
trace!( "finished pretty-printing" ) ;
428
432
return early_exit( ) ;
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ fn write_or_print(out: &str, sess: &Session) {
217
217
// Extra data for pretty-printing, the form of which depends on what kind of
218
218
// pretty-printing we are doing.
219
219
pub enum PrintExtra < ' tcx > {
220
- AfterParsing { krate : ast:: Crate } ,
220
+ AfterParsing { krate : & ' tcx ast:: Crate } ,
221
221
NeedsAstMap { tcx : TyCtxt < ' tcx > } ,
222
222
}
223
223
You can’t perform that action at this time.
0 commit comments