Skip to content

Commit 4338772

Browse files
committed
track-caller in parse_quote_spanned
When `parse_quote!` fails, show the location in user crate, not in `syn`.
1 parent 537b0c5 commit 4338772

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/parse_quote.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ use proc_macro2::TokenStream;
113113

114114
// Not public API.
115115
#[doc(hidden)]
116+
#[track_caller]
116117
pub fn parse<T: ParseQuote>(token_stream: TokenStream) -> T {
117118
let parser = T::parse;
118119
match parser.parse2(token_stream) {

0 commit comments

Comments
 (0)