This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use rustc_session::{output::find_crate_name, Session};
1818use rustc_span:: symbol:: sym;
1919use std:: any:: Any ;
2020use std:: cell:: { Ref , RefCell , RefMut } ;
21- use std:: mem;
2221use std:: rc:: Rc ;
2322
2423/// Represent the result of a query.
@@ -395,37 +394,4 @@ impl Compiler {
395394
396395 ret
397396 }
398-
399- // This method is different to all the other methods in `Compiler` because
400- // it lacks a `Queries` entry. It's also not currently used. It does serve
401- // as an example of how `Compiler` can be used, with additional steps added
402- // between some passes. And see `rustc_driver::run_compiler` for a more
403- // complex example.
404- pub fn compile ( & self ) -> Result < ( ) > {
405- let linker = self . enter ( |queries| {
406- queries. prepare_outputs ( ) ?;
407-
408- if self . session ( ) . opts . output_types . contains_key ( & OutputType :: DepInfo )
409- && self . session ( ) . opts . output_types . len ( ) == 1
410- {
411- return Ok ( None ) ;
412- }
413-
414- queries. global_ctxt ( ) ?;
415-
416- // Drop AST after creating GlobalCtxt to free memory.
417- mem:: drop ( queries. expansion ( ) ?. take ( ) ) ;
418-
419- queries. ongoing_codegen ( ) ?;
420-
421- let linker = queries. linker ( ) ?;
422- Ok ( Some ( linker) )
423- } ) ?;
424-
425- if let Some ( linker) = linker {
426- linker. link ( ) ?
427- }
428-
429- Ok ( ( ) )
430- }
431397}
You can’t perform that action at this time.
0 commit comments