Remove MetaItemParser::{path,deconstruct}.

They're equivalent, and `path` is unused, and `deconstruct` has only one
call site outside of `path`.
This commit is contained in:
Nicholas Nethercote
2025-05-20 11:57:21 +10:00
parent ea3b3fdcc1
commit 2cd2d24967
2 changed files with 7 additions and 15 deletions

View File

@@ -260,7 +260,8 @@ impl<'sess> AttributeParser<'sess> {
// }
ast::AttrKind::Normal(n) => {
let parser = MetaItemParser::from_attr(n, self.dcx());
let (path, args) = parser.deconstruct();
let path = parser.path_without_args();
let args = parser.args();
let parts = path.segments().map(|i| i.name).collect::<Vec<_>>();
if let Some(accepts) = ATTRIBUTE_MAPPING.0.get(parts.as_slice()) {