I'm being unable to compile the following:
pub trait Symbol : ToString {
fn callee(self: &Rc<Self>) -> Option<Rc<dyn Symbol>> {
None
}
}
Taking Rc
parameter causes the error...
E0038) the trait
symbols::Symbol
cannot be made into an object
everywhere Symbol
is used, including in that function declaration.
It does work if I take &self
instead of self: &Rc<Self>
, however I've some functions that really need to take this Rc. Any idea of what to do?