Remove attr matcher from test and bench macro

Formerly needed for conditional i128 support.
This commit is contained in:
David Tolnay 2021-12-11 21:02:31 -08:00
parent 2581c8cee7
commit 6b06fb04f7
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 2 additions and 15 deletions

View File

@ -5,16 +5,10 @@
extern crate test;
macro_rules! benches {
(
$(
$(#[$attr:meta])*
$name:ident($value:expr)
),*
) => {
($($name:ident($value:expr)),*) => {
mod bench_itoa_format {
use test::{Bencher, black_box};
$(
$(#[$attr])*
#[bench]
fn $name(b: &mut Bencher) {
let mut buffer = itoa::Buffer::new();
@ -30,7 +24,6 @@ macro_rules! benches {
mod bench_std_fmt {
use test::{Bencher, black_box};
$(
$(#[$attr])*
#[bench]
fn $name(b: &mut Bencher) {
use std::io::Write;

View File

@ -2,14 +2,8 @@
#![allow(clippy::cast_lossless, clippy::unseparated_literal_suffix)]
macro_rules! test {
(
($($name:ident($value:expr, $expected:expr)),*) => {
$(
$(#[$attr:meta])*
$name:ident($value:expr, $expected:expr)
),*
) => {
$(
$(#[$attr])*
#[test]
fn $name() {
let mut buffer = itoa::Buffer::new();