From 8248b84398252f49175b0b6a0ab54bdccb2fec85 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 31 Dec 2024 16:31:06 -0800 Subject: [PATCH] inout internals: Mark `SrcIndexError::new` as `#[inline(never)]`. Otherwise the optimizer loses the `#[cold]` annotation, it seems. --- src/inout/overlapping/base.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/inout/overlapping/base.rs b/src/inout/overlapping/base.rs index dda091fb3..cd5a3f5dd 100644 --- a/src/inout/overlapping/base.rs +++ b/src/inout/overlapping/base.rs @@ -58,6 +58,7 @@ pub struct SrcIndexError(#[allow(dead_code)] RangeFrom); impl SrcIndexError { #[cold] + #[inline(never)] fn new(src: RangeFrom) -> Self { Self(src) }