1
Fork 0

Remove two unnecessary references

This commit is contained in:
bjorn3 2024-12-12 14:00:02 +00:00
parent 6545a2dc92
commit 7738929097

View file

@ -394,7 +394,7 @@ fn run_compiler(
// If pretty printing is requested: Figure out the representation, print it and exit // If pretty printing is requested: Figure out the representation, print it and exit
if let Some(pp_mode) = sess.opts.pretty { if let Some(pp_mode) = sess.opts.pretty {
if pp_mode.needs_ast_map() { if pp_mode.needs_ast_map() {
create_and_enter_global_ctxt(&compiler, krate, |tcx| { create_and_enter_global_ctxt(compiler, krate, |tcx| {
tcx.ensure().early_lint_checks(()); tcx.ensure().early_lint_checks(());
pretty::print(sess, pp_mode, pretty::PrintExtra::NeedsAstMap { tcx }); pretty::print(sess, pp_mode, pretty::PrintExtra::NeedsAstMap { tcx });
passes::write_dep_info(tcx); passes::write_dep_info(tcx);
@ -414,7 +414,7 @@ fn run_compiler(
return early_exit(); return early_exit();
} }
let linker = create_and_enter_global_ctxt(&compiler, krate, |tcx| { let linker = create_and_enter_global_ctxt(compiler, krate, |tcx| {
let early_exit = || { let early_exit = || {
sess.dcx().abort_if_errors(); sess.dcx().abort_if_errors();
None None