@@ -8,7 +8,7 @@ mod item;
88
99use std:: borrow:: Cow ;
1010
11- use rustc_ast:: attr:: AttrIdGenerator ;
11+ use rustc_ast:: attr:: { AttrIdGenerator , AttributeExt } ;
1212use rustc_ast:: ptr:: P ;
1313use rustc_ast:: token:: {
1414 self , BinOpToken , CommentKind , Delimiter , IdentIsRaw , Nonterminal , Token , TokenKind ,
@@ -17,9 +17,9 @@ use rustc_ast::tokenstream::{Spacing, TokenStream, TokenTree};
1717use rustc_ast:: util:: classify;
1818use rustc_ast:: util:: comments:: { Comment , CommentStyle } ;
1919use 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,
2323} ;
2424use rustc_span:: edition:: Edition ;
2525use rustc_span:: source_map:: { SourceMap , Spanned } ;
@@ -640,20 +640,13 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
640640 AttrArgs :: Empty => {
641641 self . print_path ( & item. path , false , 0 ) ;
642642 }
643- AttrArgs :: Eq ( _, AttrArgsEq :: Ast ( expr) ) => {
643+ AttrArgs :: Eq ( _, expr) => {
644644 self . print_path ( & item. path , false , 0 ) ;
645645 self . space ( ) ;
646646 self . word_space ( "=" ) ;
647647 let token_str = self . expr_to_string ( expr) ;
648648 self . word ( token_str) ;
649649 }
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- }
657650 }
658651 self . end ( ) ;
659652 }
0 commit comments