From 13b262491dca82b521ad58446d73cff16e6fe63e Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 2 Jul 2020 10:17:06 +0200 Subject: [PATCH] Fix compilation error. --- src/cargo/core/compiler/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index b3bdd9764..ec22c4ea3 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -214,7 +214,7 @@ fn rustc(cx: &mut Context<'_, '_>, unit: &Unit, exec: &Arc) -> Car // If we are a binary and the package also contains a library, then we // don't pass the `-l` flags. let pass_l_flag = unit.target.is_lib() || !unit.pkg.targets().iter().any(|t| t.is_lib()); - let link_type = unit.target.into(); + let link_type = (&unit.target).into(); let extra_link_arg = cx.bcx.config.cli_unstable().extra_link_arg; let dep_info_name = match cx.files().metadata(unit) {