Skip to content

Commit 0bb16c8

Browse files
authored
Rollup merge of #74119 - nnethercote:rm-Compiler-compile, r=Mark-Simulacrum
Remove `Compiler::compile()`. It's unused. r? @Mark-Simulacrum
2 parents 1527126 + 6582240 commit 0bb16c8

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/librustc_interface/queries.rs

-34
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use rustc_session::{output::find_crate_name, Session};
1818
use rustc_span::symbol::sym;
1919
use std::any::Any;
2020
use std::cell::{Ref, RefCell, RefMut};
21-
use std::mem;
2221
use 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
}

0 commit comments

Comments
 (0)