They fall out automatically from move semantics, a reference count only occurs on an explicit clone call:
fn just_a_ref(x: &T) { ... }
fn rc_by_val(x: Rc<T>) { ... }
fn rc_by_ref(x: &Rc<T>) { ... }
let some_rc_pointer: Rc<T> = ...;
just_a_ref(&*some_rc_pointer); // no ref counting
rc_by_ref(&some_rc_pointer); // no ref counting
rc_by_val(some_rc_pointer.clone()); // ref count incremented
// last use of a value (statically guaranteed that
// some_rc_pointer is never used again):
rc_by_val(some_rc_pointer); // no ref counting
Now that the refcounting is also moved to a library, I am not sure.
Or are those types known to the compiler and the respective optimizations applied?