@@ -40,6 +40,7 @@ pub struct StructData {
4040 pub repr : Option < ReprOptions > ,
4141 pub visibility : RawVisibility ,
4242 pub rustc_has_incoherent_inherent_impls : bool ,
43+ pub fundamental : bool ,
4344}
4445
4546#[ derive( Debug , Clone , PartialEq , Eq ) ]
@@ -173,10 +174,10 @@ impl StructData {
173174 let item_tree = loc. id . item_tree ( db) ;
174175 let repr = repr_from_value ( db, krate, & item_tree, ModItem :: from ( loc. id . value ) . into ( ) ) ;
175176 let cfg_options = db. crate_graph ( ) [ loc. container . krate ] . cfg_options . clone ( ) ;
176- let rustc_has_incoherent_inherent_impls = item_tree
177- . attrs ( db , loc . container . krate , ModItem :: from ( loc . id . value ) . into ( ) )
178- . by_key ( "rustc_has_incoherent_inherent_impls" )
179- . exists ( ) ;
177+ let attrs = item_tree. attrs ( db , loc . container . krate , ModItem :: from ( loc . id . value ) . into ( ) ) ;
178+ let rustc_has_incoherent_inherent_impls =
179+ attrs . by_key ( "rustc_has_incoherent_inherent_impls" ) . exists ( ) ;
180+ let fundamental = attrs . by_key ( "fundamental" ) . exists ( ) ;
180181
181182 let strukt = & item_tree[ loc. id . value ] ;
182183 let ( variant_data, diagnostics) = lower_fields (
@@ -196,6 +197,7 @@ impl StructData {
196197 repr,
197198 visibility : item_tree[ strukt. visibility ] . clone ( ) ,
198199 rustc_has_incoherent_inherent_impls,
200+ fundamental,
199201 } ) ,
200202 diagnostics. into ( ) ,
201203 )
@@ -215,10 +217,10 @@ impl StructData {
215217 let repr = repr_from_value ( db, krate, & item_tree, ModItem :: from ( loc. id . value ) . into ( ) ) ;
216218 let cfg_options = db. crate_graph ( ) [ loc. container . krate ] . cfg_options . clone ( ) ;
217219
218- let rustc_has_incoherent_inherent_impls = item_tree
219- . attrs ( db , loc . container . krate , ModItem :: from ( loc . id . value ) . into ( ) )
220- . by_key ( "rustc_has_incoherent_inherent_impls" )
221- . exists ( ) ;
220+ let attrs = item_tree. attrs ( db , loc . container . krate , ModItem :: from ( loc . id . value ) . into ( ) ) ;
221+ let rustc_has_incoherent_inherent_impls =
222+ attrs . by_key ( "rustc_has_incoherent_inherent_impls" ) . exists ( ) ;
223+ let fundamental = attrs . by_key ( "fundamental" ) . exists ( ) ;
222224
223225 let union = & item_tree[ loc. id . value ] ;
224226 let ( variant_data, diagnostics) = lower_fields (
@@ -238,6 +240,7 @@ impl StructData {
238240 repr,
239241 visibility : item_tree[ union. visibility ] . clone ( ) ,
240242 rustc_has_incoherent_inherent_impls,
243+ fundamental,
241244 } ) ,
242245 diagnostics. into ( ) ,
243246 )
0 commit comments