From e881e3ba982633240a9b47860f8108cb17508681 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Mon, 17 Dec 2018 07:36:14 +0000 Subject: [PATCH] Upgrade the metabuild to Rust 2018 --- src/cargo/core/compiler/custom_build.rs | 2 +- src/cargo/core/manifest.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/compiler/custom_build.rs b/src/cargo/core/compiler/custom_build.rs index 9480bf36507..fad916d0443 100644 --- a/src/cargo/core/compiler/custom_build.rs +++ b/src/cargo/core/compiler/custom_build.rs @@ -571,7 +571,7 @@ fn prepare_metabuild<'a, 'cfg>( }) .collect(); for dep in &meta_deps { - output.push(format!("extern crate {};\n", dep)); + output.push(format!("use {};\n", dep)); } output.push("fn main() {\n".to_string()); for dep in &meta_deps { diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index fd3734d351a..a89b53997e5 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -638,7 +638,7 @@ impl Target { for_host: true, benched: false, tested: false, - ..Target::new(TargetSourcePath::Metabuild, Edition::Edition2015) + ..Target::new(TargetSourcePath::Metabuild, Edition::Edition2018) } }