@@ -57,7 +57,7 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo
5757 . variants ( )
5858 . iter ( )
5959 . map ( |variant| Variant {
60- docstrings : docstrings ( ctxt. tcx . get_attrs_unchecked ( variant. def_id ) ) ,
60+ docstrings : docstrings ( ctxt. tcx . get_all_attrs ( variant. def_id ) ) ,
6161 name : variant. name . to_ident_string ( ) . into ( ) ,
6262 fields : process_fields ( ctxt, variant. fields . iter ( ) , & ty_ctxt) ,
6363 } )
@@ -71,7 +71,7 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo
7171 is_enum : variants. len ( ) > 1 ,
7272 variants,
7373 is_tuple_struct,
74- docstrings : docstrings ( tcx. get_attrs_unchecked ( reflect_ty_did) ) ,
74+ docstrings : docstrings ( tcx. get_all_attrs ( reflect_ty_did) ) ,
7575 impls_clone : trait_impls. contains_key ( & clone_diagnostic) ,
7676 impls_debug : trait_impls. contains_key ( & debug_diagnostic) ,
7777 impls_display : trait_impls. contains_key ( & display_diagnostic) ,
@@ -110,7 +110,7 @@ pub(crate) fn process_fields<'f, I: Iterator<Item = &'f FieldDef>>(
110110) -> Vec < Field > {
111111 fields
112112 . map ( |field| Field {
113- docstrings : docstrings ( ctxt. tcx . get_attrs_unchecked ( field. did ) ) ,
113+ docstrings : docstrings ( ctxt. tcx . get_all_attrs ( field. did ) ) ,
114114 ident : field. name . to_ident_string ( ) ,
115115 ty : ty_to_string ( ctxt, ctxt. tcx . type_of ( field. did ) . skip_binder ( ) , false ) ,
116116 reflection_strategy : * ty_ctxt
@@ -163,9 +163,9 @@ pub(crate) fn process_functions(ctxt: &BevyCtxt, fns: &[FunctionContext]) -> Vec
163163 args,
164164 output,
165165 has_self : fn_ctxt. has_self ,
166- docstrings : docstrings ( ctxt. tcx . get_attrs_unchecked ( fn_ctxt. def_id ) ) ,
166+ docstrings : docstrings ( ctxt. tcx . get_all_attrs ( fn_ctxt. def_id ) ) ,
167167 from_trait_path : fn_ctxt. trait_and_impl_did . map ( |( _, impl_did) | {
168- let trait_ref = ctxt. tcx . impl_trait_ref ( impl_did) . unwrap ( ) . skip_binder ( ) ;
168+ let trait_ref = ctxt. tcx . impl_trait_ref ( impl_did) . skip_binder ( ) ;
169169
170170 trait_ref_to_string ( ctxt, trait_ref)
171171 } ) ,
@@ -239,7 +239,7 @@ fn trait_ref_to_string<'tcx>(ctxt: &BevyCtxt<'tcx>, trait_ref: TraitRef<'tcx>) -
239239 // filter out non const | type generics and the compiler generated ones
240240 . filter ( |( _, arg_def) | match arg_def. kind {
241241 GenericParamDefKind :: Lifetime => false ,
242- GenericParamDefKind :: Const { synthetic, .. } => !synthetic,
242+ GenericParamDefKind :: Type { synthetic, .. } => !synthetic,
243243 _ => true ,
244244 } )
245245 . map ( |( arg, arg_def) | {
0 commit comments