about summary refs log tree commit diff
path: root/compiler/rustc_arena
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-06-11 23:44:28 +0800
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2023-06-15 17:59:13 +0800
commit72b3b58efc6ed4bab93ba98586b62750abbdda79 (patch)
treee69ee17e3d202a7a150e4e95c16c9bff6fe637bd /compiler/rustc_arena
parent314c39d2ea07d8b50649149358ebeb1a6bd09179 (diff)
downloadrust-72b3b58efc6ed4bab93ba98586b62750abbdda79.tar.gz
rust-72b3b58efc6ed4bab93ba98586b62750abbdda79.zip
Extend `unused_must_use` to cover block exprs
Diffstat (limited to 'compiler/rustc_arena')
-rw-r--r--compiler/rustc_arena/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_arena/src/lib.rs b/compiler/rustc_arena/src/lib.rs
index 6e15f06a76d..ba47ebd68cb 100644
--- a/compiler/rustc_arena/src/lib.rs
+++ b/compiler/rustc_arena/src/lib.rs
@@ -67,7 +67,7 @@ struct ArenaChunk<T = u8> {
 
 unsafe impl<#[may_dangle] T> Drop for ArenaChunk<T> {
     fn drop(&mut self) {
-        unsafe { Box::from_raw(self.storage.as_mut()) };
+        unsafe { drop(Box::from_raw(self.storage.as_mut())) }
     }
 }