about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-24 20:46:03 +0200
committerGitHub <noreply@github.com>2025-06-24 20:46:03 +0200
commit9f384c414c1c72c52aa4ff43366de59aa1f0d61d (patch)
tree8e0119e6b49acc5fec7d0881a2d9f54d37917c16 /compiler/rustc_ast/src
parent27819a009da72a5e6d90ae11c93595b32824deba (diff)
parentcd5de49eaa522ee10c0e8a6b36a067791270dca2 (diff)
downloadrust-9f384c414c1c72c52aa4ff43366de59aa1f0d61d.tar.gz
rust-9f384c414c1c72c52aa4ff43366de59aa1f0d61d.zip
Rollup merge of #142657 - tgross35:nonoptional-fragment-specifiers-cleanup, r=petrochenkov
mbe: Clean up code with non-optional `NonterminalKind`

Since [rust-lang/rust#128425], the fragment specifier is unconditionally required in all
editions. This means `NonTerminalKind` no longer needs to be optional,
as we can reject this code during the expansion of `macro_rules!` rather
than handling it throughout the code. Do this cleanup here.

[rust-lang/rust#128425]: https://github.com/rust-lang/rust/pull/128425
Diffstat (limited to 'compiler/rustc_ast/src')
-rw-r--r--compiler/rustc_ast/src/token.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs
index 54781e8235e..9b4535dcfbc 100644
--- a/compiler/rustc_ast/src/token.rs
+++ b/compiler/rustc_ast/src/token.rs
@@ -1085,6 +1085,7 @@ pub enum NtExprKind {
     Expr2021 { inferred: bool },
 }
 
+/// A macro nonterminal, known in documentation as a fragment specifier.
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Encodable, Decodable, Hash, HashStable_Generic)]
 pub enum NonterminalKind {
     Item,