Skip to content

Commit

Permalink
track-caller in parse_quote_spanned
Browse files Browse the repository at this point in the history
When `parse_quote!` fails, show the location in user crate, not in
`syn`.
  • Loading branch information
stepancheg committed Jun 23, 2024
1 parent 537b0c5 commit 4338772
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/parse_quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ use proc_macro2::TokenStream;

// Not public API.
#[doc(hidden)]
#[track_caller]
pub fn parse<T: ParseQuote>(token_stream: TokenStream) -> T {
let parser = T::parse;
match parser.parse2(token_stream) {
Expand Down

0 comments on commit 4338772

Please sign in to comment.