Skip to content

Commit 34076bc

Browse files
committed
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 rust-lang#28929.
1 parent e1aba75 commit 34076bc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/liballoc/arc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ impl<T: ?Sized> Drop for Arc<T> {
550550
///
551551
/// } // implicit drop
552552
/// ```
553+
#[unsafe_destructor_blind_to_params]
553554
#[inline]
554555
fn drop(&mut self) {
555556
// This structure has #[unsafe_no_drop_flag], so this drop glue may run

src/liballoc/rc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ impl<T: ?Sized> Drop for Rc<T> {
451451
///
452452
/// } // implicit drop
453453
/// ```
454+
#[unsafe_destructor_blind_to_params]
454455
fn drop(&mut self) {
455456
unsafe {
456457
let ptr = *self._ptr;

0 commit comments

Comments
 (0)