diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-04-18 20:09:37 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-28 08:42:14 +1100 |
| commit | 50076cdeb9fd1ecf2d85e481dc284525f9c509db (patch) | |
| tree | bc7c5e4524974d75bd6c5f75e08bb89846c0ed5b /compiler/rustc_ast/src/attr/mod.rs | |
| parent | 7ea59e053bed52249ba8f42cbdbc7301312197e3 (diff) | |
| download | rust-50076cdeb9fd1ecf2d85e481dc284525f9c509db.tar.gz rust-50076cdeb9fd1ecf2d85e481dc284525f9c509db.zip | |
Remove `NtPath`.
Diffstat (limited to 'compiler/rustc_ast/src/attr/mod.rs')
| -rw-r--r-- | compiler/rustc_ast/src/attr/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_ast/src/attr/mod.rs b/compiler/rustc_ast/src/attr/mod.rs index be2e897e460..4d613085d79 100644 --- a/compiler/rustc_ast/src/attr/mod.rs +++ b/compiler/rustc_ast/src/attr/mod.rs @@ -405,14 +405,12 @@ impl MetaItem { let span = span.with_hi(segments.last().unwrap().ident.span.hi()); Path { span, segments, tokens: None } } - Some(TokenTree::Token(Token { kind: token::Interpolated(nt), .. }, _)) => match &**nt { - token::Nonterminal::NtPath(path) => (**path).clone(), - _ => return None, - }, Some(TokenTree::Delimited( _span, _spacing, - Delimiter::Invisible(InvisibleOrigin::MetaVar(MetaVarKind::Meta { .. })), + Delimiter::Invisible(InvisibleOrigin::MetaVar( + MetaVarKind::Meta { .. } | MetaVarKind::Path, + )), _stream, )) => { // This path is currently unreachable in the test suite. |
