From 5353edb24a945007c6ebb4a0776d2d9e6f219ccc Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 17 Mar 2022 15:45:28 -0700 Subject: [PATCH] Reword quote_token explanation comment --- src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5e3d848..978baaa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -842,9 +842,12 @@ macro_rules! quote_token_with_context_spanned { } // These rules are ordered by approximate token frequency, at least for the -// first 10 or so, to improve compile times. Similarly, having the `$tokens` at -// the end allows for failing rules to fail as quickly as possible, and also helps -// reduce compile times for crates that use `quote!` heavily. +// first 10 or so, to improve compile times. Having `ident` first is by far the +// most important because it's typically 2-3x more common than the next most +// common token. +// +// Separately, we put the token being matched in the very front so that failing +// rules may fail to match as quickly as possible. #[macro_export] #[doc(hidden)] macro_rules! quote_token {