Skip to content

Commit 072c495

Browse files
committed
'static
1 parent 07f2ecc commit 072c495

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+65
-65
lines changed

crates/derive-impl/src/pyclass.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ pub(crate) fn impl_pyclass_impl(attr: PunctuatedNestedMeta, item: Item) -> Resul
181181
},
182182
parse_quote! {
183183
fn __extend_py_class(
184-
ctx: &::rustpython_vm::Context,
184+
ctx: &'static ::rustpython_vm::Context,
185185
class: &'static ::rustpython_vm::Py<::rustpython_vm::builtins::PyType>,
186186
) {
187187
#getset_impl
@@ -222,7 +222,7 @@ pub(crate) fn impl_pyclass_impl(attr: PunctuatedNestedMeta, item: Item) -> Resul
222222
const TP_FLAGS: ::rustpython_vm::types::PyTypeFlags = #flags;
223223

224224
fn impl_extend_class(
225-
ctx: &::rustpython_vm::Context,
225+
ctx: &'static ::rustpython_vm::Context,
226226
class: &'static ::rustpython_vm::Py<::rustpython_vm::builtins::PyType>,
227227
) {
228228
#impl_ty::__extend_py_class(ctx, class);
@@ -284,7 +284,7 @@ pub(crate) fn impl_pyclass_impl(attr: PunctuatedNestedMeta, item: Item) -> Resul
284284
},
285285
parse_quote! {
286286
fn __extend_py_class(
287-
ctx: &::rustpython_vm::Context,
287+
ctx: &'static ::rustpython_vm::Context,
288288
class: &'static ::rustpython_vm::Py<::rustpython_vm::builtins::PyType>,
289289
) {
290290
#getset_impl

crates/vm/src/builtins/asyncgenerator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ impl Drop for PyAsyncGen {
810810
}
811811
}
812812

813-
pub fn init(ctx: &Context) {
813+
pub fn init(ctx: &'static Context) {
814814
PyAsyncGen::extend_class(ctx, ctx.types.async_generator);
815815
PyAsyncGenASend::extend_class(ctx, ctx.types.async_generator_asend);
816816
PyAsyncGenAThrow::extend_class(ctx, ctx.types.async_generator_athrow);

crates/vm/src/builtins/bool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl Representable for PyBool {
182182
}
183183
}
184184

185-
pub(crate) fn init(context: &Context) {
185+
pub(crate) fn init(context: &'static Context) {
186186
PyBool::extend_class(context, context.types.bool_type);
187187
}
188188

crates/vm/src/builtins/builtin_func.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl fmt::Debug for PyNativeMethod {
224224
}
225225
}
226226

227-
pub fn init(context: &Context) {
227+
pub fn init(context: &'static Context) {
228228
PyNativeFunction::extend_class(context, context.types.builtin_function_or_method_type);
229229
}
230230

crates/vm/src/builtins/bytearray.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl PyPayload for PyByteArray {
6767
}
6868

6969
/// Fill bytearray class methods dictionary.
70-
pub(crate) fn init(context: &Context) {
70+
pub(crate) fn init(context: &'static Context) {
7171
PyByteArray::extend_class(context, context.types.bytearray_type);
7272
PyByteArrayIterator::extend_class(context, context.types.bytearray_iterator_type);
7373
}

crates/vm/src/builtins/bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl PyPayload for PyBytes {
8686
}
8787
}
8888

89-
pub(crate) fn init(context: &Context) {
89+
pub(crate) fn init(context: &'static Context) {
9090
PyBytes::extend_class(context, context.types.bytes_type);
9191
PyBytesIterator::extend_class(context, context.types.bytes_iterator_type);
9292
}

crates/vm/src/builtins/capsule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ impl Representable for PyCapsule {
2828
}
2929
}
3030

31-
pub fn init(context: &Context) {
31+
pub fn init(context: &'static Context) {
3232
PyCapsule::extend_class(context, context.types.capsule_type);
3333
}

crates/vm/src/builtins/classmethod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,6 @@ impl Representable for PyClassMethod {
227227
}
228228
}
229229

230-
pub(crate) fn init(context: &Context) {
230+
pub(crate) fn init(context: &'static Context) {
231231
PyClassMethod::extend_class(context, context.types.classmethod_type);
232232
}

crates/vm/src/builtins/code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,6 @@ impl<'a> LineTableReader<'a> {
12751275
}
12761276
}
12771277

1278-
pub fn init(ctx: &Context) {
1278+
pub fn init(ctx: &'static Context) {
12791279
PyCode::extend_class(ctx, ctx.types.code_type);
12801280
}

crates/vm/src/builtins/complex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl PyObjectRef {
8989
}
9090
}
9191

92-
pub fn init(context: &Context) {
92+
pub fn init(context: &'static Context) {
9393
PyComplex::extend_class(context, context.types.complex_type);
9494
}
9595

0 commit comments

Comments
 (0)