Skip to content

Commit

Permalink
Fix spanned fallback literal construction
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 21, 2024
1 parent ec55645 commit d2c0e61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ fn doc_comment<'a>(input: Cursor<'a>, trees: &mut TokenStreamBuilder) -> PResult
let doc_ident = crate::Ident::_new(crate::imp::Ident::new_unchecked("doc", fallback_span));
let mut equal = Punct::new('=', Spacing::Alone);
equal.set_span(span);
let mut literal = crate::Literal::string(comment);
let mut literal = crate::Literal::_new_fallback(Literal::string(comment));
literal.set_span(span);
let mut bracketed = TokenStreamBuilder::with_capacity(3);
bracketed.push_token_from_parser(TokenTree::Ident(doc_ident));
Expand Down

0 comments on commit d2c0e61

Please sign in to comment.