@@ -667,33 +667,33 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) {
667667fn try_process_rlink( sess: & Session , compiler: & interface:: Compiler ) -> Compilation {
668668 if sess. opts. unstable_opts. link_only {
669669 if let Input :: File ( file) = & sess. io. input {
670- let outputs = compiler. build_output_filenames( sess, & [ ] ) ;
671670 let rlink_data = fs:: read( file) . unwrap_or_else( |err| {
672671 sess. emit_fatal( RlinkUnableToRead { err } ) ;
673672 } ) ;
674- let codegen_results = match CodegenResults :: deserialize_rlink ( sess , rlink_data ) {
675- Ok ( codegen ) => codegen ,
676- Err ( err ) => {
677- match err {
678- CodegenErrors :: WrongFileType => sess . emit_fatal ( RLinkWrongFileType ) ,
679- CodegenErrors :: EmptyVersionNumber => {
680- sess . emit_fatal ( RLinkEmptyVersionNumber )
681- }
682- CodegenErrors :: EncodingVersionMismatch { version_array , rlink_version } => {
683- sess . emit_fatal ( RLinkEncodingVersionMismatch {
673+ let ( codegen_results , outputs ) =
674+ match CodegenResults :: deserialize_rlink ( sess , rlink_data ) {
675+ Ok ( ( codegen , outputs ) ) => ( codegen , outputs ) ,
676+ Err ( err) => {
677+ match err {
678+ CodegenErrors :: WrongFileType => sess . emit_fatal ( RLinkWrongFileType ) ,
679+ CodegenErrors :: EmptyVersionNumber => {
680+ sess . emit_fatal ( RLinkEmptyVersionNumber )
681+ }
682+ CodegenErrors :: EncodingVersionMismatch {
684683 version_array,
685684 rlink_version,
686- } )
687- }
688- CodegenErrors :: RustcVersionMismatch { rustc_version } => {
689- sess. emit_fatal( RLinkRustcVersionMismatch {
690- rustc_version,
691- current_version: sess. cfg_version,
692- } )
693- }
694- } ;
695- }
696- } ;
685+ } => sess. emit_fatal( RLinkEncodingVersionMismatch {
686+ version_array,
687+ rlink_version,
688+ } ) ,
689+ CodegenErrors :: RustcVersionMismatch { rustc_version } => sess
690+ . emit_fatal( RLinkRustcVersionMismatch {
691+ rustc_version,
692+ current_version: sess. cfg_version,
693+ } ) ,
694+ } ;
695+ }
696+ } ;
697697 let result = compiler. codegen_backend( ) . link( sess, codegen_results, & outputs) ;
698698 abort_on_err( result, sess) ;
699699 } else {
0 commit comments