about summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-04-21 07:52:30 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2025-05-07 12:56:41 +1000
commitd81472f2669c266c13209855e089ff96303092fc (patch)
tree14129bce221408e4a39cfa37c17b81e1a510fa5f /compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
parentab62d56603293e9264b4d811d2d6f5b49a3264f9 (diff)
downloadrust-d81472f2669c266c13209855e089ff96303092fc.tar.gz
rust-d81472f2669c266c13209855e089ff96303092fc.zip
Eliminate `word_or_empty` methods.
To get rid of the `Ident::empty` uses.

This requires introducing `PathParser::word_sym`, as an alternative to
`PathParser::word`.
Diffstat (limited to 'compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs')
-rw-r--r--compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs b/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
index d37ede86cfd..c1d95d07f4c 100644
--- a/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
+++ b/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
@@ -53,7 +53,7 @@ fn parse_unstable<'a>(
 
     for param in list.mixed() {
         let param_span = param.span();
-        if let Some(ident) = param.meta_item().and_then(|i| i.word_without_args()) {
+        if let Some(ident) = param.meta_item().and_then(|i| i.path_without_args().word()) {
             res.push(ident.name);
         } else {
             cx.emit_err(session_diagnostics::ExpectsFeatures {