1
Fork 0

2229: Annotate stdlib with insignficant dtors

This commit is contained in:
Aman Arora 2021-09-21 04:04:50 -04:00
parent 95cfbe43d2
commit 099a34cd95
8 changed files with 9 additions and 0 deletions

View file

@ -1441,6 +1441,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Rc<T> {
/// drop(foo); // Doesn't print anything
/// drop(foo2); // Prints "dropped!"
/// ```
#[rustc_insignificant_dtor]
fn drop(&mut self) {
unsafe {
self.inner().dec_strong();