@@ -191,8 +191,6 @@ impl StructData {
191191let krate = loc. container . krate ;
192192let item_tree = loc. id . item_tree ( db) ;
193193let 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-
196194let attrs = item_tree. attrs ( db, krate, ModItem :: from ( loc. id . value ) . into ( ) ) ;
197195
198196let mut flags = StructFlags :: NO_FLAGS ;
@@ -219,7 +217,7 @@ impl StructData {
219217 loc. id . file_id ( ) ,
220218 loc. container . local_id ,
221219& item_tree,
222- & cfg_options,
220+ & db . crate_graph ( ) [ krate ] . cfg_options ,
223221& strukt. fields ,
224222None ,
225223) ;
@@ -248,8 +246,6 @@ impl StructData {
248246let krate = loc. container . krate ;
249247let item_tree = loc. id . item_tree ( db) ;
250248let 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-
253249let attrs = item_tree. attrs ( db, krate, ModItem :: from ( loc. id . value ) . into ( ) ) ;
254250let mut flags = StructFlags :: NO_FLAGS ;
255251if attrs. by_key ( "rustc_has_incoherent_inherent_impls" ) . exists ( ) {
@@ -266,7 +262,7 @@ impl StructData {
266262 loc. id . file_id ( ) ,
267263 loc. container . local_id ,
268264& item_tree,
269- & cfg_options,
265+ & db . crate_graph ( ) [ krate ] . cfg_options ,
270266& union. fields ,
271267None ,
272268) ;
@@ -338,7 +334,6 @@ impl EnumVariantData {
338334let container = loc. parent . lookup ( db) . container ;
339335let krate = container. krate ;
340336let item_tree = loc. id . item_tree ( db) ;
341- let cfg_options = db. crate_graph ( ) [ krate] . cfg_options . clone ( ) ;
342337let variant = & item_tree[ loc. id . value ] ;
343338
344339let ( var_data, diagnostics) = lower_fields (
@@ -347,7 +342,7 @@ impl EnumVariantData {
347342 loc. id . file_id ( ) ,
348343 container. local_id ,
349344& item_tree,
350- & cfg_options,
345+ & db . crate_graph ( ) [ krate ] . cfg_options ,
351346& variant. fields ,
352347Some ( item_tree[ loc. parent . lookup ( db) . id . value ] . visibility ) ,
353348) ;
0 commit comments