diff --git a/src/rt/rust_chan.cpp b/src/rt/rust_chan.cpp index 3065a55e5826..78301e3d879d 100644 --- a/src/rt/rust_chan.cpp +++ b/src/rt/rust_chan.cpp @@ -7,6 +7,7 @@ rust_chan::rust_chan(rust_task *task, maybe_proxy *port, size_t unit_sz) : + ref_count(1), task(task), port(port), buffer(task, unit_sz) { diff --git a/src/rt/rust_chan.h b/src/rt/rust_chan.h index a327dbf0c95d..4172ca5f09d8 100644 --- a/src/rt/rust_chan.h +++ b/src/rt/rust_chan.h @@ -1,10 +1,10 @@ #ifndef RUST_CHAN_H #define RUST_CHAN_H -class rust_chan : public rc_base, - public task_owned, +class rust_chan : public task_owned, public rust_cond { public: + RUST_REFCOUNTED_WITH_DTOR(rust_chan, destroy()) rust_chan(rust_task *task, maybe_proxy *port, size_t unit_sz); ~rust_chan();