-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
line num capped to 2 digits in errors #65059
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Compare
sysroot_src/src/libtest/lib.rs:1627:42with16| let result = Ok(testfn());.$ rustc -V rustc 1.40.0-nightly (2daa404e9 2019-10-02) $ git diff diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 8b76080..7d57460 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -1493,7 +1493,7 @@ pub fn run_test( report_time: bool, strategy: RunStrategy, monitor_ch: Sender<MonitorMsg>, - testfn: Box<dyn FnOnce() + Send>, + testfn: Box<impl FnOnce() + Send + 'static>, concurrency: Concurrent, ) { let name = desc.name.clone(); @@ -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 // level. - let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_arch = "wasm32"); + let supports_threads = false; 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( (benchfn.clone())(harness) }); } - DynTestFn(f) => { - match strategy { - RunStrategy::InProcess => (), - _ => panic!("Cannot run dynamic test fn out-of-process"), - }; - run_test_inner( - desc, - opts.nocapture, - opts.report_time, - strategy, - monitor_ch, - Box::new(move || __rust_begin_short_backtrace(f)), - concurrency - ); + DynTestFn(_f) => { + unimplemented!(); } StaticTestFn(f) => run_test_inner( desc, @@ -1623,7 +1611,7 @@ fn run_test_in_process(desc: TestDesc, } else { None }; - let result = catch_unwind(AssertUnwindSafe(testfn)); + let result = Ok(testfn()); let exec_time = start.map(|start| { let duration = start.elapsed(); TestExecTime(duration)