File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use super :: * ;
22use proc_macro2:: TokenStream ;
3+ #[ cfg( feature = "printing" ) ]
34use std:: iter;
5+ #[ cfg( feature = "printing" ) ]
46use std:: slice;
57
68#[ cfg( feature = "parsing" ) ]
@@ -582,13 +584,16 @@ impl MetaList {
582584 }
583585}
584586
587+ #[ cfg( feature = "printing" ) ]
585588pub ( crate ) trait FilterAttrs < ' a > {
586589 type Ret : Iterator < Item = & ' a Attribute > ;
587590
588591 fn outer ( self ) -> Self :: Ret ;
592+ #[ cfg( feature = "full" ) ]
589593 fn inner ( self ) -> Self :: Ret ;
590594}
591595
596+ #[ cfg( feature = "printing" ) ]
592597impl < ' a > FilterAttrs < ' a > for & ' a [ Attribute ] {
593598 type Ret = iter:: Filter < slice:: Iter < ' a , Attribute > , fn ( & & Attribute ) -> bool > ;
594599
@@ -602,6 +607,7 @@ impl<'a> FilterAttrs<'a> for &'a [Attribute] {
602607 self . iter ( ) . filter ( is_outer)
603608 }
604609
610+ #[ cfg( feature = "full" ) ]
605611 fn inner ( self ) -> Self :: Ret {
606612 fn is_inner ( attr : & & Attribute ) -> bool {
607613 match attr. style {
You can’t perform that action at this time.
0 commit comments