@@ -26,12 +26,11 @@ use parser::Recovered;
26
26
use rustc_ast as ast;
27
27
use rustc_ast:: ptr:: P ;
28
28
use rustc_ast:: token:: { self , Delimiter , Lit , LitKind , Token , TokenKind } ;
29
- use rustc_ast:: tokenstream:: AttrTokenTree ;
30
29
use rustc_ast:: util:: parser:: AssocOp ;
31
30
use rustc_ast:: {
32
31
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 ,
35
34
} ;
36
35
use rustc_ast_pretty:: pprust;
37
36
use rustc_data_structures:: fx:: FxHashSet ;
@@ -2363,15 +2362,14 @@ impl<'a> Parser<'a> {
2363
2362
}
2364
2363
err. span_label ( span, "expected expression" ) ;
2365
2364
2365
+ /* njn: temp disabled, which hurts tests/ui/macros/trace_faulty_macros.rs
2366
+
2366
2367
// Walk the chain of macro expansions for the current token to point at how the original
2367
2368
// code was interpreted. This helps the user realize when a macro argument of one type is
2368
2369
// later reinterpreted as a different type, like `$x:expr` being reinterpreted as `$x:pat`
2369
2370
// in a subsequent macro invocation (#71039).
2370
2371
let mut tok = self.token.clone();
2371
2372
let mut labels = vec![];
2372
- if let token:: OpenDelim ( Delimiter :: Invisible ( _) ) = & tok. kind {
2373
- panic ! ( "njn: invis-delim?" ) ;
2374
- }
2375
2373
while let TokenKind::Interpolated(node) = &tok.kind {
2376
2374
let tokens = node.0.tokens();
2377
2375
labels.push(node.clone());
@@ -2381,9 +2379,6 @@ impl<'a> Parser<'a> {
2381
2379
&& let [AttrTokenTree::Token(token, _)] = &tokens[..]
2382
2380
{
2383
2381
tok = token.clone();
2384
- if let token:: OpenDelim ( Delimiter :: Invisible ( _) ) = & tok. kind {
2385
- panic ! ( "njn: invis-delim?" ) ;
2386
- }
2387
2382
} else {
2388
2383
break;
2389
2384
}
@@ -2421,6 +2416,7 @@ impl<'a> Parser<'a> {
2421
2416
tokens",
2422
2417
);
2423
2418
}
2419
+ */
2424
2420
err
2425
2421
}
2426
2422
0 commit comments