Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15)

This commit is contained in:
bjorn3 2019-10-16 18:39:12 +02:00
parent fc261aa2f5
commit f0c774e05d
3 changed files with 24 additions and 27 deletions

View File

@ -21,14 +21,14 @@ index 8b76080..9e65de2 100644
use std::process; use std::process;
use std::process::{ExitStatus, Command, Termination}; use std::process::{ExitStatus, Command, Termination};
@@ -1493,7 +1493,7 @@ pub fn run_test( @@ -1493,7 +1493,7 @@ pub fn run_test(
report_time: bool, fn run_test_inner(
strategy: RunStrategy, desc: TestDesc,
monitor_ch: Sender<MonitorMsg>, monitor_ch: Sender<MonitorMsg>,
- testfn: Box<dyn FnOnce() + Send>, - testfn: Box<dyn FnOnce() + Send>,
+ testfn: Box<impl FnOnce() + Send + 'static>, + testfn: Box<impl FnOnce() + Send + 'static>,
concurrency: Concurrent, opts: TestRunOpts,
) { ) {
let name = desc.name.clone(); let concurrency = opts.concurrency;
@@ -1509,7 +1509,7 @@ pub fn run_test( @@ -1509,7 +1509,7 @@ pub fn run_test(
// If the platform is single-threaded we're just going to run // If the platform is single-threaded we're just going to run
// the test synchronously, regardless of the concurrency // the test synchronously, regardless of the concurrency
@ -38,7 +38,7 @@ index 8b76080..9e65de2 100644
if concurrency == Concurrent::Yes && supports_threads { if concurrency == Concurrent::Yes && supports_threads {
let cfg = thread::Builder::new().name(name.as_slice().to_owned()); let cfg = thread::Builder::new().name(name.as_slice().to_owned());
cfg.spawn(runtest).unwrap(); cfg.spawn(runtest).unwrap();
@@ -1531,20 +1531,8 @@ pub fn run_test( @@ -1531,17 +1531,8 @@ pub fn run_test(
(benchfn.clone())(harness) (benchfn.clone())(harness)
}); });
} }
@ -49,25 +49,25 @@ index 8b76080..9e65de2 100644
- }; - };
- run_test_inner( - run_test_inner(
- desc, - desc,
- opts.nocapture,
- opts.report_time,
- strategy,
- monitor_ch, - monitor_ch,
- Box::new(move || __rust_begin_short_backtrace(f)), - Box::new(move || __rust_begin_short_backtrace(f)),
- concurrency - test_run_opts,
- ); - );
+ DynTestFn(_f) => { + DynTestFn(_f) => {
+ unimplemented!(); + unimplemented!();
} }
StaticTestFn(f) => run_test_inner( StaticTestFn(f) => run_test_inner(
desc, desc,
@@ -1604,7 +1592,7 @@ fn get_result_from_exit_code(desc: &TestDesc, code: i32) -> TestResult { @@ -1604,10 +1592,10 @@ fn get_result_from_exit_code(desc: &TestDesc, code: i32) -> TestResult {
fn run_test_in_process(desc: TestDesc, fn run_test_in_process(
nocapture: bool, desc: TestDesc,
report_time: bool, nocapture: bool,
- testfn: Box<dyn FnOnce() + Send>, report_time: bool,
+ testfn: Box<impl FnOnce() + Send + 'static>, - testfn: Box<dyn FnOnce() + Send>,
monitor_ch: Sender<MonitorMsg>) { + testfn: Box<impl FnOnce() + Send + 'static>,
monitor_ch: Sender<MonitorMsg>,
time_opts: Option<TestTimeOptions>,
) {
// Buffer for capturing standard I/O // Buffer for capturing standard I/O
let data = Arc::new(Mutex::new(Vec::new())); let data = Arc::new(Mutex::new(Vec::new()));
@@ -1623,7 +1611,7 @@ fn run_test_in_process(desc: TestDesc, @@ -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 exec_time = start.map(|start| {
let duration = start.elapsed(); let duration = start.elapsed();
TestExecTime(duration) TestExecTime(duration)
@@ -1688,7 +1676,7 @@ fn spawn_test_subprocess(desc: TestDesc, report_time: bool, monitor_ch: Sender<M @@ -1688,10 +1676,10 @@ fn spawn_test_subprocess(desc: TestDesc, report_time: bool, monitor_ch: Sender<M
monitor_ch.send((desc.clone(), result, exec_time, test_output)).unwrap(); monitor_ch.send((desc.clone(), result, exec_time, test_output)).unwrap();
} }
-fn run_test_in_spawned_subprocess(desc: TestDesc, testfn: Box<dyn FnOnce() + Send>) -> ! { fn run_test_in_spawned_subprocess(
+fn run_test_in_spawned_subprocess(desc: TestDesc, testfn: Box<impl FnOnce() + Send + 'static>) -> ! { desc: TestDesc,
- testfn: Box<dyn FnOnce() + Send>,
+ testfn: Box<impl FnOnce() + Send + 'static>,
) -> ! {
let builtin_panic_hook = panic::take_hook(); let builtin_panic_hook = panic::take_hook();
let record_result = Arc::new(move |panic_info: Option<&'_ PanicInfo<'_>>| { let record_result = Arc::new(move |panic_info: Option<&'_ PanicInfo<'_>>| {
let test_result = match panic_info { let test_result = match panic_info {

View File

@ -333,6 +333,7 @@ impl<'tcx, B: Backend + 'static> HasTargetSpec for FunctionCx<'_, 'tcx, B> {
impl<'tcx, B: Backend> BackendTypes for FunctionCx<'_, 'tcx, B> { impl<'tcx, B: Backend> BackendTypes for FunctionCx<'_, 'tcx, B> {
type Value = Value; type Value = Value;
type Function = Value;
type BasicBlock = Ebb; type BasicBlock = Ebb;
type Type = Type; type Type = Type;
type Funclet = !; type Funclet = !;

View File

@ -171,10 +171,6 @@ impl CodegenBackend for CraneliftCodegenBackend {
} }
fn provide(&self, providers: &mut Providers) { 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| { providers.target_features_whitelist = |tcx, cnum| {
assert_eq!(cnum, LOCAL_CRATE); assert_eq!(cnum, LOCAL_CRATE);
if tcx.sess.opts.actually_rustdoc { if tcx.sess.opts.actually_rustdoc {
@ -195,10 +191,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
} }
}; };
} }
fn provide_extern(&self, providers: &mut Providers) { fn provide_extern(&self, _providers: &mut Providers) {}
rustc_codegen_ssa::back::symbol_export::provide_extern(providers);
rustc_codegen_ssa::base::provide_both(providers);
}
fn codegen_crate<'tcx>( fn codegen_crate<'tcx>(
&self, &self,