Skip to main content

rustpython_common/
rc.rs

1// type aliases instead of new-types because you can't do `fn method(self: PyRc<Self>)` with a
2// newtype; requires the arbitrary_self_types unstable feature
3
4pub type PyRc<T> = cfg_select! {
5    feature = "threading" => alloc::sync::Arc::<T>,
6    _ => alloc::rc::Rc::<T>,
7};