diff options
| author | He1pa <18012015693@163.com> | 2023-06-21 19:01:53 +0800 |
|---|---|---|
| committer | He1pa <18012015693@163.com> | 2023-06-25 01:32:30 +0800 |
| commit | 8af8a95a64cd765273aae3f4dc0aa50faab148c9 (patch) | |
| tree | 06252a6f90b3ff73ea2a1bb495c39f462f5863d9 /compiler/rustc_builtin_macros/src/test.rs | |
| parent | ed1ce580ec27ffcfda1a95512e69185442f75ebe (diff) | |
| download | rust-8af8a95a64cd765273aae3f4dc0aa50faab148c9.tar.gz rust-8af8a95a64cd765273aae3f4dc0aa50faab148c9.zip | |
Migrate some rustc_builtin_macros to SessionDiagnostic
Diffstat (limited to 'compiler/rustc_builtin_macros/src/test.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/test.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index d7a92dac50f..6bc4f6fc1fc 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -576,12 +576,7 @@ fn check_bench_signature( // N.B., inadequate check, but we're running // well before resolve, can't get too deep. if f.sig.decl.inputs.len() != 1 { - return Err(cx.sess.parse_sess.span_diagnostic.span_err( - i.span, - "functions used as benches must have \ - signature `fn(&mut Bencher) -> impl Termination`", - )); + return Err(cx.sess.parse_sess.span_diagnostic.emit_err(errors::BenchSig { span: i.span })); } - Ok(()) } |
