From 3fc18d0b40c125d05e9123d3ce4f71348430774e Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Wed, 6 Dec 2023 20:59:23 +0000 Subject: [PATCH] Add a hack to prevent proc_macro misopt in CI --- proc_macro/src/bridge/buffer.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proc_macro/src/bridge/buffer.rs b/proc_macro/src/bridge/buffer.rs index 48030f8d82dca..149767bf70521 100644 --- a/proc_macro/src/bridge/buffer.rs +++ b/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);