File tree 3 files changed +6
-211
lines changed 3 files changed +6
-211
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,9 @@ impl Link {
147
147
// Adds feature attributes to mod
148
148
if features. len ( ) == 1 {
149
149
let feature = features. first ( ) ;
150
- foreign_mod. attrs . extend ( [
151
- syn:: parse_quote!( #[ cfg( feature = #feature) ] ) ,
152
- syn:: parse_quote!( #[ cfg_attr( docsrs, doc( cfg( feature = #feature) ) ) ] ) ,
153
- ] ) ;
150
+ foreign_mod
151
+ . attrs
152
+ . push ( syn:: parse_quote!( #[ cfg( feature = #feature) ] ) ) ;
154
153
} else {
155
154
let item_idents: Vec < _ > = items. iter ( ) . map ( foreign_item_ident) . collect ( ) ;
156
155
log:: warn!(
@@ -161,16 +160,10 @@ impl Link {
161
160
syn:: parse_quote!( feature = #feature)
162
161
} )
163
162
} ;
164
- foreign_mod. attrs . extend ( [
165
- {
163
+ foreign_mod. attrs . push ( {
166
164
let feature_gates = feature_gates ( ) ;
167
165
syn:: parse_quote!( #[ cfg( any( #( #feature_gates) , * ) ) ] )
168
- } ,
169
- {
170
- let feature_gates = feature_gates ( ) ;
171
- syn:: parse_quote!( #[ cfg_attr( docsrs, doc( cfg( any( #( #feature_gates) , * ) ) ) ) ] )
172
- } ,
173
- ] ) ;
166
+ } ) ;
174
167
}
175
168
176
169
// Adds items to mod
You can’t perform that action at this time.
0 commit comments