@@ -26,12 +26,11 @@ use parser::Recovered;
2626use rustc_ast as ast;
2727use rustc_ast:: ptr:: P ;
2828use rustc_ast:: token:: { self , Delimiter , Lit , LitKind , Token , TokenKind } ;
29- use rustc_ast:: tokenstream:: AttrTokenTree ;
3029use rustc_ast:: util:: parser:: AssocOp ;
3130use rustc_ast:: {
3231 AngleBracketedArg , AngleBracketedArgs , AnonConst , AttrVec , BinOpKind , BindingAnnotation , Block ,
33- BlockCheckMode , Expr , ExprKind , GenericArg , Generics , HasTokens , Item , ItemKind , Param , Pat ,
34- PatKind , Path , PathSegment , QSelf , Ty , TyKind ,
32+ BlockCheckMode , Expr , ExprKind , GenericArg , Generics , Item , ItemKind , Param , Pat , PatKind ,
33+ Path , PathSegment , QSelf , Ty , TyKind ,
3534} ;
3635use rustc_ast_pretty:: pprust;
3736use rustc_data_structures:: fx:: FxHashSet ;
@@ -2363,15 +2362,14 @@ impl<'a> Parser<'a> {
23632362 }
23642363 err. span_label ( span, "expected expression" ) ;
23652364
2365+ /* njn: temp disabled, which hurts tests/ui/macros/trace_faulty_macros.rs
2366+
23662367 // Walk the chain of macro expansions for the current token to point at how the original
23672368 // code was interpreted. This helps the user realize when a macro argument of one type is
23682369 // later reinterpreted as a different type, like `$x:expr` being reinterpreted as `$x:pat`
23692370 // in a subsequent macro invocation (#71039).
23702371 let mut tok = self.token.clone();
23712372 let mut labels = vec![];
2372- if let token:: OpenDelim ( Delimiter :: Invisible ( _) ) = & tok. kind {
2373- panic ! ( "njn: invis-delim?" ) ;
2374- }
23752373 while let TokenKind::Interpolated(node) = &tok.kind {
23762374 let tokens = node.0.tokens();
23772375 labels.push(node.clone());
@@ -2381,9 +2379,6 @@ impl<'a> Parser<'a> {
23812379 && let [AttrTokenTree::Token(token, _)] = &tokens[..]
23822380 {
23832381 tok = token.clone();
2384- if let token:: OpenDelim ( Delimiter :: Invisible ( _) ) = & tok. kind {
2385- panic ! ( "njn: invis-delim?" ) ;
2386- }
23872382 } else {
23882383 break;
23892384 }
@@ -2421,6 +2416,7 @@ impl<'a> Parser<'a> {
24212416 tokens",
24222417 );
24232418 }
2419+ */
24242420 err
24252421 }
24262422
0 commit comments