Skip to content

Commit 0678528

Browse files
committed
Fix compile error when using vm-tracing-logging is on
1 parent ac25328 commit 0678528

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

vm/src/function/getset.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::{
99
};
1010

1111
#[derive(result_like::OptionLike, is_macro::Is)]
12+
#[derive(Debug)]
1213
pub enum PySetterValue<T = PyObjectRef> {
1314
Assign(T),
1415
Delete,

vm/src/object/core.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ use std::{
7171
// concrete type to work with before we ever access the `payload` field**
7272

7373
/// A type to just represent "we've erased the type of this object, cast it before you use it"
74+
#[derive(Debug)]
7475
struct Erased;
7576

7677
struct PyObjVTable {
@@ -469,6 +470,7 @@ cfg_if::cfg_if! {
469470
}
470471
}
471472

473+
#[derive(Debug)]
472474
#[repr(transparent)]
473475
pub struct PyObject(PyInner<Erased>);
474476

vm/src/protocol/object.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl PyObject {
8888
#[cfg_attr(feature = "flame-it", flame("PyObjectRef"))]
8989
#[inline]
9090
fn _get_attr(&self, attr_name: PyStrRef, vm: &VirtualMachine) -> PyResult {
91-
vm_trace!("object.__getattribute__: {:?} {:?}", obj, attr_name);
91+
vm_trace!("object.__getattribute__: {:?} {:?}", self, attr_name);
9292
let getattro = self
9393
.class()
9494
.mro_find_map(|cls| cls.slots.getattro.load())
@@ -144,7 +144,7 @@ impl PyObject {
144144
value: PySetterValue,
145145
vm: &VirtualMachine,
146146
) -> PyResult<()> {
147-
vm_trace!("object.__setattr__({:?}, {}, {:?})", obj, attr_name, value);
147+
vm_trace!("object.__setattr__({:?}, {}, {:?})", self, attr_name, value);
148148
if let Some(attr) = vm
149149
.ctx
150150
.interned_str(&*attr_name)

0 commit comments

Comments
 (0)