File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
compiler/rustc_driver_impl/src Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -421,8 +421,12 @@ fn run_compiler(
421421 // effects of writing the dep-info and reporting errors.
422422 queries. global_ctxt( ) ?. enter( |tcx| tcx. output_filenames( ( ) ) ) ;
423423 } 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+ ) ;
426430 }
427431 trace!( "finished pretty-printing" ) ;
428432 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) {
217217// Extra data for pretty-printing, the form of which depends on what kind of
218218// pretty-printing we are doing.
219219pub enum PrintExtra < ' tcx > {
220- AfterParsing { krate : ast:: Crate } ,
220+ AfterParsing { krate : & ' tcx ast:: Crate } ,
221221 NeedsAstMap { tcx : TyCtxt < ' tcx > } ,
222222}
223223
You can’t perform that action at this time.
0 commit comments