1
Fork 0

Avoid Lrc<Box<dyn CodegenBackend>>.

Because `Lrc<Box<T>>` is silly. (Clippy warns about `Rc<Box<T>>` and
`Arc<Box<T>>`, and it would warn here if (a) we used Clippy with rustc,
and (b) Clippy knew about `Lrc`.)
This commit is contained in:
Nicholas Nethercote 2023-06-22 09:18:09 +10:00
parent 006a26c0b5
commit 5dd7550a08
3 changed files with 8 additions and 8 deletions

View file

@ -329,7 +329,7 @@ fn run_compiler(
return;
}
let should_stop =
print_crate_info(&***compiler.codegen_backend(), compiler.session(), false);
print_crate_info(&**compiler.codegen_backend(), compiler.session(), false);
if should_stop == Compilation::Stop {
return;
@ -351,7 +351,7 @@ fn run_compiler(
interface::run_compiler(config, |compiler| {
let sess = compiler.session();
let should_stop = print_crate_info(&***compiler.codegen_backend(), sess, true)
let should_stop = print_crate_info(&**compiler.codegen_backend(), sess, true)
.and_then(|| list_metadata(sess, &*compiler.codegen_backend().metadata_loader()))
.and_then(|| try_process_rlink(sess, compiler));