@@ -870,6 +870,7 @@ impl Token {
870870 /// Is this a pre-parsed expression dropped into the token stream
871871 /// (which happens while parsing the result of macro expansion)?
872872 pub fn is_whole_expr ( & self ) -> bool {
873+ #[ allow( irrefutable_let_patterns) ] // FIXME: temporary
873874 if let Interpolated ( nt) = & self . kind
874875 && let NtExpr ( _) | NtLiteral ( _) | NtBlock ( _) = & * * nt
875876 {
@@ -1103,9 +1104,7 @@ pub enum NtExprKind {
11031104#[ derive( Clone , Encodable , Decodable ) ]
11041105/// For interpolation during macro expansion.
11051106pub enum Nonterminal {
1106- NtItem ( P < ast:: Item > ) ,
11071107 NtBlock ( P < ast:: Block > ) ,
1108- NtStmt ( P < ast:: Stmt > ) ,
11091108 NtExpr ( P < ast:: Expr > ) ,
11101109 NtLiteral ( P < ast:: Expr > ) ,
11111110}
@@ -1196,18 +1195,14 @@ impl fmt::Display for NonterminalKind {
11961195impl Nonterminal {
11971196 pub fn use_span ( & self ) -> Span {
11981197 match self {
1199- NtItem ( item) => item. span ,
12001198 NtBlock ( block) => block. span ,
1201- NtStmt ( stmt) => stmt. span ,
12021199 NtExpr ( expr) | NtLiteral ( expr) => expr. span ,
12031200 }
12041201 }
12051202
12061203 pub fn descr ( & self ) -> & ' static str {
12071204 match self {
1208- NtItem ( ..) => "item" ,
12091205 NtBlock ( ..) => "block" ,
1210- NtStmt ( ..) => "statement" ,
12111206 NtExpr ( ..) => "expression" ,
12121207 NtLiteral ( ..) => "literal" ,
12131208 }
@@ -1227,9 +1222,7 @@ impl PartialEq for Nonterminal {
12271222impl fmt:: Debug for Nonterminal {
12281223 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
12291224 match * self {
1230- NtItem ( ..) => f. pad ( "NtItem(..)" ) ,
12311225 NtBlock ( ..) => f. pad ( "NtBlock(..)" ) ,
1232- NtStmt ( ..) => f. pad ( "NtStmt(..)" ) ,
12331226 NtExpr ( ..) => f. pad ( "NtExpr(..)" ) ,
12341227 NtLiteral ( ..) => f. pad ( "NtLiteral(..)" ) ,
12351228 }
0 commit comments