@@ -8,7 +8,7 @@ mod item;
8
8
9
9
use std:: borrow:: Cow ;
10
10
11
- use rustc_ast:: attr:: AttrIdGenerator ;
11
+ use rustc_ast:: attr:: { AttrIdGenerator , AttributeExt } ;
12
12
use rustc_ast:: ptr:: P ;
13
13
use rustc_ast:: token:: {
14
14
self , BinOpToken , CommentKind , Delimiter , IdentIsRaw , Nonterminal , Token , TokenKind ,
@@ -17,9 +17,9 @@ use rustc_ast::tokenstream::{Spacing, TokenStream, TokenTree};
17
17
use rustc_ast:: util:: classify;
18
18
use rustc_ast:: util:: comments:: { Comment , CommentStyle } ;
19
19
use rustc_ast:: {
20
- self as ast, AttrArgs , AttrArgsEq , BindingMode , BlockCheckMode , ByRef , DelimArgs , GenericArg ,
21
- GenericBound , InlineAsmOperand , InlineAsmOptions , InlineAsmRegOrRegClass ,
22
- InlineAsmTemplatePiece , PatKind , RangeEnd , RangeSyntax , Safety , SelfKind , Term , attr,
20
+ self as ast, AttrArgs , BindingMode , BlockCheckMode , ByRef , DelimArgs , GenericArg , GenericBound ,
21
+ InlineAsmOperand , InlineAsmOptions , InlineAsmRegOrRegClass , InlineAsmTemplatePiece , PatKind ,
22
+ RangeEnd , RangeSyntax , Safety , SelfKind , Term , attr,
23
23
} ;
24
24
use rustc_span:: edition:: Edition ;
25
25
use rustc_span:: source_map:: { SourceMap , Spanned } ;
@@ -640,20 +640,13 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
640
640
AttrArgs :: Empty => {
641
641
self . print_path ( & item. path , false , 0 ) ;
642
642
}
643
- AttrArgs :: Eq ( _, AttrArgsEq :: Ast ( expr) ) => {
643
+ AttrArgs :: Eq ( _, expr) => {
644
644
self . print_path ( & item. path , false , 0 ) ;
645
645
self . space ( ) ;
646
646
self . word_space ( "=" ) ;
647
647
let token_str = self . expr_to_string ( expr) ;
648
648
self . word ( token_str) ;
649
649
}
650
- AttrArgs :: Eq ( _, AttrArgsEq :: Hir ( lit) ) => {
651
- self . print_path ( & item. path , false , 0 ) ;
652
- self . space ( ) ;
653
- self . word_space ( "=" ) ;
654
- let token_str = self . meta_item_lit_to_string ( lit) ;
655
- self . word ( token_str) ;
656
- }
657
650
}
658
651
self . end ( ) ;
659
652
}
0 commit comments