From b9e9be38c01104dd7e1a23995ef89995357bd35b Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 17 Jun 2025 22:15:38 -0400 Subject: 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 --- compiler/rustc_ast/src/token.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_ast/src') 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, -- cgit 1.4.1-3-g733a5