From 43387720a3d52db3c148e5383cd6d9ef3b766611 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Sun, 23 Jun 2024 21:02:08 +0100 Subject: [PATCH] track-caller in parse_quote_spanned When `parse_quote!` fails, show the location in user crate, not in `syn`. --- src/parse_quote.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parse_quote.rs b/src/parse_quote.rs index c4f47e16d..22cd98eff 100644 --- a/src/parse_quote.rs +++ b/src/parse_quote.rs @@ -113,6 +113,7 @@ use proc_macro2::TokenStream; // Not public API. #[doc(hidden)] +#[track_caller] pub fn parse(token_stream: TokenStream) -> T { let parser = T::parse; match parser.parse2(token_stream) {