Rollup merge of #94537 - est31:master, r=notriddle

Use ? operator in one instance instead of manual match

As suggested [here](https://github.com/rust-lang/rust/pull/94139#discussion_r818102403).

r? `@notriddle`
This commit is contained in:
Matthias Krüger 2022-03-03 11:02:55 +01:00 committed by GitHub
commit 98c9ee8917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,8 @@
let externs = options.externs.clone();
let json_unused_externs = options.json_unused_externs;
let res = interface::run_compiler(config, |compiler| {
let (tests, unused_extern_reports, compiling_test_count) =
interface::run_compiler(config, |compiler| {
compiler.enter(|queries| {
let mut global_ctxt = queries.global_ctxt()?.take();
@ -158,11 +159,7 @@
Ok((collector.tests, unused_extern_reports, compiling_test_count));
ret
})
});
let (tests, unused_extern_reports, compiling_test_count) = match res {
Ok(res) => res,
Err(ErrorGuaranteed) => return Err(ErrorGuaranteed),
};
})?;
run_tests(test_args, nocapture, tests);