about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/proc_macro/src/bridge/buffer.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/proc_macro/src/bridge/buffer.rs b/library/proc_macro/src/bridge/buffer.rs
index 48030f8d82d..149767bf705 100644
--- a/library/proc_macro/src/bridge/buffer.rs
+++ b/library/proc_macro/src/bridge/buffer.rs
@@ -119,7 +119,9 @@ impl Write for Buffer {
 }
 
 impl Drop for Buffer {
-    #[inline]
+    // HACK(nbdd0121): Hack to prevent LLVM < 17.0.4 from misoptimising,
+    // change to `#[inline]` if fixed.
+    #[inline(never)]
     fn drop(&mut self) {
         let b = self.take();
         (b.drop)(b);