@@ -191,8 +191,6 @@ impl StructData {
191191 let krate = loc. container . krate ;
192192 let item_tree = loc. id . item_tree ( db) ;
193193 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-
196194 let attrs = item_tree. attrs ( db, krate, ModItem :: from ( loc. id . value ) . into ( ) ) ;
197195
198196 let 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 ,
224222 None ,
225223 ) ;
@@ -248,8 +246,6 @@ impl StructData {
248246 let krate = loc. container . krate ;
249247 let item_tree = loc. id . item_tree ( db) ;
250248 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-
253249 let attrs = item_tree. attrs ( db, krate, ModItem :: from ( loc. id . value ) . into ( ) ) ;
254250 let mut flags = StructFlags :: NO_FLAGS ;
255251 if 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 ,
271267 None ,
272268 ) ;
@@ -338,7 +334,6 @@ impl EnumVariantData {
338334 let container = loc. parent . lookup ( db) . container ;
339335 let krate = container. krate ;
340336 let item_tree = loc. id . item_tree ( db) ;
341- let cfg_options = db. crate_graph ( ) [ krate] . cfg_options . clone ( ) ;
342337 let variant = & item_tree[ loc. id . value ] ;
343338
344339 let ( 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 ,
352347 Some ( item_tree[ loc. parent . lookup ( db) . id . value ] . visibility ) ,
353348 ) ;
0 commit comments