Skip to content

Commit

Permalink
inout internals: Mark SrcIndexError::new as #[inline(never)].
Browse files Browse the repository at this point in the history
Otherwise the optimizer loses the `#[cold]` annotation, it seems.
  • Loading branch information
briansmith committed Jan 1, 2025
1 parent ba2ec57 commit 8248b84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/inout/overlapping/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pub struct SrcIndexError(#[allow(dead_code)] RangeFrom<usize>);

impl SrcIndexError {
#[cold]
#[inline(never)]
fn new(src: RangeFrom<usize>) -> Self {
Self(src)
}
Expand Down

0 comments on commit 8248b84

Please sign in to comment.