From f0c774e05d3ce268f845349f09317a229cd91481 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 16 Oct 2019 18:39:12 +0200 Subject: [PATCH] Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15) --- patches/0017-Fix-libtest-compilation.patch | 41 ++++++++++++---------- src/common.rs | 1 + src/lib.rs | 9 +---- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/patches/0017-Fix-libtest-compilation.patch b/patches/0017-Fix-libtest-compilation.patch index 05b5675d43b..b7a7267cd78 100644 --- a/patches/0017-Fix-libtest-compilation.patch +++ b/patches/0017-Fix-libtest-compilation.patch @@ -21,14 +21,14 @@ index 8b76080..9e65de2 100644 use std::process; use std::process::{ExitStatus, Command, Termination}; @@ -1493,7 +1493,7 @@ pub fn run_test( - report_time: bool, - strategy: RunStrategy, + fn run_test_inner( + desc: TestDesc, monitor_ch: Sender, - testfn: Box, + testfn: Box, - concurrency: Concurrent, + opts: TestRunOpts, ) { - let name = desc.name.clone(); + let concurrency = opts.concurrency; @@ -1509,7 +1509,7 @@ pub fn run_test( // If the platform is single-threaded we're just going to run // the test synchronously, regardless of the concurrency @@ -38,7 +38,7 @@ index 8b76080..9e65de2 100644 if concurrency == Concurrent::Yes && supports_threads { let cfg = thread::Builder::new().name(name.as_slice().to_owned()); cfg.spawn(runtest).unwrap(); -@@ -1531,20 +1531,8 @@ pub fn run_test( +@@ -1531,17 +1531,8 @@ pub fn run_test( (benchfn.clone())(harness) }); } @@ -49,25 +49,25 @@ index 8b76080..9e65de2 100644 - }; - run_test_inner( - desc, -- opts.nocapture, -- opts.report_time, -- strategy, - monitor_ch, - Box::new(move || __rust_begin_short_backtrace(f)), -- concurrency +- test_run_opts, - ); + DynTestFn(_f) => { + unimplemented!(); } StaticTestFn(f) => run_test_inner( desc, -@@ -1604,7 +1592,7 @@ fn get_result_from_exit_code(desc: &TestDesc, code: i32) -> TestResult { - fn run_test_in_process(desc: TestDesc, - nocapture: bool, - report_time: bool, -- testfn: Box, -+ testfn: Box, - monitor_ch: Sender) { +@@ -1604,10 +1592,10 @@ fn get_result_from_exit_code(desc: &TestDesc, code: i32) -> TestResult { + fn run_test_in_process( + desc: TestDesc, + nocapture: bool, + report_time: bool, +- testfn: Box, ++ testfn: Box, + monitor_ch: Sender, + time_opts: Option, + ) { // Buffer for capturing standard I/O let data = Arc::new(Mutex::new(Vec::new())); @@ -1623,7 +1611,7 @@ fn run_test_in_process(desc: TestDesc, @@ -79,12 +79,15 @@ index 8b76080..9e65de2 100644 let exec_time = start.map(|start| { let duration = start.elapsed(); TestExecTime(duration) -@@ -1688,7 +1676,7 @@ fn spawn_test_subprocess(desc: TestDesc, report_time: bool, monitor_ch: Sender) -> ! { -+fn run_test_in_spawned_subprocess(desc: TestDesc, testfn: Box) -> ! { + fn run_test_in_spawned_subprocess( + desc: TestDesc, +- testfn: Box, ++ testfn: Box, + ) -> ! { let builtin_panic_hook = panic::take_hook(); let record_result = Arc::new(move |panic_info: Option<&'_ PanicInfo<'_>>| { let test_result = match panic_info { diff --git a/src/common.rs b/src/common.rs index 3ebae0506c5..ff38c71fde9 100644 --- a/src/common.rs +++ b/src/common.rs @@ -333,6 +333,7 @@ impl<'tcx, B: Backend + 'static> HasTargetSpec for FunctionCx<'_, 'tcx, B> { impl<'tcx, B: Backend> BackendTypes for FunctionCx<'_, 'tcx, B> { type Value = Value; + type Function = Value; type BasicBlock = Ebb; type Type = Type; type Funclet = !; diff --git a/src/lib.rs b/src/lib.rs index 60b113ade0d..489ea71d33b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -171,10 +171,6 @@ impl CodegenBackend for CraneliftCodegenBackend { } fn provide(&self, providers: &mut Providers) { - rustc_codegen_utils::symbol_names::provide(providers); - rustc_codegen_ssa::back::symbol_export::provide(providers); - rustc_codegen_ssa::base::provide_both(providers); - providers.target_features_whitelist = |tcx, cnum| { assert_eq!(cnum, LOCAL_CRATE); if tcx.sess.opts.actually_rustdoc { @@ -195,10 +191,7 @@ impl CodegenBackend for CraneliftCodegenBackend { } }; } - fn provide_extern(&self, providers: &mut Providers) { - rustc_codegen_ssa::back::symbol_export::provide_extern(providers); - rustc_codegen_ssa::base::provide_both(providers); - } + fn provide_extern(&self, _providers: &mut Providers) {} fn codegen_crate<'tcx>( &self,