Added the param-blindness attribute to Rc and Arc.
This was proven necessary after I added `Rc` and `Arc` to the rpass test `dropck_legal_cycles.rs`; see PR #28929.
This commit is contained in:
@@ -550,6 +550,7 @@ impl<T: ?Sized> Drop for Arc<T> {
|
|||||||
///
|
///
|
||||||
/// } // implicit drop
|
/// } // implicit drop
|
||||||
/// ```
|
/// ```
|
||||||
|
#[unsafe_destructor_blind_to_params]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// This structure has #[unsafe_no_drop_flag], so this drop glue may run
|
// This structure has #[unsafe_no_drop_flag], so this drop glue may run
|
||||||
|
|||||||
@@ -451,6 +451,7 @@ impl<T: ?Sized> Drop for Rc<T> {
|
|||||||
///
|
///
|
||||||
/// } // implicit drop
|
/// } // implicit drop
|
||||||
/// ```
|
/// ```
|
||||||
|
#[unsafe_destructor_blind_to_params]
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ptr = *self._ptr;
|
let ptr = *self._ptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user