3 // Issue #62007: assigning over a deref projection of a box (in this
4 // case, `*list = n;`) should be able to kill all borrows of `*list`,
5 // so that `*list` can be borrowed on the next iteration through the
12 next: Option<Box<List<T>>>,
15 fn to_refs<T>(mut list: Box<&mut List<T>>) -> Vec<&mut T> {
16 let mut result = vec![];
18 result.push(&mut list.value);
19 if let Some(n) = list.next.as_mut() {