std_macro_extensions/rc/
macro.rs

1/// Creates a new `Rc` (Reference Counted) instance.
2///
3/// This macro takes a value and wraps it in an `Rc`, providing shared ownership of the value.
4/// Multiple references to the same value can be made, and the value will be dropped when the last reference goes out of scope.
5#[macro_export]
6macro_rules! rc {
7    ($val:expr) => {
8        std::rc::Rc::new($val)
9    };
10}