about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-10-09 18:03:31 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-10-09 18:10:52 +0200
commit34076bc0c9fb9ee718e1cebc407547eef730a080 (patch)
tree16a9e883526d7e60cc1f0ec5f0f80d5100e08328 /src/liballoc
parente1aba75a978b7a228c2e5c413e2262e24b74141f (diff)
downloadrust-34076bc0c9fb9ee718e1cebc407547eef730a080.tar.gz
rust-34076bc0c9fb9ee718e1cebc407547eef730a080.zip
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.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs1
-rw-r--r--src/liballoc/rc.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index ceca44fc1ac..393138aca09 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -550,6 +550,7 @@ impl<T: ?Sized> Drop for Arc<T> {
     ///
     /// } // implicit drop
     /// ```
+    #[unsafe_destructor_blind_to_params]
     #[inline]
     fn drop(&mut self) {
         // This structure has #[unsafe_no_drop_flag], so this drop glue may run
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 3507f123a6f..c207996a8b6 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -451,6 +451,7 @@ impl<T: ?Sized> Drop for Rc<T> {
     ///
     /// } // implicit drop
     /// ```
+    #[unsafe_destructor_blind_to_params]
     fn drop(&mut self) {
         unsafe {
             let ptr = *self._ptr;