• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #![allow(unknown_lints, special_module_name)]
2 #![allow(
3     clippy::cast_lossless,
4     clippy::let_underscore_untyped,
5     clippy::uninlined_format_args
6 )]
7 
8 quote_benchmark::run_quote_benchmark!(_);
9 
10 mod benchmark {
11     macro_rules! benchmark {
12         (|$ident:ident| $quote:expr) => {
13             use proc_macro2::{Ident, Span};
14 
15             pub fn quote() -> proc_macro2::TokenStream {
16                 let $ident = Ident::new("Response", Span::call_site());
17                 $quote
18             }
19         };
20     }
21 
22     pub(crate) use benchmark;
23 }
24 
25 use benchmark::benchmark;
26 
27 mod lib;
28 mod timer;
29 
main()30 fn main() {
31     timer::time("non-macro", lib::quote);
32 }
33