@@ -191,8 +191,6 @@ impl StructData {
191
191
let krate = loc. container . krate ;
192
192
let item_tree = loc. id . item_tree ( db) ;
193
193
let repr = repr_from_value ( db, krate, & item_tree, ModItem :: from ( loc. id . value ) . into ( ) ) ;
194
- let cfg_options = db. crate_graph ( ) [ krate] . cfg_options . clone ( ) ;
195
-
196
194
let attrs = item_tree. attrs ( db, krate, ModItem :: from ( loc. id . value ) . into ( ) ) ;
197
195
198
196
let mut flags = StructFlags :: NO_FLAGS ;
@@ -219,7 +217,7 @@ impl StructData {
219
217
loc. id . file_id ( ) ,
220
218
loc. container . local_id ,
221
219
& item_tree,
222
- & cfg_options,
220
+ & db . crate_graph ( ) [ krate ] . cfg_options ,
223
221
& strukt. fields ,
224
222
None ,
225
223
) ;
@@ -248,8 +246,6 @@ impl StructData {
248
246
let krate = loc. container . krate ;
249
247
let item_tree = loc. id . item_tree ( db) ;
250
248
let repr = repr_from_value ( db, krate, & item_tree, ModItem :: from ( loc. id . value ) . into ( ) ) ;
251
- let cfg_options = db. crate_graph ( ) [ krate] . cfg_options . clone ( ) ;
252
-
253
249
let attrs = item_tree. attrs ( db, krate, ModItem :: from ( loc. id . value ) . into ( ) ) ;
254
250
let mut flags = StructFlags :: NO_FLAGS ;
255
251
if attrs. by_key ( "rustc_has_incoherent_inherent_impls" ) . exists ( ) {
@@ -266,7 +262,7 @@ impl StructData {
266
262
loc. id . file_id ( ) ,
267
263
loc. container . local_id ,
268
264
& item_tree,
269
- & cfg_options,
265
+ & db . crate_graph ( ) [ krate ] . cfg_options ,
270
266
& union. fields ,
271
267
None ,
272
268
) ;
@@ -338,7 +334,6 @@ impl EnumVariantData {
338
334
let container = loc. parent . lookup ( db) . container ;
339
335
let krate = container. krate ;
340
336
let item_tree = loc. id . item_tree ( db) ;
341
- let cfg_options = db. crate_graph ( ) [ krate] . cfg_options . clone ( ) ;
342
337
let variant = & item_tree[ loc. id . value ] ;
343
338
344
339
let ( var_data, diagnostics) = lower_fields (
@@ -347,7 +342,7 @@ impl EnumVariantData {
347
342
loc. id . file_id ( ) ,
348
343
container. local_id ,
349
344
& item_tree,
350
- & cfg_options,
345
+ & db . crate_graph ( ) [ krate ] . cfg_options ,
351
346
& variant. fields ,
352
347
Some ( item_tree[ loc. parent . lookup ( db) . id . value ] . visibility ) ,
353
348
) ;
0 commit comments