File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -893,17 +893,17 @@ fn extract_impl_attrs(attr: AttributeArgs) -> std::result::Result<ExtractedImplA
893893 } ;
894894 if path_eq ( & path, "PyRef" ) {
895895 // special handling for PyRef
896- withs. push ( quote ! {
896+ withs. push ( quote_spanned ! { path . span ( ) =>
897897 PyRef :: <Self >:: impl_extend_class( ctx, class) ;
898898 } ) ;
899- with_slots. push ( quote ! {
899+ with_slots. push ( quote_spanned ! { path . span ( ) =>
900900 PyRef :: <Self >:: extend_slots( slots) ;
901901 } ) ;
902902 } else {
903- withs. push ( quote ! {
903+ withs. push ( quote_spanned ! { path . span ( ) =>
904904 <Self as #path>:: __extend_py_class( ctx, class) ;
905905 } ) ;
906- with_slots. push ( quote ! {
906+ with_slots. push ( quote_spanned ! { path . span ( ) =>
907907 <Self as #path>:: __extend_slots( slots) ;
908908 } ) ;
909909 }
@@ -913,7 +913,7 @@ fn extract_impl_attrs(attr: AttributeArgs) -> std::result::Result<ExtractedImplA
913913 match meta {
914914 NestedMeta :: Meta ( Meta :: Path ( path) ) => {
915915 if let Some ( ident) = path. get_ident ( ) {
916- flags. push ( quote ! {
916+ flags. push ( quote_spanned ! { ident . span ( ) =>
917917 | :: rustpython_vm:: slots:: PyTpFlags :: #ident. bits( )
918918 } ) ;
919919 } else {
You can’t perform that action at this time.
0 commit comments