File tree 1 file changed +0
-34
lines changed
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};
18
18
use rustc_span:: symbol:: sym;
19
19
use std:: any:: Any ;
20
20
use std:: cell:: { Ref , RefCell , RefMut } ;
21
- use std:: mem;
22
21
use std:: rc:: Rc ;
23
22
24
23
/// Represent the result of a query.
@@ -395,37 +394,4 @@ impl Compiler {
395
394
396
395
ret
397
396
}
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
- }
431
397
}
You can’t perform that action at this time.
0 commit comments