File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1546,11 +1546,11 @@ fn generate_protocol_slot(
15461546) -> syn:: Result < MethodAndSlotDef > {
15471547 let spec = FnSpec :: parse (
15481548 & mut method. sig ,
1549- & mut Vec :: new ( ) ,
1549+ & mut method . attrs ,
15501550 PyFunctionOptions :: default ( ) ,
15511551 ) ?;
15521552 #[ cfg_attr( not( feature = "experimental-inspect" ) , allow( unused_mut) ) ]
1553- let mut def = slot. generate_type_slot ( & syn :: parse_quote! ( # cls) , & spec, name, ctx) ?;
1553+ let mut def = slot. generate_type_slot ( cls, & spec, name, ctx) ?;
15541554 #[ cfg( feature = "experimental-inspect" ) ]
15551555 {
15561556 // We generate introspection data
@@ -2273,6 +2273,7 @@ fn pyclass_new_impl<'a>(
22732273
22742274 let mut new_impl = {
22752275 parse_quote_spanned ! { opt. span( ) =>
2276+ #[ new]
22762277 fn __pyo3_generated____new__( #( #field_idents : #field_types ) , * ) -> Self {
22772278 Self {
22782279 #( #field_idents, ) *
You can’t perform that action at this time.
0 commit comments