about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-06-17 22:15:38 -0400
committerTrevor Gross <tmgross@umich.edu>2025-06-24 04:37:36 -0400
commitb9e9be38c01104dd7e1a23995ef89995357bd35b (patch)
tree0b8b8fba254888597f1de25d2180d22e68210257 /compiler/rustc_ast/src
parentbe927caf063b5da94cae8f3f697d190f83115a4f (diff)
downloadrust-b9e9be38c01104dd7e1a23995ef89995357bd35b.tar.gz
rust-b9e9be38c01104dd7e1a23995ef89995357bd35b.zip
mbe: Clean up code with non-optional `NonterminalKind`
Since [1], 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.

[1]: 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,