remove reference counting headers from ~
Unique pointers and vectors currently contain a reference counting
header when containing a managed pointer.
This `{ ref_count, type_desc, prev, next }` header is not necessary and
not a sensible foundation for tracing. It adds needless complexity to
library code and is responsible for breakage in places where the branch
has been left out.
The `borrow_offset` field can now be removed from `TyDesc` along with
the associated handling in the compiler.
Closes #9510
Closes #11533
This commit is contained in:
@@ -230,4 +230,12 @@ mod tests {
|
||||
drop(x);
|
||||
assert!(y.upgrade().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gc_inside() {
|
||||
// see issue #11532
|
||||
use gc::Gc;
|
||||
let a = Rc::new(RefCell::new(Gc::new(1)));
|
||||
assert!(a.borrow().try_borrow_mut().is_some());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user