rustc: Move crate_types
from Session
to GlobalCtxt
Removes a piece of mutable state. Follow up to #114578.
This commit is contained in:
parent
8838c73e86
commit
0b89aac08d
26 changed files with 108 additions and 108 deletions
|
@ -69,7 +69,7 @@ pub fn link_binary<'a>(
|
|||
let _timer = sess.timer("link_binary");
|
||||
let output_metadata = sess.opts.output_types.contains_key(&OutputType::Metadata);
|
||||
let mut tempfiles_for_stdout_output: Vec<PathBuf> = Vec::new();
|
||||
for &crate_type in sess.crate_types().iter() {
|
||||
for &crate_type in &codegen_results.crate_info.crate_types {
|
||||
// Ignore executable crates if we have -Z no-codegen, as they will error.
|
||||
if (sess.opts.unstable_opts.no_codegen || !sess.opts.output_types.should_codegen())
|
||||
&& !output_metadata
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue