diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2025-04-27 18:53:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-27 18:53:00 +0900 |
| commit | d91ffb6da5c306150e53f73a361f69837bc39851 (patch) | |
| tree | ee6518c803de044596ce0e095d38bd7cab0f4a57 /compiler/rustc_attr_parsing/src | |
| parent | 89bb181106817c7828c16dc75ce5b2a367664471 (diff) | |
| parent | 1b315ad92df192895fb2d1f0532270c54f6f8436 (diff) | |
| download | rust-d91ffb6da5c306150e53f73a361f69837bc39851.tar.gz rust-d91ffb6da5c306150e53f73a361f69837bc39851.zip | |
Merge pull request #2351 from rust-lang/rustc-pull
Diffstat (limited to 'compiler/rustc_attr_parsing/src')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/parser.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_attr_parsing/src/parser.rs b/compiler/rustc_attr_parsing/src/parser.rs index 384fae59873..40aa39711d3 100644 --- a/compiler/rustc_attr_parsing/src/parser.rs +++ b/compiler/rustc_attr_parsing/src/parser.rs @@ -430,9 +430,7 @@ impl<'a> MetaItemListParserContext<'a> { let span = span.with_hi(segments.last().unwrap().span.hi()); Some(AttrPath { segments: segments.into_boxed_slice(), span }) } - TokenTree::Token(Token { kind: token::OpenDelim(_) | token::CloseDelim(_), .. }, _) => { - None - } + TokenTree::Token(Token { kind, .. }, _) if kind.is_delim() => None, _ => { // malformed attributes can get here. We can't crash, but somewhere else should've // already warned for this. |
