8000 Fix miri test failure (#5170) · RustPython/RustPython@a88c2fe · GitHub
[go: up one dir, main page]

Skip to content

Commit a88c2fe

Browse files
authored
Fix miri test failure (#5170)
1 parent 2a62ef7 commit a88c2fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vm/src/class.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ pub trait PyClassImpl: PyClassDef {
127127
Self::extend_class(ctx, unsafe {
128128
// typ will be saved in static_cell
129129
let r: &Py<PyType> = &typ;
130-
&*(r as *const _)
130+
let r: &'static Py<PyType> = std::mem::transmute(r);
131+
r
131132
});
132133
typ
133134
}))

0 commit comments

Comments
 (0)
0