Optimize RefCell refcount tracking
This commit is contained in:
parent
9cc3d44b93
commit
851cc39503
5 changed files with 40 additions and 34 deletions
|
|
@ -19,5 +19,5 @@ fn assert<T: UnwindSafe + ?Sized>() {}
|
|||
fn main() {
|
||||
assert::<Rc<RefCell<i32>>>();
|
||||
//~^ ERROR the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<usize>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,5 +19,5 @@ fn assert<T: UnwindSafe + ?Sized>() {}
|
|||
fn main() {
|
||||
assert::<Arc<RefCell<i32>>>();
|
||||
//~^ ERROR the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<usize>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ fn assert<T: UnwindSafe + ?Sized>() {}
|
|||
fn main() {
|
||||
assert::<&RefCell<i32>>();
|
||||
//~^ ERROR the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<usize>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ fn assert<T: UnwindSafe + ?Sized>() {}
|
|||
fn main() {
|
||||
assert::<*mut RefCell<i32>>();
|
||||
//~^ ERROR the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<usize>` may contain interior mutability and a
|
||||
//~| ERROR the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue