Closed
Description
The feature gate for the issue is #![feature(arc_new_cyclic)]
.
Tracking the following API:
impl<T> Arc<T> {
pub fn new_cyclic(data_fn: impl FnOnce(&Weak<T>) -> T) -> Arc<T>;
}
impl<T> Rc<T> {
pub fn new_cyclic(data_fn: impl FnOnce(&Weak<T>) -> T) -> Rc<T>;
}
Steps
- Add
Arc::new_with()
function for constructing self-referential data structures #72443 - Implement
Arc::new_cyclic
(Add Arc::new_cyclic #75505) - Implement
Rc::new_cyclic
(impl Rc::new_cyclic
#75994) - FCP: Stabilize arc_new_cyclic #90666 (comment)
- Stabilization PR: Stabilize arc_new_cyclic #90666