@@ -40,6 +40,7 @@ pub struct StructData {
40
40
pub repr : Option < ReprOptions > ,
41
41
pub visibility : RawVisibility ,
42
42
pub rustc_has_incoherent_inherent_impls : bool ,
43
+ pub fundamental : bool ,
43
44
}
44
45
45
46
#[ derive( Debug , Clone , PartialEq , Eq ) ]
@@ -173,10 +174,10 @@ impl StructData {
173
174
let item_tree = loc. id . item_tree ( db) ;
174
175
let repr = repr_from_value ( db, krate, & item_tree, ModItem :: from ( loc. id . value ) . into ( ) ) ;
175
176
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 ( ) ;
180
181
181
182
let strukt = & item_tree[ loc. id . value ] ;
182
183
let ( variant_data, diagnostics) = lower_fields (
@@ -196,6 +197,7 @@ impl StructData {
196
197
repr,
197
198
visibility : item_tree[ strukt. visibility ] . clone ( ) ,
198
199
rustc_has_incoherent_inherent_impls,
200
+ fundamental,
199
201
} ) ,
200
202
diagnostics. into ( ) ,
201
203
)
@@ -215,10 +217,10 @@ impl StructData {
215
217
let repr = repr_from_value ( db, krate, & item_tree, ModItem :: from ( loc. id . value ) . into ( ) ) ;
216
218
let cfg_options = db. crate_graph ( ) [ loc. container . krate ] . cfg_options . clone ( ) ;
217
219
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 ( ) ;
222
224
223
225
let union = & item_tree[ loc. id . value ] ;
224
226
let ( variant_data, diagnostics) = lower_fields (
@@ -238,6 +240,7 @@ impl StructData {
238
240
repr,
239
241
visibility : item_tree[ union. visibility ] . clone ( ) ,
240
242
rustc_has_incoherent_inherent_impls,
243
+ fundamental,
241
244
} ) ,
242
245
diagnostics. into ( ) ,
243
246
)
0 commit comments