diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-21 07:52:30 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-07 12:56:41 +1000 |
| commit | d81472f2669c266c13209855e089ff96303092fc (patch) | |
| tree | 14129bce221408e4a39cfa37c17b81e1a510fa5f /compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs | |
| parent | ab62d56603293e9264b4d811d2d6f5b49a3264f9 (diff) | |
| download | rust-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.rs | 2 |
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 { |
