Skip to content

Commit

Permalink
Inline debug_strict_*.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Oct 30, 2024
1 parent b61a4c2 commit 9159cc6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_serialize/src/int_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ macro_rules! impl_debug_strict_add {
($( $ty:ty )*) => {
$(
impl DebugStrictAdd for $ty {
#[inline(always)]
fn debug_strict_add(self, other: Self) -> Self {
if cfg!(debug_assertions) {
self + other
Expand All @@ -42,6 +43,7 @@ macro_rules! impl_debug_strict_sub {
($( $ty:ty )*) => {
$(
impl DebugStrictSub for $ty {
#[inline(always)]
fn debug_strict_sub(self, other: Self) -> Self {
if cfg!(debug_assertions) {
self - other
Expand Down

0 comments on commit 9159cc6

Please sign in to comment.