Rollup merge of #141271 - nnethercote:attr-streamline, r=jdonszelmann

Streamline some attr parsing APIs

r? ``@jdonszelmann``
This commit is contained in:
Matthias Krüger
2025-06-04 16:24:06 +02:00
committed by GitHub
6 changed files with 20 additions and 65 deletions

View File

@@ -96,7 +96,7 @@ fn parse_repr(cx: &AcceptContext<'_>, param: &MetaItemParser<'_>) -> Option<Repr
// FIXME(jdonszelmann): invert the parsing here to match on the word first and then the
// structure.
let (name, ident_span) = if let Some(ident) = param.path_without_args().word() {
let (name, ident_span) = if let Some(ident) = param.path().word() {
(Some(ident.name), ident.span)
} else {
(None, DUMMY_SP)